Go to the documentation of this file.
91 return rightHandSide_;
97 return objCoefficients_;
109 return colType_[colIndex] ==
'C';
115 return colType_[colIndex] ==
'B';
121 return colType_[colIndex] ==
'B' || colType_[colIndex] ==
'I';
127 return colType_[colIndex] ==
'I';
133 return colType_[colIndex] ==
'B' && colUpper_[colIndex] > colLower_[colIndex];
157 return originalMatrixByRow_;
163 return originalMatrixByCol_;
196 return doNotSeparateThis_;
224 return dualTolerance_;
230 return primalTolerance_;
236 return integerTolerance_;
242 return integerUpperBound_;
248 return integerLowerBound_;
269 const double *collb,
const double *colub,
271 const double *rowlb,
const double *rowub,
272 bool makeRowCopy =
false);
295 numElements_ = value;
301 numIntegers_ = value;
305 void setColLower(
const double *array,
bool copyIn =
true);
308 void setColUpper(
const double *array,
bool copyIn =
true);
311 void setRowLower(
const double *array,
bool copyIn =
true);
314 void setRowUpper(
const double *array,
bool copyIn =
true);
345 void setColType(
const char *array,
bool copyIn =
true);
366 void setRowPrice(
const double *array,
bool copyIn =
true);
398 dualTolerance_ = value;
404 primalTolerance_ = value;
410 integerTolerance_ = value;
416 integerUpperBound_ = value;
422 integerLowerBound_ = value;
453 void gutsOfDestructor(
int type);
473 double dualTolerance_;
476 double primalTolerance_;
479 double integerTolerance_;
482 double integerUpperBound_;
485 double integerLowerBound_;
488 const double *colLower_;
491 const double *colUpper_;
494 const double *rowLower_;
497 const double *rowUpper_;
500 const double *rightHandSide_;
503 const double *objCoefficients_;
506 const char *colType_;
521 const double *colSolution_;
524 const double *rowPrice_;
527 const double *reducedCost_;
530 const double *rowActivity_;
533 const double *doNotSeparateThis_;
549 unsigned int colLower : 1;
550 unsigned int colUpper : 1;
551 unsigned int rowLower : 1;
552 unsigned int rowUpper : 1;
553 unsigned int rightHandSide : 1;
554 unsigned int objCoefficients : 1;
555 unsigned int colType : 1;
556 unsigned int matrixByRow : 1;
557 unsigned int matrixByCol : 1;
558 unsigned int originalMatrixByRow : 1;
559 unsigned int originalMatrixByCol : 1;
560 unsigned int colSolution : 1;
561 unsigned int rowPrice : 1;
562 unsigned int reducedCost : 1;
563 unsigned int rowActivity : 1;
564 unsigned int doNotSeparateThis : 1;
const double * getColUpper() const
Get pointer to array[getNumCols()] of column upper bounds.
void setRowActivity(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vecto...
const double * getObjCoefficients() const
Get pointer to array[getNumCols()] of objective function coefficients.
void setColSolution(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of primal variable values.
double getIntegerUpperBound() const
Get integer upper bound i.e. best solution * getObjSense.
void setObjCoefficients(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of objective function coefficients.
void setObjSense(double value)
Set objective function sense (1 for min (default), -1 for max)
bool isInteger(int colIndex) const
Return true if column is integer.
double getInfinity() const
Get solver's value for infinity.
double getObjOffset() const
Get objective offset i.e. sum c sub j * x subj -objValue = objOffset.
void setPrimalTolerance(double value)
Set primal tolerance.
double getObjValue() const
Get objective function value - includinbg any offset i.e.
double getIntegerTolerance() const
Get integer tolerance.
void setMatrixByCol(const CoinPackedMatrix *matrix, bool copyIn=true)
Set pointer to column-wise copy of current matrix.
void setObjOffset(double value)
Set objective offset i.e. sum c sub j * x subj -objValue = objOffset.
void setColUpper(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of column upper bounds.
void createMatrixByRow()
Create row-wise copy from MatrixByCol.
void setNumIntegers(int value)
Set number of integer variables.
const double * getReducedCost() const
Get a pointer to array[getNumCols()] of reduced costs.
void setDualTolerance(double value)
Set dual tolerance.
void setRowLower(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of row lower bounds.
void setRightHandSide(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of row right-hand sides This gives same results as OsiSolverInterf...
void createRightHandSide()
Create array[getNumRows()] of row right-hand sides using existing information This gives same results...
void setMatrixByRow(const CoinPackedMatrix *matrix, bool copyIn=true)
Set pointer to row-wise copy of current matrix.
const double * getColSolution() const
Get pointer to array[getNumCols()] of primal variable values.
void setRowPrice(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of dual variable values.
int getNumCols() const
Get number of columns.
void setColType(const char *array, bool copyIn=true)
Set colType array ('B', 'I', or 'C' for Binary, Integer and Continuous)
void setRowUpper(const double *array, bool copyIn=true)
Set pointer to array[getNumRows()] of row upper bounds.
CoinSnapshot()
Default Constructor.
const CoinPackedMatrix * getOriginalMatrixByRow() const
Get pointer to row-wise copy of "original" matrix.
int getNumIntegers() const
Get number of integer variables.
void setReducedCost(const double *array, bool copyIn=true)
Set a pointer to array[getNumCols()] of reduced costs.
const double * getRowLower() const
Get pointer to array[getNumRows()] of row lower bounds.
void setIntegerTolerance(double value)
Set integer tolerance.
void setOriginalMatrixByCol(const CoinPackedMatrix *matrix, bool copyIn=true)
Set pointer to column-wise copy of "original" matrix.
const double * getDoNotSeparateThis() const
Get pointer to array[getNumCols()] of primal variable values which should not be separated (for debug...
const CoinPackedMatrix * getMatrixByRow() const
Get pointer to row-wise copy of current matrix.
void setDoNotSeparateThis(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of primal variable values which should not be separated (for debug...
const CoinPackedMatrix * getOriginalMatrixByCol() const
Get pointer to column-wise copy of "original" matrix.
const double * getRowUpper() const
Get pointer to array[getNumRows()] of row upper bounds.
bool isFreeBinary(int colIndex) const
Return true if variable is binary and not fixed at either bound.
const double * getRightHandSide() const
Get pointer to array[getNumRows()] of row right-hand sides This gives same results as OsiSolverInterf...
double getDualTolerance() const
Get dual tolerance.
void setNumRows(int value)
Set number of rows.
NON Abstract Base Class for interfacing with cut generators or branching code or .
void setNumCols(int value)
Set number of columns.
void setNumElements(int value)
Set number of nonzero elements.
Sparse Matrix Base Class.
void setColLower(const double *array, bool copyIn=true)
Set pointer to array[getNumCols()] of column lower bounds.
const double * getColLower() const
Get pointer to array[getNumCols()] of column lower bounds.
virtual ~CoinSnapshot()
Destructor.
double getIntegerLowerBound() const
Get integer lower bound i.e. best possible solution * getObjSense.
void setIntegerUpperBound(double value)
Set integer upper bound i.e. best solution * getObjSense.
int getNumElements() const
Get number of nonzero elements.
void loadProblem(const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub, bool makeRowCopy=false)
Load in an problem by copying the arguments (the constraints on the rows are given by lower and upper...
const double * getRowPrice() const
Get pointer to array[getNumRows()] of dual variable values.
bool isBinary(int colIndex) const
Return true if variable is binary.
CoinSnapshot & operator=(const CoinSnapshot &rhs)
Assignment operator.
const char * getColType() const
Get colType array ('B', 'I', or 'C' for Binary, Integer and Continuous)
bool isContinuous(int colIndex) const
Return true if variable is continuous.
void setObjValue(double value)
Set objective function value (including any rhs offset)
bool isIntegerNonBinary(int colIndex) const
Return true if variable is general integer.
const double * getRowActivity() const
Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vecto...
const CoinPackedMatrix * getMatrixByCol() const
Get pointer to column-wise copy of current matrix.
void setIntegerLowerBound(double value)
Set integer lower bound i.e. best possible solution * getObjSense.
void setOriginalMatrixByRow(const CoinPackedMatrix *matrix, bool copyIn=true)
Set pointer to row-wise copy of "original" matrix.
double getObjSense() const
Get objective function sense (1 for min (default), -1 for max)
double getPrimalTolerance() const
Get primal tolerance.
void setInfinity(double value)
Set solver's value for infinity.
int getNumRows() const
Get number of rows.