COIN OSI layer for dylp. More...
#include <OsiDylpSolverInterface.hpp>
Public Member Functions | |
Constructors and Destructors | |
OsiDylpSolverInterface () | |
Default constructor. More... | |
OsiDylpSolverInterface (const OsiDylpSolverInterface &src) | |
Copy constructor. More... | |
OsiSolverInterface * | clone (bool copyData=true) const |
Clone the solver object. More... | |
OsiDylpSolverInterface & | operator= (const OsiDylpSolverInterface &rhs) |
Assignment. More... | |
~OsiDylpSolverInterface () | |
Destructor. More... | |
void | reset () |
Reset the solver object to the state produced by the default constructor. More... | |
Methods to load a problem | |
int | readMps (const char *filename, const char *extension="mps") |
Read a problem description in MPS format from a file. More... | |
int | readMps (const char *filename, const char *extension, int &numberSets, CoinSet **&sets) |
Read a problem description in MPS format from a file, including SOS information. More... | |
void | writeMps (const char *basename, const char *extension="mps", double objsense=0.0) const |
Write the problem into the specified file in MPS format. More... | |
void | loadProblem (const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const char *rowsen, const double *rowrhs, const double *rowrng) |
Load a problem description (OSI packed matrix, row sense, parameters unaffected). More... | |
void | loadProblem (const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub) |
Load a problem description (OSI packed matrix, row bounds, parameters unaffected). More... | |
void | loadProblem (const int colcnt, const int rowcnt, const int *start, const int *index, const double *value, const double *collb, const double *colub, const double *obj, const char *sense, const double *rhsin, const double *range) |
Load a problem description (standard column-major packed matrix, row sense, parameters unaffected) More... | |
void | loadProblem (const int colcnt, const int rowcnt, const int *start, const int *index, const double *value, const double *collb, const double *colub, const double *obj, const double *row_lower, const double *row_upper) |
Load a problem description (standard column-major packed matrix, row bounds, parameters unaffected) More... | |
void | assignProblem (CoinPackedMatrix *&matrix, double *&collb, double *&colub, double *&obj, char *&rowsen, double *&rowrhs, double *&rowrng) |
Load a problem description (OSI packed matrix, row sense, parameters destroyed). More... | |
void | assignProblem (CoinPackedMatrix *&matrix, double *&collb, double *&colub, double *&obj, double *&rowlb, double *&rowub) |
Load a problem description (OSI packed matrix, row bounds, parameters destroyed). More... | |
Methods to obtain problem information | |
int | getNumCols () const |
Get the number of columns (variables) More... | |
int | getNumRows () const |
Get the number of rows (constraints) More... | |
int | getNumElements () const |
Get the number of non-zero coefficients. More... | |
int | getNumIntegers () const |
Get the number of integer variables. More... | |
const double * | getColLower () const |
Get the column (variable) lower bound vector. More... | |
const double * | getColUpper () const |
Get the column (variable) upper bound vector. More... | |
bool | isContinuous (int colIndex) const |
Return true if the variable is continuous. More... | |
bool | isBinary (int colIndex) const |
Return true if the variable is binary. More... | |
bool | isIntegerNonBinary (int colIndex) const |
Return true if the variable is general integer. More... | |
bool | isInteger (int colIndex) const |
Return true if the variable is integer (general or binary) More... | |
const char * | getRowSense () const |
Get the row sense (constraint type) vector. More... | |
const double * | getRightHandSide () const |
Get the row (constraint) right-hand-side vector. More... | |
const double * | getRowRange () const |
Get the row (constraint) range vector. More... | |
const double * | getRowLower () const |
Get the row (constraint) lower bound vector. More... | |
const double * | getRowUpper () const |
Get the row (constraint) upper bound vector. More... | |
const double * | getObjCoefficients () const |
Get the objective function coefficient vector. More... | |
double | getObjSense () const |
Get the objective function sense (min/max) More... | |
const CoinPackedMatrix * | getMatrixByRow () const |
Get a pointer to a row-major copy of the constraint matrix. More... | |
const CoinPackedMatrix * | getMatrixByCol () const |
Get a pointer to a column-major copy of the constraint matrix. More... | |
Methods to modify the problem | |
void | setContinuous (int index) |
Set a single variable to be continuous. More... | |
void | setContinuous (const int *indices, int len) |
Set a list of variables to be continuous. More... | |
void | setInteger (int index) |
Set a single variable to be integer. More... | |
void | setInteger (const int *indices, int len) |
Set a list of variables to be integer. More... | |
void | setColLower (int index, double value) |
Set the lower bound on a column (variable) More... | |
void | setColUpper (int index, double value) |
Set the upper bound on a column (variable) More... | |
void | setRowLower (int index, double value) |
Set the lower bound on a row (constraint) More... | |
void | setRowUpper (int index, double value) |
Set the upper bound on a row (constraint) More... | |
void | setRowType (int index, char rowsen, double rowrhs, double rowrng) |
Set the type of a row (constraint) More... | |
void | setObjCoeff (int index, double value) |
Set an objective function coefficient. More... | |
void | setObjSense (double sense) |
Set the sense (min/max) of the objective. More... | |
void | setColSolution (const double *colsol) |
Set the value of the primal variables in the problem solution. More... | |
void | setRowPrice (const double *) |
Set the value of the dual variables in the problem solution. More... | |
void | addCol (const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj) |
Add a column (variable) to the problem. More... | |
void | deleteCols (const int num, const int *colIndices) |
Remove column(s) (variable(s)) from the problem. More... | |
void | addRow (const CoinPackedVectorBase &row, const double rowlb, const double rowub) |
Add a row (constraint) to the problem. More... | |
void | addRow (const CoinPackedVectorBase &row, const char rowsen, const double rowrhs, const double rowrng) |
Add a row (constraint) to the problem. More... | |
void | deleteRows (const int num, const int *rowIndices) |
Delete row(s) (constraint(s)) from the problem. More... | |
void | applyRowCut (const OsiRowCut &cut) |
Apply a row (constraint) cut (add one constraint) More... | |
void | applyColCut (const OsiColCut &cut) |
Apply a column (variable) cut (adjust one or more bounds) More... | |
Solve methods | |
void | initialSolve () |
Solve an lp from scratch. More... | |
CoinWarmStart * | getEmptyWarmStart () const |
Get an empty OsiDylpWarmStartBasis object. More... | |
CoinWarmStart * | getWarmStart () const |
Build a warm start object for the current lp solution. More... | |
bool | setWarmStart (const CoinWarmStart *warmStart) |
Apply a warm start object. More... | |
void | resolve () |
Call dylp to reoptimize (warm start). More... | |
void | markHotStart () |
Create a hot start snapshot. More... | |
void | solveFromHotStart () |
Call dylp to reoptimize (hot start). More... | |
void | unmarkHotStart () |
Delete the hot start snapshot. More... | |
Methods returning solver termination status | |
bool | isAbandoned () const |
True if dylp abandoned the problem. More... | |
bool | isProvenOptimal () const |
True if dylp reported an optimal solution. More... | |
bool | isProvenPrimalInfeasible () const |
True if dylp reported the problem to be primal infeasible. More... | |
bool | isProvenDualInfeasible () const |
True if dylp reported the problem to be dual infeasible (primal unbounded) More... | |
bool | isIterationLimitReached () const |
True if dylp reached the iteration limit. More... | |
int | getIterationCount () const |
Get the number of iterations for the last lp. More... | |
bool | isPrimalObjectiveLimitReached () const |
Is the primal objective limit reached? More... | |
bool | isDualObjectiveLimitReached () const |
Is the dual objective limit reached? More... | |
Methods to set/get solver parameters | |
double | getInfinity () const |
Get dylp's value for infinity. More... | |
bool | setIntParam (OsiIntParam key, int value) |
Set an OSI integer parameter. More... | |
bool | setDblParam (OsiDblParam key, double value) |
Set an OSI double parameter. More... | |
bool | setStrParam (OsiStrParam key, const std::string &value) |
Set an OSI string parameter. More... | |
bool | setHintParam (OsiHintParam key, bool sense=true, OsiHintStrength strength=OsiHintTry, void *info=0) |
Set an OSI hint. More... | |
bool | getIntParam (OsiIntParam key, int &value) const |
Get an OSI integer parameter. More... | |
bool | getDblParam (OsiDblParam key, double &value) const |
Get an OSI double parameter. More... | |
bool | getStrParam (OsiStrParam key, std::string &value) const |
Get an OSI string parameter. More... | |
bool | getHintParam (OsiHintParam key, bool &sense, OsiHintStrength &strength, void *&info) const |
Get an OSI hint. More... | |
void | newLanguage (CoinMessages::Language language) |
Change the language for OsiDylp messages. More... | |
void | setLanguage (CoinMessages::Language language) |
An alias for OsiDylpSolverInterface::newLanguage. More... | |
Methods to obtain solution information | |
const double * | getColSolution () const |
Return the vector of primal variables for the solution. More... | |
const double * | getRowPrice () const |
Return the vector of dual variables for the solution. More... | |
const double * | getReducedCost () const |
Return the vector of reduced costs for the solution. More... | |
const double * | getRowActivity () const |
Return the vector of row activity for the solution. More... | |
double | getObjValue () const |
Get the objective function value for the solution. More... | |
Methods for row and column names. | |
Only the set methods need to be overridden to ensure consistent names between OsiDylp and the OSI base class. | |
void | setObjName (std::string name) |
Set the objective function name. More... | |
void | setRowName (int ndx, std::string name) |
Set a row name. More... | |
void | setColName (int ndx, std::string name) |
Set a column name. More... | |
Debugging Methods | |
void | activateRowCutDebugger (const char *modelName) |
Activate the row cut debugger. More... | |
void | activateRowCutDebugger (const double *solution) |
Activate the row cut debugger. More... | |
Dylp-specific methods | |
void | dylp_controlfile (const char *name, const bool silent, const bool mustexist=true) |
Process an options (.spc) file. More... | |
void | dylp_logfile (const char *name, bool echo=false) |
Establish a log file. More... | |
void | dylp_outfile (const char *name) |
Establish an output (solution and/or statistics) file. More... | |
void | dylp_printsoln (bool wantSoln, bool wantStats) |
Print the solution and/or statistics to the output file. More... | |
void | setOsiDylpMessages (CoinMessages::Language local_language) |
Set the language for messages. More... | |
Unsupported functions | |
void | branchAndBound () |
Invoke the solver's built-in branch-and-bound algorithm. More... | |
std::vector< double * > | getDualRays (int) const |
Get as many dual rays as the solver can provide. More... | |
std::vector< double * > | getPrimalRays (int) const |
Get as many primal rays as the solver can provide. More... | |
![]() | |
virtual bool | getHintParam (OsiHintParam key, bool &yesNo, OsiHintStrength &strength) const |
Get a hint parameter (sense and strength only) More... | |
virtual bool | getHintParam (OsiHintParam key, bool &yesNo) const |
Get a hint parameter (sense only) More... | |
void | copyParameters (OsiSolverInterface &rhs) |
Copy all parameters in this section from one solver to another. More... | |
double | getIntegerTolerance () const |
Return the integrality tolerance of the underlying solver. More... | |
virtual CoinWarmStart * | getPointerToWarmStart (bool &mustDelete) |
Get warm start information. More... | |
virtual bool | isFreeBinary (int colIndex) const |
Return true if variable is binary and not fixed at either bound. More... | |
const char * | columnType (bool refresh=false) const |
Return array of column length 0 - continuous 1 - binary (may get fixed to 0 or 1 later) 2 - general integer (may get fixed later) Deprecated usage. More... | |
virtual const char * | getColType (bool refresh=false) const |
Return array of column length 0 - continuous 1 - binary (may get fixed to 0 or 1 later) 2 - general integer (may get fixed later) More... | |
virtual CoinPackedMatrix * | getMutableMatrixByRow () const |
Get pointer to mutable row-wise copy of matrix (returns NULL if not meaningful) More... | |
virtual CoinPackedMatrix * | getMutableMatrixByCol () const |
Get pointer to mutable column-wise copy of matrix (returns NULL if not meaningful) More... | |
const double * | getStrictColSolution () |
Get pointer to an array[getNumCols()] of primal variable values that are guaranteed to be between the column lower and upper bounds. More... | |
virtual OsiVectorInt | getFractionalIndices (const double etol=1.e-05) const |
Get vector of indices of primal variables which are integer variables but have fractional values in the current solution. More... | |
virtual void | setObjCoeffSet (const int *indexFirst, const int *indexLast, const double *coeffList) |
Set a set of objective function coefficients. More... | |
virtual void | setObjective (const double *array) |
Set the objective coefficients for all columns. More... | |
virtual void | setColLower (const double *array) |
Set the lower bounds for all columns. More... | |
virtual void | setColUpper (const double *array) |
Set the upper bounds for all columns. More... | |
virtual void | setColBounds (int elementIndex, double lower, double upper) |
Set a single column lower and upper bound. More... | |
virtual void | setColSetBounds (const int *indexFirst, const int *indexLast, const double *boundList) |
Set the upper and lower bounds of a set of columns. More... | |
virtual void | setRowBounds (int elementIndex, double lower, double upper) |
Set a single row lower and upper bound. More... | |
virtual void | setRowSetBounds (const int *indexFirst, const int *indexLast, const double *boundList) |
Set the bounds on a set of rows. More... | |
virtual void | setRowSetTypes (const int *indexFirst, const int *indexLast, const char *senseList, const double *rhsList, const double *rangeList) |
Set the type of a set of rows. More... | |
virtual int | reducedCostFix (double gap, bool justInteger=true) |
Fix variables at bound based on reduced cost. More... | |
virtual std::string | dfltRowColName (char rc, int ndx, unsigned digits=7) const |
Generate a standard name of the form Rnnnnnnn or Cnnnnnnn. More... | |
virtual std::string | getObjName (unsigned maxLen=static_cast< unsigned >(std::string::npos)) const |
Return the name of the objective function. More... | |
virtual std::string | getRowName (int rowIndex, unsigned maxLen=static_cast< unsigned >(std::string::npos)) const |
Return the name of the row. More... | |
virtual const OsiNameVec & | getRowNames () |
Return a pointer to a vector of row names. More... | |
virtual void | setRowNames (OsiNameVec &srcNames, int srcStart, int len, int tgtStart) |
Set multiple row names. More... | |
virtual void | deleteRowNames (int tgtStart, int len) |
Delete len row names starting at index tgtStart. More... | |
virtual std::string | getColName (int colIndex, unsigned maxLen=static_cast< unsigned >(std::string::npos)) const |
Return the name of the column. More... | |
virtual const OsiNameVec & | getColNames () |
Return a pointer to a vector of column names. More... | |
virtual void | setColNames (OsiNameVec &srcNames, int srcStart, int len, int tgtStart) |
Set multiple column names. More... | |
virtual void | deleteColNames (int tgtStart, int len) |
Delete len column names starting at index tgtStart. More... | |
void | setRowColNames (const CoinMpsIO &mps) |
Set row and column names from a CoinMpsIO object. More... | |
void | setRowColNames (CoinModel &mod) |
Set row and column names from a CoinModel object. More... | |
void | setRowColNames (CoinLpIO &mod) |
Set row and column names from a CoinLpIO object. More... | |
virtual void | addCol (const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj, std::string name) |
Add a named column (primal variable) to the problem. More... | |
virtual void | addCol (int numberElements, const int *rows, const double *elements, const double collb, const double colub, const double obj) |
Add a column (primal variable) to the problem. More... | |
virtual void | addCol (int numberElements, const int *rows, const double *elements, const double collb, const double colub, const double obj, std::string name) |
Add a named column (primal variable) to the problem. More... | |
virtual void | addCols (const int numcols, const CoinPackedVectorBase *const *cols, const double *collb, const double *colub, const double *obj) |
Add a set of columns (primal variables) to the problem. More... | |
virtual void | addCols (const int numcols, const int *columnStarts, const int *rows, const double *elements, const double *collb, const double *colub, const double *obj) |
Add a set of columns (primal variables) to the problem. More... | |
void | addCols (const CoinBuild &buildObject) |
Add columns using a CoinBuild object. More... | |
int | addCols (CoinModel &modelObject) |
Add columns from a model object. More... | |
virtual void | addRow (const CoinPackedVectorBase &vec, const double rowlb, const double rowub, std::string name) |
Add a named row (constraint) to the problem. More... | |
virtual void | addRow (const CoinPackedVectorBase &vec, const char rowsen, const double rowrhs, const double rowrng, std::string name) |
Add a named row (constraint) to the problem. More... | |
virtual void | addRow (int numberElements, const int *columns, const double *element, const double rowlb, const double rowub) |
virtual void | addRows (const int numrows, const CoinPackedVectorBase *const *rows, const double *rowlb, const double *rowub) |
virtual void | addRows (const int numrows, const CoinPackedVectorBase *const *rows, const char *rowsen, const double *rowrhs, const double *rowrng) |
Add a set of rows (constraints) to the problem. More... | |
virtual void | addRows (const int numrows, const int *rowStarts, const int *columns, const double *element, const double *rowlb, const double *rowub) |
Add a set of rows (constraints) to the problem. More... | |
void | addRows (const CoinBuild &buildObject) |
Add rows using a CoinBuild object. More... | |
int | addRows (CoinModel &modelObject) |
virtual void | saveBaseModel () |
If solver wants it can save a copy of "base" (continuous) model here. More... | |
virtual void | restoreBaseModel (int numberRows) |
Strip off rows to get to this number of rows. More... | |
virtual ApplyCutsReturnCode | applyCuts (const OsiCuts &cs, double effectivenessLb=0.0) |
Apply a collection of cuts. More... | |
virtual void | applyRowCuts (int numberCuts, const OsiRowCut *cuts) |
Apply a collection of row cuts which are all effective. More... | |
virtual void | applyRowCuts (int numberCuts, const OsiRowCut **cuts) |
Apply a collection of row cuts which are all effective. More... | |
void | deleteBranchingInfo (int numberDeleted, const int *which) |
Deletes branching information before columns deleted. More... | |
virtual 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)=0 |
Load in a problem by copying the arguments. The constraint matrix is is specified with standard column-major column starts / row indices / coefficients vectors. The constraints on the rows are given by lower and upper bounds. More... | |
virtual 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 char *rowsen, const double *rowrhs, const double *rowrng)=0 |
Load in a problem by copying the arguments. The constraint matrix is is specified with standard column-major column starts / row indices / coefficients vectors. The constraints on the rows are given by sense/rhs/range triplets. More... | |
virtual int | loadFromCoinModel (CoinModel &modelObject, bool keepSolution=false) |
Load a model from a CoinModel object. Return the number of errors encountered. More... | |
virtual int | readGMPL (const char *filename, const char *dataname=NULL) |
Read a problem in GMPL format from the given filenames. More... | |
int | writeMpsNative (const char *filename, const char **rowNames, const char **columnNames, int formatType=0, int numberAcross=2, double objSense=0.0, int numberSOS=0, const CoinSet *setInfo=NULL) const |
Write the problem in MPS format to the specified file with more control over the output. More... | |
virtual void | writeLp (const char *filename, const char *extension="lp", double epsilon=1e-5, int numberAcross=10, int decimals=5, double objSense=0.0, bool useRowNames=true) const |
Write the problem into an Lp file of the given filename with the specified extension. More... | |
virtual void | writeLp (FILE *fp, double epsilon=1e-5, int numberAcross=10, int decimals=5, double objSense=0.0, bool useRowNames=true) const |
Write the problem into the file pointed to by the parameter fp. More... | |
int | writeLpNative (const char *filename, char const *const *const rowNames, char const *const *const columnNames, const double epsilon=1.0e-5, const int numberAcross=10, const int decimals=5, const double objSense=0.0, const bool useRowNames=true) const |
Write the problem into an Lp file. More... | |
int | writeLpNative (FILE *fp, char const *const *const rowNames, char const *const *const columnNames, const double epsilon=1.0e-5, const int numberAcross=10, const int decimals=5, const double objSense=0.0, const bool useRowNames=true) const |
Write the problem into the file pointed to by the parameter fp. More... | |
virtual int | readLp (const char *filename, const double epsilon=1e-5) |
Read file in LP format from file with name filename. More... | |
int | readLp (FILE *fp, const double epsilon=1e-5) |
Read file in LP format from the file pointed to by fp. More... | |
virtual void | replaceMatrixOptional (const CoinPackedMatrix &) |
I (JJF) am getting annoyed because I can't just replace a matrix. More... | |
virtual void | replaceMatrix (const CoinPackedMatrix &) |
And if it does matter (not used at present) More... | |
void | setApplicationData (void *appData) |
Set application data. More... | |
void | setAuxiliaryInfo (OsiAuxInfo *auxiliaryInfo) |
Create a clone of an Auxiliary Information object. More... | |
void * | getApplicationData () const |
Get application data. More... | |
OsiAuxInfo * | getAuxiliaryInfo () const |
Get pointer to auxiliary info object. More... | |
virtual void | passInMessageHandler (CoinMessageHandler *handler) |
Pass in a message handler. More... | |
void | newLanguage (CoinMessages::Language language) |
Set language. More... | |
void | setLanguage (CoinMessages::Language language) |
Pass in a message handler. More... | |
CoinMessageHandler * | messageHandler () const |
Return a pointer to the current message handler. More... | |
CoinMessages | messages () |
Return the current set of messages. More... | |
CoinMessages * | messagesPointer () |
Return a pointer to the current set of messages. More... | |
bool | defaultHandler () const |
Return true if default handler. More... | |
void | findIntegers (bool justCount) |
Identify integer variables and create corresponding objects. More... | |
virtual int | findIntegersAndSOS (bool justCount) |
Identify integer variables and SOS and create corresponding objects. More... | |
int | numberObjects () const |
Get the number of objects. More... | |
void | setNumberObjects (int number) |
Set the number of objects. More... | |
OsiObject ** | objects () const |
Get the array of objects. More... | |
const OsiObject * | object (int which) const |
Get the specified object. More... | |
OsiObject * | modifiableObject (int which) const |
Get the specified object. More... | |
void | deleteObjects () |
Delete all object information. More... | |
void | addObjects (int numberObjects, OsiObject **objects) |
Add in object information. More... | |
double | forceFeasible () |
Use current solution to set bounds so current integer feasible solution will stay feasible. More... | |
const OsiRowCutDebugger * | getRowCutDebugger () const |
Get the row cut debugger. More... | |
const OsiRowCutDebugger * | getRowCutDebuggerAlways () const |
If you want to get debugger object even if not on optimal path then use this. More... | |
virtual int | canDoSimplexInterface () const |
Returns 1 if can just do getBInv etc 2 if has all OsiSimplex methods and 0 if it has none. More... | |
virtual void | enableSimplexInterface (bool doingPrimal) |
Enables normal operation of subsequent functions. More... | |
virtual void | disableSimplexInterface () |
Undo whatever setting changes the above method had to make. More... | |
virtual void | enableFactorization () const |
Tells solver that calls to getBInv etc are about to take place. More... | |
virtual void | disableFactorization () const |
and stop More... | |
virtual bool | basisIsAvailable () const |
Returns true if a basis is available AND problem is optimal. More... | |
bool | optimalBasisIsAvailable () const |
Synonym for basisIsAvailable! More... | |
virtual void | getBasisStatus (int *cstat, int *rstat) const |
The following two methods may be replaced by the methods of OsiSolverInterface using OsiWarmStartBasis if: More... | |
virtual int | setBasisStatus (const int *cstat, const int *rstat) |
Set the status of structural/artificial variables and factorize, update solution etc. More... | |
virtual int | pivot (int colIn, int colOut, int outStatus) |
Perform a pivot by substituting a colIn for colOut in the basis. More... | |
virtual int | primalPivotResult (int colIn, int sign, int &colOut, int &outStatus, double &t, CoinPackedVector *dx) |
Obtain a result of the primal pivot Outputs: colOut – leaving column, outStatus – its status, t – step size, and, if dx!=NULL, *dx – primal ray direction. More... | |
virtual int | dualPivotResult (int &colIn, int &sign, int colOut, int outStatus, double &t, CoinPackedVector *dx) |
Obtain a result of the dual pivot (similar to the previous method) Differences: entering variable and a sign of its change are now the outputs, the leaving variable and its statuts – the inputs If dx!=NULL, then *dx contains dual ray Return code: same. More... | |
virtual void | getReducedGradient (double *columnReducedCosts, double *duals, const double *c) |
Get the reduced gradient for the cost vector c. More... | |
virtual void | setObjectiveAndRefresh (double *c) |
Set a new objective and apply the old basis so that the reduced costs are properly updated. More... | |
virtual void | getBInvARow (int row, double *z, double *slack=NULL) const |
Get a row of the tableau (slack part in slack if not NULL) More... | |
virtual void | getBInvRow (int row, double *z) const |
Get a row of the basis inverse. More... | |
virtual void | getBInvACol (int col, double *vec) const |
Get a column of the tableau. More... | |
virtual void | getBInvCol (int col, double *vec) const |
Get a column of the basis inverse. More... | |
virtual void | getBasics (int *index) const |
Get basic indices (order of indices corresponds to the order of elements in a vector retured by getBInvACol() and getBInvCol()). More... | |
OsiSolverInterface () | |
Default Constructor. More... | |
OsiSolverInterface (const OsiSolverInterface &) | |
Copy constructor. More... | |
OsiSolverInterface & | operator= (const OsiSolverInterface &rhs) |
Assignment operator. More... | |
virtual | ~OsiSolverInterface () |
Destructor. More... | |
Private Member Functions | |
Helper functions for presolve | |
Functions used to access the CoinPresolve capabilities. There are no public functions associated with presolve — the only control is the OsiDoPresolveInInitial and OsiDoPresolveInResolve hints. The functions declared here do the work. See OsiDylpPresolve.cpp for additional explanation. | |
CoinPresolveMatrix * | initialisePresolve (bool keepIntegers) |
Create and load a presolve object. More... | |
void | doPresolve () |
Perform presolve transformations. More... | |
bool | evalPresolve () |
Decide whether presolve was effective enough to use. More... | |
void | saveOriginalSys () |
Save the original problem. More... | |
void | installPresolve () |
Load the presolved problem into the ODSI object. More... | |
CoinPostsolveMatrix * | initialisePostsolve (CoinPresolveMatrix *&preObj) |
Create and load a postsolve object. More... | |
void | doPostsolve () |
Apply the postsolve transforms from postActions_. More... | |
void | installPostsolve () |
Reload the original constraint system with the postsolved basis. More... | |
void | destruct_presolve () |
Delete presolve information. More... | |
Helper functions for problem construction | |
void | construct_lpprob () |
void | construct_options () |
void | construct_consys (int cols, int rows) |
void | dylp_ioinit () |
void | gen_rowparms (int rowcnt, double *rhs, double *rhslow, contyp_enum *ctyp, const double *rowlb, const double *rowub) |
void | gen_rowparms (int rowcnt, double *rhs, double *rhslow, contyp_enum *ctyp, const char *sense, const double *rhsin, const double *range) |
void | load_problem (const CoinMpsIO &mps) |
void | load_problem (const CoinPackedMatrix &matrix, const double *col_lower, const double *col_upper, const double *obj, const contyp_enum *ctyp, const double *rhs, const double *rhslow) |
void | load_problem (const int colcnt, const int rowcnt, const int *start, const int *lens, const int *index, const double *value, const double *col_lower, const double *col_upper, const double *obj, const contyp_enum *ctyp, const double *rhs, const double *rhslow) |
Helper functions for invoking dylp | |
lpret_enum | do_lp (ODSI_start_enum start) |
Common core method to invoke dylp. More... | |
Destructor helpers | |
void | destruct_col_cache (bool structure) |
void | destruct_row_cache (bool structure) |
void | destruct_cache (bool rowStructure, bool colStructure) |
void | destruct_problem (bool preserve_interface) |
void | detach_dylp () |
Static Private Member Functions | |
Copy helpers | |
Copy function templates for simple vectors and fixed-size objects, and specializations for various complex structures. | |
template<class T > | |
static void | copy (const T *src, T *dst, int n) |
template<class T > | |
static T * | copy (const T *src, int n) |
template<class T > | |
static T * | copy (const T *src) |
static basis_struct * | copy_basis (const basis_struct *src, int dstsze) |
static void | copy_basis (const basis_struct *src, basis_struct *dst) |
static lpprob_struct * | copy_lpprob (const lpprob_struct *src) |
Copy verification functions | |
Copy verification functions, to check that two structures are identical. | |
template<class T > | |
static void | assert_same (const T &t1, const T &t2, bool exact) |
template<class T > | |
static void | assert_same (const T *t1, const T *t2, int n, bool exact) |
static void | assert_same (double d1, double d2, bool exact) |
static void | assert_same (const basis_struct &b1, const basis_struct &b2, bool exact) |
static void | assert_same (const consys_struct &c1, const consys_struct &c2, bool exact) |
static void | assert_same (const conbnd_struct &c1, const conbnd_struct &c2, bool exact) |
static void | assert_same (const lpprob_struct &l1, const lpprob_struct &l2, bool exact) |
static void | assert_same (const OsiDylpSolverInterface &o1, const OsiDylpSolverInterface &o2, bool exact) |
Vector helper functions | |
template<class T > | |
static T * | idx_vec (T *data) |
static int | idx (int i) |
template<class T > | |
static T * | inv_vec (T *data) |
static int | inv (int i) |
static pkvec_struct * | packed_vector (const CoinShallowPackedVector vector, int dimension) |
static void | packed_vector (const CoinShallowPackedVector vector, int dimension, pkvec_struct *dst) |
File i/o helper routines | |
static std::string | make_filename (const char *filename, const char *ext1, const char *ext2) |
Private Attributes | |
Cached problem information | |
Problem information is cached for efficiency, to avoid repeated reconstruction of OSI structures from dylp structures. | |
double | _objval |
double * | _col_obj |
double * | _col_x |
double * | _col_cbar |
double * | _row_rhs |
double * | _row_lower |
double * | _row_upper |
char * | _row_sense |
double * | _row_range |
double * | _row_lhs |
double * | _row_price |
CoinPackedMatrix * | _matrix_by_col |
CoinPackedMatrix * | _matrix_by_row |
Data for presolve | |
Data related to the use of the CoinPresolve capabilities (which see for further information). | |
CoinPresolveMatrix * | preObj_ |
The presolve object. More... | |
const CoinPresolveAction * | postActions_ |
List of postsolve actions. More... | |
CoinPostsolveMatrix * | postObj_ |
The postsolve object. More... | |
int | passLimit_ |
Limit for iterations of the major presolve loop. More... | |
bool | keepIntegers_ |
true if presolve should consider integrality More... | |
consys_struct * | savedConsys_ |
Saved copy of original problem. More... | |
double * | saved_col_obj |
Saved pointers to cached structural vectors. More... | |
double * | saved_row_rhs |
The presolve object. More... | |
double * | saved_row_lower |
The presolve object. More... | |
double * | saved_row_upper |
The presolve object. More... | |
char * | saved_row_sense |
The presolve object. More... | |
double * | saved_row_range |
The presolve object. More... | |
CoinPackedMatrix * | saved_matrix_by_col |
The presolve object. More... | |
CoinPackedMatrix * | saved_matrix_by_row |
The presolve object. More... | |
Static Private Attributes | |
Dylp residual control variables | |
static int | reference_count |
static bool | basis_ready |
static OsiDylpSolverInterface * | dylp_owner |
Friends | |
int | OsiDylpSolverInterfaceUnitTest (const std::string &mpsDir, const std::string &netLibDir) |
Unit test for OsiDylpSolverInterface. More... | |
Dylp data structures | |
These fields hold pointers to the data structures which are used to pass an lp problem to dylp. | |
lpopts_struct * | initialSolveOptions |
lpopts_struct * | resolveOptions |
lptols_struct * | tolerances |
consys_struct * | consys |
lpprob_struct * | lpprob |
lpstats_struct * | statistics |
Solver instance control variables | |
These variables maintain state for individual ODSI instances. | |
enum | basisCondition { basisNone = 0, basisFresh, basisModified, basisDamaged } |
Codes for basis condition. More... | |
ioid | local_outchn |
Output file for this ODSI instance. More... | |
ioid | local_logchn |
Log file for this ODSI instance. More... | |
bool | initial_gtxecho |
Controls output of log information to stdout during initialSolve() More... | |
bool | resolve_gtxecho |
Controls output of log information to stdout during resolve() and solveFromHotStart() More... | |
lpret_enum | lp_retval |
Result of last call to solver for this ODSI instance. More... | |
double | obj_sense |
Objective function sense for this ODSI instance. More... | |
double | odsiInfinity |
The value of infinity. More... | |
const std::string | solvername |
Solver name (dylp). More... | |
void * | info_ [OsiLastHintParam] |
Array for info blocks associated with hints. More... | |
bool | mps_debug |
Allow messages from CoinMpsIO package. More... | |
CoinWarmStart * | hotstart_fallback |
Warm start object used as a fallback for hot start. More... | |
struct { | |
CoinWarmStart * basis | |
basisCondition condition | |
int balance | |
} | activeBasis |
Active basis. More... | |
bool | solnIsFresh |
The most recent solution from dylp is valid. More... | |
Helper functions for problem modification | |
void | add_col (const CoinPackedVectorBase &coin_coli, vartyp_enum vtypi, double vlbi, double vubi, double obji, const std::string *nme) |
void | add_row (const CoinPackedVectorBase &coin_rowi, char clazzi, contyp_enum ctypi, double rhsi, double rhslowi, const std::string *nme) |
void | calc_objval () |
contyp_enum | bound_to_type (double lower, double upper) |
void | gen_rowiparms (contyp_enum *ctypi, double *rhsi, double *rhslowi, char sensei, double rhsini, double rangei) |
void | gen_rowiparms (contyp_enum *ctypi, double *rhsi, double *rhslowi, double rowlbi, double rowubi) |
void | unimp_hint (bool dylpSense, bool hintSense, OsiHintStrength hintStrength, const char *msgString) |
void | pessimal_primal () |
void | reduceActiveBasis () |
static contyp_enum | sense_to_type (char type) |
static char | type_to_sense (contyp_enum type) |
Additional Inherited Members | |
![]() | |
typedef std::vector< std::string > | OsiNameVec |
Data type for name vectors. More... | |
![]() | |
void | convertBoundToSense (const double lower, const double upper, char &sense, double &right, double &range) const |
A quick inlined function to convert from the lb/ub style of constraint definition to the sense/rhs/range style. More... | |
void | convertSenseToBound (const char sense, const double right, const double range, double &lower, double &upper) const |
A quick inlined function to convert from the sense/rhs/range style of constraint definition to the lb/ub style. More... | |
template<class T > | |
T | forceIntoRange (const T value, const T lower, const T upper) const |
A quick inlined function to force a value to be between a minimum and a maximum value. More... | |
void | setInitialData () |
Set OsiSolverInterface object state for default constructor. More... | |
![]() | |
OsiRowCutDebugger * | rowCutDebugger_ |
Pointer to row cut debugger object. More... | |
CoinMessageHandler * | handler_ |
Message handler. More... | |
bool | defaultHandler_ |
Flag to say if the currrent handler is the default handler. More... | |
CoinMessages | messages_ |
Messages. More... | |
int | numberIntegers_ |
Number of integers. More... | |
int | numberObjects_ |
Total number of objects. More... | |
OsiObject ** | object_ |
Integer and ... information (integer info normally at beginning) More... | |
char * | columnType_ |
Column type 0 - continuous 1 - binary (may get fixed later) 2 - general integer (may get fixed later) More... | |
COIN OSI layer for dylp.
The class OsiDylpSolverInterface (ODSI) implements the public functions defined for a COIN OsiSolverInterface (OSI) object.
In addition to the principles outlined for the OsiSolverInterface class, ODSI maintains the following:
Construction of a Constraint System: A constraint system can be batch loaded from a file (MPS format) or from a data structure, or it can be built incrementally. When building a constraint system incrementally, keep in mind that you must create a row or column (addRow or addCol, respectively) before you can adjust other properties (row or column bounds, objective, variable values, etc.)
Existence of a Solution: For proper operation, OSI requires that a SI maintain a basic primal solution at all times after a problem has been loaded.
When a problem is loaded, ODSI generates a basic primal solution (primal variable values and a matching basis). The solution is not necessarily primal or dual feasible. In terms of the objective function, this solution is pessimistic, but not necessarily worst-case. ODSI does not generate matching values for the dual variables (row prices).
Any successful call to dylp (i.e., a call that results in an optimal, infeasible, or unbounded result, or that terminates on iteration limit) will replace the existing solution with the result of the call to dylp.
It is possible to specify initial values for the primal and dual variables using setColSolution() and setRowPrice(). To specify an initial basis, see the documentation for the CoinWarmStartBasis and OsiDylpWarmStartBasis classes. When these functions are used, it is the responsibility of the client to ensure validity and consistency.
Maintenance of an LP Basis Skirting the edges of the principle that changing the problem invalidates the solution, OsiDylp will maintain a valid basis across two common operations used in branch-and-cut: deletion of a loose constraint and deletion of a nonbasic variable. Arguably the set of allowable modifications could be increased.
Assignment Assignment (operator=()) works pretty much as you'd expect, with one exception. Only one ODSI object can control the dylp solver at a time, so hot start information is not copied on assignment.
Detailed documentation is contained in OsiDylpSolverInterface.cpp, which is not normally scanned when generating COIN OSI layer documentation.
Definition at line 100 of file OsiDylpSolverInterface.hpp.
|
private |
Codes for basis condition.
`Good' modifications are deletion of a loose constraint (specifically, a constraint with a basic logical) or a variable at bound (specifically, a nonbasic variable). `Bad' modifications are deletion of a tight constraint (specifically, a constraint with a nonbasic logical) or deletion of a variable not at bound (specifically, a basic variable). Bad modifications will in general cause the basis to be primal and/or dual infeasible after it's patched up.
A subtle point: basisModified will also be used in situations where ODSI has constructed a basis but not set it into a lpprob structure. This is the case when a solution is invented for a newly loaded problem.
Enumerator | |
---|---|
basisNone | |
basisFresh | |
basisModified | |
basisDamaged |
Definition at line 818 of file OsiDylpSolverInterface.hpp.
OsiDylpSolverInterface::OsiDylpSolverInterface | ( | ) |
Default constructor.
OsiDylpSolverInterface::OsiDylpSolverInterface | ( | const OsiDylpSolverInterface & | src) |
Copy constructor.
OsiDylpSolverInterface::~OsiDylpSolverInterface | ( | ) |
Destructor.
|
virtual |
Clone the solver object.
Implements OsiSolverInterface.
OsiDylpSolverInterface& OsiDylpSolverInterface::operator= | ( | const OsiDylpSolverInterface & | rhs) |
Assignment.
|
virtual |
Reset the solver object to the state produced by the default constructor.
Reimplemented from OsiSolverInterface.
|
virtual |
Read a problem description in MPS format from a file.
Reimplemented from OsiSolverInterface.
|
virtual |
Read a problem description in MPS format from a file, including SOS information.
Reimplemented from OsiSolverInterface.
|
virtual |
Write the problem into the specified file in MPS format.
objsense
== 1 forces the file to be written as a maximisation problem, while -1 forces a minimisation problem. The default of 0 writes the file as maximisation or minimisation using the solver's current setting.
Implements OsiSolverInterface.
|
virtual |
Load a problem description (OSI packed matrix, row sense, parameters unaffected).
Implements OsiSolverInterface.
|
virtual |
Load a problem description (OSI packed matrix, row bounds, parameters unaffected).
Implements OsiSolverInterface.
void OsiDylpSolverInterface::loadProblem | ( | const int | colcnt, |
const int | rowcnt, | ||
const int * | start, | ||
const int * | index, | ||
const double * | value, | ||
const double * | collb, | ||
const double * | colub, | ||
const double * | obj, | ||
const char * | sense, | ||
const double * | rhsin, | ||
const double * | range | ||
) |
Load a problem description (standard column-major packed matrix, row sense, parameters unaffected)
void OsiDylpSolverInterface::loadProblem | ( | const int | colcnt, |
const int | rowcnt, | ||
const int * | start, | ||
const int * | index, | ||
const double * | value, | ||
const double * | collb, | ||
const double * | colub, | ||
const double * | obj, | ||
const double * | row_lower, | ||
const double * | row_upper | ||
) |
Load a problem description (standard column-major packed matrix, row bounds, parameters unaffected)
|
virtual |
Load a problem description (OSI packed matrix, row sense, parameters destroyed).
Implements OsiSolverInterface.
|
virtual |
Load a problem description (OSI packed matrix, row bounds, parameters destroyed).
Implements OsiSolverInterface.
|
virtual |
Get the number of columns (variables)
Implements OsiSolverInterface.
|
virtual |
Get the number of rows (constraints)
Implements OsiSolverInterface.
|
virtual |
Get the number of non-zero coefficients.
Implements OsiSolverInterface.
|
virtual |
Get the number of integer variables.
Counts both binary and general integer variables.
Reimplemented from OsiSolverInterface.
|
virtual |
Get the column (variable) lower bound vector.
Implements OsiSolverInterface.
|
virtual |
Get the column (variable) upper bound vector.
Implements OsiSolverInterface.
|
virtual |
Return true if the variable is continuous.
Implements OsiSolverInterface.
|
virtual |
Return true if the variable is binary.
Reimplemented from OsiSolverInterface.
|
virtual |
Return true if the variable is general integer.
Reimplemented from OsiSolverInterface.
|
virtual |
Return true if the variable is integer (general or binary)
Reimplemented from OsiSolverInterface.
|
virtual |
Get the row sense (constraint type) vector.
Implements OsiSolverInterface.
|
virtual |
Get the row (constraint) right-hand-side vector.
Implements OsiSolverInterface.
|
virtual |
Get the row (constraint) range vector.
Implements OsiSolverInterface.
|
virtual |
Get the row (constraint) lower bound vector.
Implements OsiSolverInterface.
|
virtual |
Get the row (constraint) upper bound vector.
Implements OsiSolverInterface.
|
virtual |
Get the objective function coefficient vector.
Implements OsiSolverInterface.
|
virtual |
Get the objective function sense (min/max)
A value of 1 indicates minimisation; -1 indicates maximisation.
Implements OsiSolverInterface.
|
virtual |
Get a pointer to a row-major copy of the constraint matrix.
Implements OsiSolverInterface.
|
virtual |
Get a pointer to a column-major copy of the constraint matrix.
Implements OsiSolverInterface.
|
virtual |
Set a single variable to be continuous.
Implements OsiSolverInterface.
|
virtual |
Set a list of variables to be continuous.
Reimplemented from OsiSolverInterface.
|
virtual |
Set a single variable to be integer.
Implements OsiSolverInterface.
|
virtual |
Set a list of variables to be integer.
Reimplemented from OsiSolverInterface.
|
virtual |
Set the lower bound on a column (variable)
Implements OsiSolverInterface.
|
virtual |
Set the upper bound on a column (variable)
Implements OsiSolverInterface.
|
virtual |
Set the lower bound on a row (constraint)
Implements OsiSolverInterface.
|
virtual |
Set the upper bound on a row (constraint)
Implements OsiSolverInterface.
|
virtual |
Set the type of a row (constraint)
Implements OsiSolverInterface.
|
virtual |
Set an objective function coefficient.
Implements OsiSolverInterface.
|
virtual |
Set the sense (min/max) of the objective.
Use 1 for minimisation, -1 for maximisation. (The default is minimisation; the objective is multiplied by -1 to maximise.)
Implements OsiSolverInterface.
|
virtual |
Set the value of the primal variables in the problem solution.
Implements OsiSolverInterface.
|
virtual |
Set the value of the dual variables in the problem solution.
Implements OsiSolverInterface.
|
virtual |
Add a column (variable) to the problem.
Implements OsiSolverInterface.
|
virtual |
Remove column(s) (variable(s)) from the problem.
Implements OsiSolverInterface.
|
virtual |
Add a row (constraint) to the problem.
Implements OsiSolverInterface.
|
virtual |
Add a row (constraint) to the problem.
Implements OsiSolverInterface.
|
virtual |
Delete row(s) (constraint(s)) from the problem.
Implements OsiSolverInterface.
|
virtual |
Apply a row (constraint) cut (add one constraint)
Implements OsiSolverInterface.
|
virtual |
Apply a column (variable) cut (adjust one or more bounds)
Implements OsiSolverInterface.
|
virtual |
Solve an lp from scratch.
Implements OsiSolverInterface.
|
virtual |
Get an empty OsiDylpWarmStartBasis object.
Implements OsiSolverInterface.
|
virtual |
Build a warm start object for the current lp solution.
Implements OsiSolverInterface.
|
virtual |
Apply a warm start object.
By definition, a null parameter is a request to synch the warm start basis with the solver. ODSI interprets a 0x0 basis as a request to remove warm start information.
Implements OsiSolverInterface.
|
virtual |
Call dylp to reoptimize (warm start).
Implements OsiSolverInterface.
|
virtual |
Create a hot start snapshot.
Reimplemented from OsiSolverInterface.
|
virtual |
Call dylp to reoptimize (hot start).
Reimplemented from OsiSolverInterface.
|
virtual |
Delete the hot start snapshot.
Reimplemented from OsiSolverInterface.
|
virtual |
True if dylp abandoned the problem.
Implements OsiSolverInterface.
|
virtual |
True if dylp reported an optimal solution.
Implements OsiSolverInterface.
|
virtual |
True if dylp reported the problem to be primal infeasible.
Implements OsiSolverInterface.
|
virtual |
True if dylp reported the problem to be dual infeasible (primal unbounded)
Implements OsiSolverInterface.
|
virtual |
True if dylp reached the iteration limit.
Implements OsiSolverInterface.
|
virtual |
Get the number of iterations for the last lp.
Implements OsiSolverInterface.
|
virtual |
Is the primal objective limit reached?
Put in different terms, quit when the objective value becomes better than the given limit for an acceptable value.
Implements OsiSolverInterface.
|
virtual |
Is the dual objective limit reached?
Put in different terms, quit when the objective value becomes worse than the given limit for an acceptable value.
Implements OsiSolverInterface.
|
virtual |
Get dylp's value for infinity.
Implements OsiSolverInterface.
|
virtual |
Set an OSI integer parameter.
Reimplemented from OsiSolverInterface.
|
virtual |
Set an OSI double parameter.
Reimplemented from OsiSolverInterface.
|
virtual |
Set an OSI string parameter.
Reimplemented from OsiSolverInterface.
|
virtual |
Set an OSI hint.
Reimplemented from OsiSolverInterface.
|
virtual |
Get an OSI integer parameter.
Reimplemented from OsiSolverInterface.
|
virtual |
Get an OSI double parameter.
Reimplemented from OsiSolverInterface.
|
virtual |
Get an OSI string parameter.
Reimplemented from OsiSolverInterface.
|
virtual |
Get an OSI hint.
Reimplemented from OsiSolverInterface.
|
inline |
Change the language for OsiDylp messages.
Definition at line 537 of file OsiDylpSolverInterface.hpp.
|
inline |
An alias for OsiDylpSolverInterface::newLanguage.
Definition at line 542 of file OsiDylpSolverInterface.hpp.
|
virtual |
Return the vector of primal variables for the solution.
Implements OsiSolverInterface.
|
virtual |
Return the vector of dual variables for the solution.
Implements OsiSolverInterface.
|
virtual |
Return the vector of reduced costs for the solution.
Implements OsiSolverInterface.
|
virtual |
Return the vector of row activity for the solution.
Implements OsiSolverInterface.
|
virtual |
Get the objective function value for the solution.
Implements OsiSolverInterface.
|
virtual |
Set the objective function name.
Reimplemented from OsiSolverInterface.
|
virtual |
Set a row name.
Quietly does nothing if the name discipline (OsiNameDiscipline) is auto. Quietly fails if the row index is invalid.
Reimplemented from OsiSolverInterface.
|
virtual |
Set a column name.
Quietly does nothing if the name discipline (OsiNameDiscipline) is auto. Quietly fails if the column index is invalid.
Reimplemented from OsiSolverInterface.
|
virtual |
Activate the row cut debugger.
Activate the debugger for a model known to the debugger. The debugger will consult an internal database for an optimal solution vector.
Reimplemented from OsiSolverInterface.
|
virtual |
Activate the row cut debugger.
Activate the debugger for a model not included in the debugger's internal database. solution
must be a full solution vector, but only the integer values need to be correct.
Reimplemented from OsiSolverInterface.
void OsiDylpSolverInterface::dylp_controlfile | ( | const char * | name, |
const bool | silent, | ||
const bool | mustexist = true |
||
) |
Process an options (.spc) file.
void OsiDylpSolverInterface::dylp_logfile | ( | const char * | name, |
bool | echo = false |
||
) |
Establish a log file.
void OsiDylpSolverInterface::dylp_outfile | ( | const char * | name) |
Establish an output (solution and/or statistics) file.
void OsiDylpSolverInterface::dylp_printsoln | ( | bool | wantSoln, |
bool | wantStats | ||
) |
Print the solution and/or statistics to the output file.
void OsiDylpSolverInterface::setOsiDylpMessages | ( | CoinMessages::Language | local_language) |
Set the language for messages.
|
virtual |
Invoke the solver's built-in branch-and-bound algorithm.
Implements OsiSolverInterface.
|
virtual |
Get as many dual rays as the solver can provide.
Implements OsiSolverInterface.
|
virtual |
Get as many primal rays as the solver can provide.
Implements OsiSolverInterface.
|
private |
Create and load a presolve object.
|
private |
Perform presolve transformations.
|
private |
Decide whether presolve was effective enough to use.
|
private |
Save the original problem.
|
private |
Load the presolved problem into the ODSI object.
|
private |
Create and load a postsolve object.
|
private |
Apply the postsolve transforms from postActions_.
|
private |
Reload the original constraint system with the postsolved basis.
|
private |
Delete presolve information.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Common core method to invoke dylp.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
friend |
Unit test for OsiDylpSolverInterface.
Performs various tests to see if ODSI is functioning correctly. Not an exhaustive test, but it'll (usually) catch gross problems.
lpopts_struct* OsiDylpSolverInterface::initialSolveOptions |
Definition at line 687 of file OsiDylpSolverInterface.hpp.
lpopts_struct * OsiDylpSolverInterface::resolveOptions |
Definition at line 687 of file OsiDylpSolverInterface.hpp.
lptols_struct* OsiDylpSolverInterface::tolerances |
Definition at line 688 of file OsiDylpSolverInterface.hpp.
|
private |
Definition at line 706 of file OsiDylpSolverInterface.hpp.
|
private |
Definition at line 707 of file OsiDylpSolverInterface.hpp.
|
private |
Definition at line 708 of file OsiDylpSolverInterface.hpp.
|
staticprivate |
Definition at line 715 of file OsiDylpSolverInterface.hpp.
|
staticprivate |
Definition at line 716 of file OsiDylpSolverInterface.hpp.
|
staticprivate |
Definition at line 717 of file OsiDylpSolverInterface.hpp.
|
private |
Output file for this ODSI instance.
Holds the name of the file that will be used to write out the solution and statistics.
Definition at line 734 of file OsiDylpSolverInterface.hpp.
|
private |
Log file for this ODSI instance.
Holds the name of the file that will be used for dylp log information.
Definition at line 741 of file OsiDylpSolverInterface.hpp.
|
private |
Controls output of log information to stdout during initialSolve()
Definition at line 747 of file OsiDylpSolverInterface.hpp.
|
private |
Controls output of log information to stdout during resolve() and solveFromHotStart()
Definition at line 753 of file OsiDylpSolverInterface.hpp.
|
private |
Result of last call to solver for this ODSI instance.
The default value is lpINV (i.e., the code is not valid). A call to dylp will set lp_retval to the dylp return code. Errors in the interface's interaction with other dylp routines will set this value to the return code given by the routine, or lpFATAL if the routine does not return anything more specific.
Definition at line 764 of file OsiDylpSolverInterface.hpp.
|
private |
Objective function sense for this ODSI instance.
Coded 1.0 to minimize (default), -1.0 to maximize.
Definition at line 771 of file OsiDylpSolverInterface.hpp.
|
private |
The value of infinity.
Definition at line 775 of file OsiDylpSolverInterface.hpp.
|
private |
Solver name (dylp).
Definition at line 779 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Array for info blocks associated with hints.
Definition at line 783 of file OsiDylpSolverInterface.hpp.
|
private |
Allow messages from CoinMpsIO package.
Definition at line 787 of file OsiDylpSolverInterface.hpp.
|
private |
Warm start object used as a fallback for hot start.
If some other ODSI object uses the underlying solver between calls to solveFromHotStart(), the solver must be reloaded. This basis is kept for just such a situation.
Definition at line 796 of file OsiDylpSolverInterface.hpp.
CoinWarmStart* OsiDylpSolverInterface::basis |
Definition at line 839 of file OsiDylpSolverInterface.hpp.
basisCondition OsiDylpSolverInterface::condition |
Definition at line 840 of file OsiDylpSolverInterface.hpp.
int OsiDylpSolverInterface::balance |
Definition at line 841 of file OsiDylpSolverInterface.hpp.
struct { ... } OsiDylpSolverInterface::activeBasis |
Active basis.
The active basis is set with each successful return from the solver (where successful means a result of optimal, infeasible, unbounded, or iterlim), or by an explicit call to setWarmStart() with a valid basis. By definition, calling setWarmStart() with a null parameter is a request to synch the active basis with the solver (a noop for ODSI). Calling setWarmStart() with an empty (0x0) basis is taken as a request to delete activeBasis.
Condition will take a value from the basisCondition enum (which see).
Balance records whether we have an excess or shortage of basic variables. Deletion of tight constraints will result in an excess. Deletion of basic variables will result in a shortage.
|
private |
The most recent solution from dylp is valid.
True if the solution held in lpprob is valid. False if changes to the constraint system have rendered the solution invalid.
Definition at line 848 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Definition at line 861 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Definition at line 862 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Definition at line 863 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Definition at line 864 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Definition at line 866 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Definition at line 867 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Definition at line 868 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Definition at line 869 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Definition at line 870 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Definition at line 871 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Definition at line 872 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Definition at line 874 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Definition at line 875 of file OsiDylpSolverInterface.hpp.
|
private |
The presolve object.
In more detail, preObj_ is loaded with the original system. Presolve transformations are applied to convert it to a presolved system.
Definition at line 891 of file OsiDylpSolverInterface.hpp.
|
private |
List of postsolve actions.
The list of postsolve (reverse) transformations required to convert the presolved system back to the original system. Built as presolve transformations are applied.
Definition at line 899 of file OsiDylpSolverInterface.hpp.
|
private |
The postsolve object.
In more detail, postObj_ is loaded with the presolved system and its optimal basis. The postsolve transformations held by postActions_ are applied to convert back to the original system. For ODSI, our only interest is the basis.
Definition at line 908 of file OsiDylpSolverInterface.hpp.
|
private |
Limit for iterations of the major presolve loop.
Definition at line 911 of file OsiDylpSolverInterface.hpp.
|
private |
true if presolve should consider integrality
Definition at line 914 of file OsiDylpSolverInterface.hpp.
|
private |
Saved copy of original problem.
Definition at line 917 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
Saved pointers to cached structural vectors.
Definition at line 920 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
The presolve object.
In more detail, preObj_ is loaded with the original system. Presolve transformations are applied to convert it to a presolved system.
Definition at line 921 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
The presolve object.
In more detail, preObj_ is loaded with the original system. Presolve transformations are applied to convert it to a presolved system.
Definition at line 922 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
The presolve object.
In more detail, preObj_ is loaded with the original system. Presolve transformations are applied to convert it to a presolved system.
Definition at line 923 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
The presolve object.
In more detail, preObj_ is loaded with the original system. Presolve transformations are applied to convert it to a presolved system.
Definition at line 924 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
The presolve object.
In more detail, preObj_ is loaded with the original system. Presolve transformations are applied to convert it to a presolved system.
Definition at line 925 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
The presolve object.
In more detail, preObj_ is loaded with the original system. Presolve transformations are applied to convert it to a presolved system.
Definition at line 926 of file OsiDylpSolverInterface.hpp.
|
mutableprivate |
The presolve object.
In more detail, preObj_ is loaded with the original system. Presolve transformations are applied to convert it to a presolved system.
Definition at line 927 of file OsiDylpSolverInterface.hpp.