Go to the documentation of this file.
23 #include "CoinDenseVector.hpp"
74 const std::string &netlibDir);
93 bool dropNames =
true,
bool dropIntegers =
true);
111 const double *collb,
const double *colub,
113 const double *rowlb,
const double *rowub,
116 const double *collb,
const double *colub,
118 const double *rowlb,
const double *rowub,
123 void loadProblem(
const int numcols,
const int numrows,
124 const CoinBigIndex *start,
const int *index,
126 const double *collb,
const double *colub,
128 const double *rowlb,
const double *rowub,
131 void loadProblem(
const int numcols,
const int numrows,
132 const CoinBigIndex *start,
const int *index,
133 const double *value,
const int *length,
134 const double *collb,
const double *colub,
136 const double *rowlb,
const double *rowub,
139 int readMps(
const char *filename,
140 bool keepNames =
false,
141 bool ignoreErrors =
false);
287 void fixFixed(
bool reallyFix =
true);
294 inline CoinWorkDouble *
dualR()
const
337 CoinWorkDouble
quadraticDjs(CoinWorkDouble *djRegion,
const CoinWorkDouble *solution,
338 CoinWorkDouble scaleFactor);
343 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] | 1);
347 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] & ~1);
349 inline bool fixed(
int sequence)
const
351 return ((
status_[sequence] & 1) != 0);
357 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] | 2);
361 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] & ~2);
365 return ((
status_[sequence] & 2) != 0);
371 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] | 4);
375 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] & ~4);
379 return ((
status_[sequence] & 4) != 0);
385 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] | 8);
389 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] & ~8);
393 return ((
status_[sequence] & 8) != 0);
399 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] | 16);
403 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] & ~16);
407 return ((
status_[sequence] & 16) != 0);
413 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] | 32);
417 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] & ~32);
421 return ((
status_[sequence] & 32) != 0);
427 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] | 64);
431 status_[sequence] =
static_cast< unsigned char >(
status_[sequence] & ~64);
435 return ((
status_[sequence] & 64) != 0);
536 #define LENGTH_HISTORY 5
617 const std::string &netlibDir);
bool upperBound(int sequence) const
CoinWorkDouble * rowLowerWork_
Row lower bounds - working copy.
void setFixed(int sequence)
To say a variable is fixed.
CoinWorkDouble objectiveNorm_
objectiveNorm.
CoinWorkDouble sumDualInfeasibilities() const
Sum of dual infeasibilities.
ClpCholeskyBase * cholesky_
cholesky.
CoinWorkDouble largestDualError() const
Largest error on basic duals.
bool gonePrimalFeasible_
gonePrimalFeasible.
int maximumBarrierIterations() const
Maximum iterations.
CoinWorkDouble dualObjective_
dualObjective.
bool fakeLower(int sequence) const
CoinWorkDouble diagonalScaleFactor_
diagonalScaleFactor.
void setGamma(CoinWorkDouble value)
double * rowObjective() const
Row Objective.
CoinWorkDouble baseObjectiveNorm_
baseObjectiveNorm
CoinWorkDouble * primalR_
Primal regularization array.
CoinWorkDouble linearPerturbation() const
linearPerturbation
CoinWorkDouble diagonalPerturbation() const
diagonalPerturbation
bool goneDualFeasible_
goneDualFeasible.
CoinWorkDouble projectionTolerance_
projectionTolerance
CoinWorkDouble maximumBoundInfeasibility_
maximumBoundInfeasibility.
CoinWorkDouble * zVec_
zVec
friend void ClpInteriorUnitTest(const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the ClpInterior class.
bool fixedOrFree(int sequence) const
void clearFakeLower(int sequence)
void ClpInteriorUnitTest(const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the ClpInterior class.
Base class for Clp Cholesky factorization Will do better factorization.
******** DATA to be moved into protected section of ClpInterior
#define LENGTH_HISTORY
historyInfeasibility.
CoinWorkDouble * rhsW_
rhsW.
void setDelta(CoinWorkDouble value)
CoinWorkDouble smallestInfeasibility_
smallestInfeasibility
CoinWorkDouble gamma() const
gamma
void clearUpperBound(int sequence)
CoinWorkDouble maximumRHSError_
maximumRHSError. maximum Ax
int numberComplementarityItems_
numberComplementarityItems_ i.e. number of active bounds
CoinPackedMatrix * matrix() const
Matrix (if not ClpPackedmatrix be careful about memory leak.
int sequenceWithin(int sequence) const
Returns sequence number within section.
******** DATA to be moved into protected section of ClpInterior
void setFixedOrFree(int sequence)
To say a variable is fixed OR free.
CoinWorkDouble worstComplementarity_
Worst complementarity.
CoinWorkDouble projectionTolerance() const
projectionTolerance
CoinWorkDouble * columnLowerWork_
Column lower bounds - working copy.
bool primalFeasible() const
If problem is primal feasible.
CoinWorkDouble * diagonal_
diagonal
CoinWorkDouble * rhsL_
rhsL.
CoinWorkDouble * columnUpperWork_
Column upper bounds - working copy.
CoinWorkDouble * deltaW_
deltaW.
CoinWorkDouble historyInfeasibility_[LENGTH_HISTORY]
CoinWorkDouble maximumDualError_
maximumDualError.
void setMaximumBarrierIterations(int value)
int readMps(const char *filename, bool keepNames=false, bool ignoreErrors=false)
Read an mps file from the given filename.
void setUpperBound(int sequence)
To say a variable has upper bound.
int numberFixed() const
Return number fixed to see if worth presolving.
CoinWorkDouble primalObjective_
primalObjective.
******** DATA to be moved into protected section of ClpInterior
CoinWorkDouble solutionNorm_
solutionNorm.
CoinWorkDouble actualPrimalStep_
actualPrimalStep
void clearFlagged(int sequence)
ClpLsqr * lsqrObject_
Pointer to Lsqr object.
bool lowerBound(int sequence) const
CoinWorkDouble diagonalPerturbation_
diagonalPerturbation
CoinWorkDouble diagonalNorm() const
diagonalNorm
int isColumn(int sequence) const
Returns 1 if sequence indicates column.
void clearFixedOrFree(int sequence)
CoinWorkDouble * primalR() const
Primal erturbation vector.
CoinWorkDouble rhsNorm_
rhsNorm.
CoinWorkDouble * rhsC_
rhs C
CoinWorkDouble primalObjective() const
primalObjective.
int pdco()
Pdco algorithm - see ClpPdco.hpp for method.
void setLowerBound(int sequence)
To say a variable has lower bound.
CoinWorkDouble rawObjectiveValue() const
Raw objective value (so always minimize)
int numberColumns_
Number of columns.
int algorithm_
Which algorithm being used.
CoinWorkDouble * deltaSU_
deltaS.
~ClpInterior()
Destructor.
Abstract base class for Clp Matrices.
bool sanityCheck()
Sanity check on input rim data.
CoinWorkDouble targetGap_
targetGap
CoinWorkDouble maximumRHSChange_
maximumRHSChange
CoinWorkDouble * errorRegion_
errorRegion. i.e. Ax
CoinWorkDouble complementarityGap() const
ComplementarityGap.
CoinWorkDouble delta() const
delta
CoinWorkDouble * deltaY_
delta Y
CoinWorkDouble stepLength_
stepLength
void setCholesky(ClpCholeskyBase *cholesky)
Set cholesky (and delete present one)
CoinWorkDouble * deltaX_
delta X
CoinWorkDouble * upperSlack_
upperSlack
CoinWorkDouble scaleFactor_
scaleFactor. For scaling objective
int maximumBarrierIterations_
Maximum iterations.
void returnModel(ClpModel &otherModel)
Return model - updates any scalars.
CoinWorkDouble * rhs_
Rhs.
CoinWorkDouble * lowerSlack_
lowerSlack
bool createWorkingData()
Returns true if data looks okay, false if not.
CoinWorkDouble * rhsFixRegion_
rhsFixRegion.
double objectiveValue_
Objective value.
void clearLowerBound(int sequence)
void clearFixed(int sequence)
void clearFakeUpper(int sequence)
CoinWorkDouble actualDualStep_
actualDualStep
CoinWorkDouble * rhsU_
rhsU.
void setLinearPerturbation(CoinWorkDouble value)
Abstract base class for tailoring everything for Pcdo.
CoinWorkDouble * wVec_
wVec
CoinWorkDouble * rhsZ_
rhsZ.
void borrowModel(ClpModel &otherModel)
Borrow model.
CoinWorkDouble linearPerturbation_
linearPerturbation
void setFakeLower(int sequence)
To say a variable has fake lower bound.
ClpInterior()
Default constructor.
This solves LPs using interior point methods.
CoinWorkDouble worstDirectionAccuracy_
worstDirectionAccuracy
bool fixed(int sequence) const
CoinWorkDouble * deltaSL_
CoinWorkDouble * rhsB_
rhs B
CoinWorkDouble sumPrimalInfeasibilities_
Sum of primal infeasibilities.
int numberComplementarityPairs_
numberComplementarityPairs i.e. ones with lower and/or upper bounds (not fixed)
CoinWorkDouble complementarityGap_
complementarityGap.
CoinWorkDouble sumPrimalInfeasibilities() const
Sum of primal infeasibilities.
CoinWorkDouble * workArray_
work array
CoinWorkDouble dualObjective() const
dualObjective.
CoinWorkDouble mu_
Below here is standard barrier stuff mu.
void setFakeUpper(int sequence)
To say a variable has fake upper bound.
void setFlagged(int sequence)
To flag a variable.
ClpInterior & operator=(const ClpInterior &rhs)
Assignment operator. This copies the data.
int primalDual()
Primal-Dual Predictor-Corrector barrier.
bool fakeUpper(int sequence) const
void 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).
void gutsOfCopy(const ClpInterior &rhs)
Does most of copying.
unsigned char * status_
Status (i.e.
bool dualFeasible() const
If problem is dual feasible.
CoinWorkDouble * deltaZ_
deltaZ.
CoinWorkDouble largestDualError_
Largest error on basic duals.
void setDiagonalPerturbation(CoinWorkDouble value)
void setAlgorithm(int value)
Set algorithm.
CoinWorkDouble quadraticDjs(CoinWorkDouble *djRegion, const CoinWorkDouble *solution, CoinWorkDouble scaleFactor)
Modifies djs to allow for quadratic.
void checkSolution()
Checks solution.
CoinWorkDouble * upper_
Working copy of upper bounds (Owner of arrays below)
int numberColumns() const
void gutsOfDelete()
Does most of deletion.
CoinWorkDouble diagonalNorm_
diagonalNorm.
void setProjectionTolerance(CoinWorkDouble value)
CoinWorkDouble * rowUpperWork_
Row upper bounds - working copy.
CoinWorkDouble * dualR() const
Dual erturbation vector.
CoinWorkDouble * solution_
solution
int housekeeping()
This does housekeeping.
CoinWorkDouble * dualR_
Dual regularization array.
ClpPdcoBase * pdcoStuff_
Pointer to stuff.
CoinWorkDouble largestPrimalError() const
Largest error on Ax-b.
CoinWorkDouble sumDualInfeasibilities_
Sum of dual infeasibilities.
This class implements LSQR.
CoinWorkDouble * lower_
Working copy of lower bounds (Owner of arrays below)
void fixFixed(bool reallyFix=true)
fix variables interior says should be.
CoinWorkDouble * cost_
Working copy of objective.
bool flagged(int sequence) const
int algorithm() const
Current (or last) algorithm.
int numberRows() const
Number of rows.
void dropNames()
Drops names - makes lengthnames 0 and names empty.
CoinWorkDouble largestPrimalError_
Largest error on Ax-b.