Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

ClpInterior Class Reference

#include <ClpInterior.hpp>

Inheritance diagram for ClpInterior:

ClpModel ClpPredictorCorrector List of all members.

data. Many arrays have a row part and a column part.

There is a single array with both - columns then rows and then normally two arrays pointing to rows and columns. The single array is the owner of memory

double xsize_
double zsize_
double * rhs_
 Rhs.

double * x_
double * y_
double * dj_
double largestPrimalError_
 Largest error on Ax-b.

double largestDualError_
 Largest error on basic duals.

double sumDualInfeasibilities_
 Sum of dual infeasibilities.

double sumPrimalInfeasibilities_
 Sum of primal infeasibilities.

double worstComplementarity_
 Worst complementarity.

double * lower_
 Working copy of lower bounds (Owner of arrays below).

double * rowLowerWork_
 Row lower bounds - working copy.

double * columnLowerWork_
 Column lower bounds - working copy.

double * upper_
 Working copy of upper bounds (Owner of arrays below).

double * rowUpperWork_
 Row upper bounds - working copy.

double * columnUpperWork_
 Column upper bounds - working copy.

double * cost_
 Working copy of objective.

ClpLsqr * lsqrObject_
 Pointer to Lsqr object.

ClpPdcoBase * pdcoStuff_
 Pointer to stuff.

double mu_
double objectiveNorm_
 objectiveNorm.

double rhsNorm_
 rhsNorm.

double solutionNorm_
 solutionNorm.

double dualObjective_
 dualObjective.

double primalObjective_
 primalObjective.

double diagonalNorm_
 diagonalNorm.

double stepLength_
 stepLength

double linearPerturbation_
 linearPerturbation

double diagonalPerturbation_
 diagonalPerturbation

double targetGap_
 targetGap

double projectionTolerance_
 projectionTolerance

double maximumRHSError_
 maximumRHSError. maximum Ax

double maximumBoundInfeasibility_
 maximumBoundInfeasibility.

double maximumDualError_
 maximumDualError.

double diagonalScaleFactor_
 diagonalScaleFactor.

double scaleFactor_
 scaleFactor. For scaling objective

double actualPrimalStep_
 actualPrimalStep

double actualDualStep_
 actualDualStep

double smallestInfeasibility_
 smallestInfeasibility

double historyInfeasibility_ [LENGTH_HISTORY]
double complementarityGap_
 complementarityGap.

double baseObjectiveNorm_
 baseObjectiveNorm

double worstDirectionAccuracy_
 worstDirectionAccuracy

double maximumRHSChange_
 maximumRHSChange

double * errorRegion_
 errorRegion. i.e. Ax

double * rhsFixRegion_
 rhsFixRegion.

double * updateRegion_
 updateRegion.

double * upperSlack_
 upperSlack

double * lowerSlack_
 lowerSlack

double * diagonal_
 diagonal

double * weights_
 weights

double * solution_
 solution

double * deltaZ_
 work1 or deltaZ.

double * deltaW_
 work2 or deltaW.

double * deltaS_
 work3 or deltaS.

double * deltaT_
 work4 or deltaT.

double * zVec_
 zVec

double * wVec_
 wVec

ClpCholeskyBasecholesky_
 cholesky.

int numberComplementarityPairs_
 numberComplementarityPairs;

int maximumBarrierIterations_
 Maximum iterations.

bool gonePrimalFeasible_
 gonePrimalFeasible.

bool goneDualFeasible_
 goneDualFeasible.

int algorithm_
 Which algorithm being used.


Public Member Functions

Constructors and destructor and copy
 ClpInterior ()
 Default constructor.

 ClpInterior (const ClpInterior &)
 Copy constructor.

 ClpInterior (const ClpModel &)
 Copy constructor from model.

 ClpInterior (const ClpModel *wholeModel, int numberRows, const int *whichRows, int numberColumns, const int *whichColumns, bool dropNames=true, bool dropIntegers=true)
ClpInterioroperator= (const ClpInterior &rhs)
 Assignment operator. This copies the data.

 ~ClpInterior ()
 Destructor.

