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