void loadProblem (const ClpMatrixBase &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
void loadProblem (const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
void loadProblem (const int numcols, const int numrows, const CoinBigIndex *start, const int *index, const double *value, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
void loadProblem (const int numcols, const int numrows, const CoinBigIndex *start, const int *index, const double *value, const int *length, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, const double *rowObjective=NULL)
 This one is for after presolve to save memory.

int readMps (const char *filename, bool keepNames=false, bool ignoreErrors=false)
 Read an mps file from the given filename.

Functions most useful to user
int pdco ()
int pdco (ClpPdcoBase *stuff, Options &options, Info &info, Outfo &outfo)
int primalDual ()
 Primal-Dual Predictor-Corrector barrier.

most useful gets and sets
bool primalFeasible () const
 If problem is primal feasible.

bool dualFeasible () const
 If problem is dual feasible.

int algorithm () const
 Current (or last) algorithm.

void setAlgorithm (int value)
 Set algorithm.

double sumDualInfeasibilities () const
 Sum of dual infeasibilities.

double sumPrimalInfeasibilities () const
 Sum of primal infeasibilities.

most useful gets and sets
double largestPrimalError () const
 Largest error on Ax-b.

double largestDualError () const
 Largest error on basic duals.

int maximumBarrierIterations () const
 Maximum iterations.

void setMaximumBarrierIterations (int value)
public methods
double rawObjectiveValue () const
 Raw objective value (so always minimize).

int isColumn (int sequence) const
 Returns 1 if sequence indicates column.

int sequenceWithin (int sequence) const
 Returns sequence number within section.

void checkSolution ()
 Checks solution.

void setFixed (int sequence)
 To say a variable is fixed.

void clearFixed (int sequence)
bool fixed (int sequence) const
void setFlagged (int sequence)
 To flag a variable.

void clearFlagged (int sequence)
bool flagged (int sequence) const
void setFixedOrFree (int sequence)
 To say a variable is fixed OR free.

void clearFixedOrFree (int sequence)
bool fixedOrFree (int sequence) const
void setLowerBound (int sequence)
 To say a variable has lower bound.

void clearLowerBound (int sequence)
bool lowerBound (int sequence) const
void setUpperBound (int sequence)
 To say a variable has upper bound.

void clearUpperBound (int sequence)
bool upperBound (int sequence) const
void setFakeLower (int sequence)
 To say a variable has fake lower bound.

void clearFakeLower (int sequence)
bool fakeLower (int sequence) const
void setFakeUpper (int sequence)
 To say a variable has fake upper bound.

void clearFakeUpper (int sequence)
bool fakeUpper (int sequence) const

Protected Member Functions

protected methods
void gutsOfDelete ()
 Does most of deletion.

void gutsOfCopy (const ClpInterior &rhs)
 Does most of copying.

bool createWorkingData ()
 Returns true if data looks okay, false if not.

void deleteWorkingData ()
bool sanityCheck ()
 Sanity check on input rim data.

int housekeeping ()
 This does housekeeping.


Friends

void ClpInteriorUnitTest (const std::string &mpsDir, const std::string &netlibDir)

Detailed Description

This solves LPs using interior point methods

It inherits from ClpModel and all its arrays are created at algorithm time.

Definition at line 65 of file ClpInterior.hpp.


Constructor & Destructor Documentation

ClpInterior::ClpInterior const ClpModel wholeModel,
int  numberRows,
const int *  whichRows,
int  numberColumns,
const int *  whichColumns,
bool  dropNames = true,
bool  dropIntegers = true
 

Subproblem constructor. A subset of whole model is created from the row and column lists given. The new order is given by list order and duplicates are allowed. Name and integer information can be dropped

Definition at line 104 of file ClpInterior.cpp.

References cholesky_.

00108   : ClpModel(rhs, numberRows, whichRow,
00109              numberColumns,whichColumn,dropNames,dropIntegers),
00110     largestPrimalError_(0.0),
00111     largestDualError_(0.0),
00112     sumDualInfeasibilities_(0.0),
00113     sumPrimalInfeasibilities_(0.0),
00114     worstComplementarity_(0.0),
00115     xsize_(0.0),
00116     zsize_(0.0),
00117     lower_(NULL),
00118     rowLowerWork_(NULL),
00119     columnLowerWork_(NULL),
00120     upper_(NULL),
00121     rowUpperWork_(NULL),
00122     columnUpperWork_(NULL),
00123     cost_(NULL),
00124     rhs_(NULL),
00125     x_(NULL),
00126     y_(NULL),
00127     dj_(NULL),
00128     lsqrObject_(NULL),
00129     pdcoStuff_(NULL),
00130     mu_(0.0),
00131     objectiveNorm_(1.0e-12),
00132     rhsNorm_(1.0e-12),
00133     solutionNorm_(1.0e-12),
00134     dualObjective_(0.0),
00135     primalObjective_(0.0),
00136     diagonalNorm_(1.0e-12),
00137     stepLength_(0.99995),
00138     linearPerturbation_(1.0e-12),
00139     diagonalPerturbation_(1.0e-15),
00140     targetGap_(1.0e-12),
00141     projectionTolerance_(1.0e-7),
00142     maximumRHSError_(0.0),
00143     maximumBoundInfeasibility_(0.0),
00144     maximumDualError_(0.0),
00145     diagonalScaleFactor_(0.0),
00146     scaleFactor_(0.0),
00147     actualPrimalStep_(0.0),
00148     actualDualStep_(0.0),
00149     smallestInfeasibility_(0.0),
00150     complementarityGap_(0.0),
00151     baseObjectiveNorm_(0.0),
00152     worstDirectionAccuracy_(0.0),
00153     maximumRHSChange_(0.0),
00154     errorRegion_(NULL),
00155     rhsFixRegion_(NULL),
00156     updateRegion_(NULL),
00157     upperSlack_(NULL),
00158     lowerSlack_(NULL),
00159     diagonal_(NULL),
00160     weights_(NULL),
00161     solution_(NULL),
00162     deltaZ_(NULL),
00163     deltaW_(NULL),
00164     deltaS_(NULL),
00165     deltaT_(NULL),
00166     zVec_(NULL),
00167     wVec_(NULL),
00168     cholesky_(NULL),
00169     numberComplementarityPairs_(0),
00170     maximumBarrierIterations_(200),
00171     gonePrimalFeasible_(false),
00172     goneDualFeasible_(false),
00173     algorithm_(-1)
00174 {
00175   memset(historyInfeasibility_,0,LENGTH_HISTORY*sizeof(double));
00176   solveType_=2; // say interior based life form
00177   cholesky_= new ClpCholeskyDense();
00178 }


Member Function Documentation

void ClpInterior::loadProblem const int  numcols,
const int  numrows,
const CoinBigIndex *  start,
const int *  index,
const double *  value,
const double *  collb,
const double *  colub,
const double *  obj,
const double *  rowlb,
const double *  rowub,
const double *  rowObjective = NULL
 

Just like the other loadProblem() method except that the matrix is given in a standard column major ordered format (without gaps).

Reimplemented from ClpModel.

Definition at line 772 of file ClpInterior.cpp.

References ClpModel::loadProblem().

00779 {
00780   ClpModel::loadProblem(numcols, numrows, start, index, value,
00781                           collb, colub, obj, rowlb, rowub,
00782                           rowObjective);
00783 }

void ClpInterior::loadProblem const ClpMatrixBase matrix,
const double *  collb,
const double *  colub,
const double *  obj,
const double *  rowlb,
const double *  rowub,
const double *  rowObjective = NULL
 

Loads a problem (the constraints on the rows are given by lower and upper bounds). If a pointer is 0 then the following values are the default:

  • colub: all columns have upper bound infinity
  • collb: all columns have lower bound 0
  • rowub: all rows have upper bound infinity
  • rowlb: all rows have lower bound -infinity
  • obj: all variables have 0 objective coefficient

Reimplemented from ClpModel.

Definition at line 749 of file ClpInterior.cpp.

References ClpModel::loadProblem().

00754 {
00755   ClpModel::loadProblem(matrix, collb, colub, obj, rowlb, rowub,
00756                         rowObjective);
00757 }

int ClpInterior::pdco  ) 
 

Pdco algorithm - see ClpPdco.hpp for method


Friends And Related Function Documentation

void ClpInteriorUnitTest const std::string &  mpsDir,
const std::string &  netlibDir
[friend]
 

A function that tests the methods in the ClpInterior class. The only reason for it not to be a member method is that this way it doesn't have to be compiled into the library. And that's a gain, because the library should be compiled with optimization on, but this method should be compiled with debugging.

It also does some testing of ClpFactorization class


Member Data Documentation

double ClpInterior::mu_ [protected]
 

Below here is standard barrier stuff mu.

Definition at line 351 of file ClpInterior.hpp.

Referenced by gutsOfCopy().


The documentation for this class was generated from the following files:
Generated on Wed Dec 3 14:37:38 2003 for CLP by doxygen 1.3.5