DyLP 1.10.4
Loading...
Searching...
No Matches
OsiDylpSolverInterface Class Reference

COIN OSI API for dylp. More...

#include <OsiDylpSolverInterface.hpp>

+ Inheritance diagram for OsiDylpSolverInterface:
+ Collaboration diagram for OsiDylpSolverInterface:

Public Member Functions

Constructors and Destructors
 OsiDylpSolverInterface ()
 Default constructor.
 
 OsiDylpSolverInterface (const OsiDylpSolverInterface &src)
 Copy constructor.
 
OsiSolverInterfaceclone (bool copyData=true) const
 Clone the solver object.
 
OsiDylpSolverInterfaceoperator= (const OsiDylpSolverInterface &rhs)
 Assignment.
 
 ~OsiDylpSolverInterface ()
 Destructor.
 
void reset ()
 Reset the solver object to the state produced by the default constructor.
 
Methods to load a problem
int readMps (const char *filename, const char *extension="mps")
 Read a problem description in MPS format from a file.
 
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.
 
void writeMps (const char *basename, const char *extension="mps", double objsense=0.0) const
 Write the problem into the specified file in MPS format.
 
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).
 
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).
 
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)
 
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)
 
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).
 
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).
 
Methods to obtain problem information
int getNumCols () const
 Get the number of columns (variables)
 
int getNumRows () const
 Get the number of rows (constraints)
 
int getNumElements () const
 Get the number of non-zero coefficients.
 
int getNumIntegers () const
 Get the number of integer variables.
 
const double * getColLower () const
 Get the column (variable) lower bound vector.
 
const double * getColUpper () const
 Get the column (variable) upper bound vector.
 
bool isContinuous (int colIndex) const
 Return true if the variable is continuous.
 
bool isBinary (int colIndex) const
 Return true if the variable is binary.
 
bool isIntegerNonBinary (int colIndex) const
 Return true if the variable is general integer.
 
bool isInteger (int colIndex) const
 Return true if the variable is integer (general or binary)
 
const char * getRowSense () const
 Get the row sense (constraint type) vector.
 
const double * getRightHandSide () const
 Get the row (constraint) right-hand-side vector.
 
const double * getRowRange () const
 Get the row (constraint) range vector.
 
const double * getRowLower () const
 Get the row (constraint) lower bound vector.
 
const double * getRowUpper () const
 Get the row (constraint) upper bound vector.
 
const double * getObjCoefficients () const
 Get the objective function coefficient vector.
 
double getObjSense () const
 Get the objective function sense (min/max)
 
const CoinPackedMatrixgetMatrixByRow () const
 Get a pointer to a row-major copy of the constraint matrix.
 
const CoinPackedMatrixgetMatrixByCol () const
 Get a pointer to a column-major copy of the constraint matrix.
 
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.
 
void setRowName (int ndx, std::string name)
 Set a row name.
 
void setColName (int ndx, std::string name)
 Set a column name.
 
Methods to modify the problem
void setContinuous (int index)
 Set a single variable to be continuous.
 
void setInteger (int index)
 Set a single variable to be integer.
 
void setColLower (int index, double value)
 Set the lower bound on a column (variable)
 
void setColUpper (int index, double value)
 Set the upper bound on a column (variable)
 
void setRowLower (int index, double value)
 Set the lower bound on a row (constraint)
 
void setRowUpper (int index, double value)
 Set the upper bound on a row (constraint)
 
void setRowType (int index, char rowsen, double rowrhs, double rowrng)
 Set the type of a row (constraint)
 
void setObjCoeff (int index, double value)
 Set an objective function coefficient.
 
void setObjective (const double *array)
 Set the objective coefficients for all columns.
 
void setObjSense (double sense)
 Set the sense (min/max) of the objective.
 
void setColSolution (const double *colsol)
 Set the value of the primal variables in the problem solution.
 
void setRowPrice (const double *)
 Set the value of the dual variables in the problem solution.
 
void addCol (const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj)
 Add a column (variable) to the problem.
 
void deleteCols (const int num, const int *colIndices)
 Remove column(s) (variable(s)) from the problem.
 
void addRow (const CoinPackedVectorBase &row, const double rowlb, const double rowub)
 Add a row (constraint) to the problem.
 
void addRow (const CoinPackedVectorBase &row, const char rowsen, const double rowrhs, const double rowrng)
 Add a row (constraint) to the problem.
 
void deleteRows (const int num, const int *rowIndices)
 Delete row(s) (constraint(s)) from the problem.
 
void applyRowCut (const OsiRowCut &cut)
 Apply a row (constraint) cut (add one constraint)
 
void applyColCut (const OsiColCut &cut)
 Apply a column (variable) cut (adjust one or more bounds)
 
virtual void setContinuous (const int *indices, int len)
 
virtual void setInteger (const int *indices, int len)
 
virtual void setColLower (const double *array)
 
virtual void setColUpper (const double *array)
 
virtual void addCol (const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj, std::string name)
 
virtual void addCol (int numberElements, const int *rows, const double *elements, const double collb, const double colub, const double obj)
 
virtual void addCol (int numberElements, const int *rows, const double *elements, const double collb, const double colub, const double obj, std::string name)
 
virtual void addRow (const CoinPackedVectorBase &vec, const double rowlb, const double rowub, std::string name)
 
virtual void addRow (const CoinPackedVectorBase &vec, const char rowsen, const double rowrhs, const double rowrng, std::string name)
 
virtual void addRow (int numberElements, const int *columns, const double *element, const double rowlb, const double rowub)
 
Solve methods
void initialSolve ()
 Solve an lp from scratch.
 
CoinWarmStartgetEmptyWarmStart () const
 Get an empty OsiDylpWarmStartBasis object.
 
CoinWarmStartgetWarmStart () const
 Build a warm start object for the current lp solution.
 
bool setWarmStart (const CoinWarmStart *warmStart)
 Apply a warm start object.
 
void resolve ()
 Call dylp to reoptimize (warm start).
 
void markHotStart ()
 Create a hot start snapshot.
 
void solveFromHotStart ()
 Call dylp to reoptimize (hot start).
 
void unmarkHotStart ()
 Delete the hot start snapshot.
 
Methods returning solver termination status
bool isAbandoned () const
 True if dylp abandoned the problem.
 
bool isProvenOptimal () const
 True if dylp reported an optimal solution.
 
bool isProvenPrimalInfeasible () const
 True if dylp reported the problem to be primal infeasible.
 
bool isProvenDualInfeasible () const
 True if dylp reported the problem to be dual infeasible (primal unbounded)
 
bool isIterationLimitReached () const
 True if dylp reached the iteration limit.
 
int getIterationCount () const
 Get the number of iterations for the last lp.
 
bool isPrimalObjectiveLimitReached () const
 Is the primal objective limit reached?
 
bool isDualObjectiveLimitReached () const
 Is the dual objective limit reached?
 
Methods to set/get solver parameters
double getInfinity () const
 Get dylp's value for infinity.
 
bool setIntParam (OsiIntParam key, int value)
 Set an OSI integer parameter.
 
bool setDblParam (OsiDblParam key, double value)
 Set an OSI double parameter.
 
bool setStrParam (OsiStrParam key, const std::string &value)
 Set an OSI string parameter.
 
bool setHintParam (OsiHintParam key, bool sense=true, OsiHintStrength strength=OsiHintTry, void *info=0)
 Set an OSI hint.
 
bool getIntParam (OsiIntParam key, int &value) const
 Get an OSI integer parameter.
 
bool getDblParam (OsiDblParam key, double &value) const
 Get an OSI double parameter.
 
bool getStrParam (OsiStrParam key, std::string &value) const
 Get an OSI string parameter.
 
bool getHintParam (OsiHintParam key, bool &sense, OsiHintStrength &strength, void *&info) const
 Get an OSI hint.
 
void newLanguage (CoinMessages::Language language)
 Change the language for OsiDylp messages.
 
void setLanguage (CoinMessages::Language language)
 An alias for OsiDylpSolverInterface::newLanguage.
 
virtual bool getHintParam (OsiHintParam key, bool &yesNo, OsiHintStrength &strength) const
 
virtual bool getHintParam (OsiHintParam key, bool &yesNo) const
 
Methods to obtain solution information
double getObjValue () const
 Get the objective function value for the solution.
 
const double * getColSolution () const
 Return the vector of primal variables for the solution.
 
const double * getRowPrice () const
 Return the vector of dual variables for the solution.
 
const double * getReducedCost () const
 Return the vector of reduced costs for the solution.
 
const double * getRowActivity () const
 Return the vector of row activity for the solution.
 
std::vector< double * > getDualRays (int maxNumRays, bool fullRay) const
 Get as many dual rays as the solver can provide.
 
std::vector< double * > getPrimalRays (int maxNumRays) const
 Get as many primal rays as the solver can provide.
 
Simplex API methods
int canDoSimplexInterface () const
 Return the simplex implementation level.
 
void enableFactorization () const
 Prepare the solver for the use of tableau access methods.
 
void disableFactorization () const
 Undo the effects of enableFactorization.
 
bool basisIsAvailable () const
 Check if an optimal basis is available.
 
void getBasisStatus (int *archStatus, int *logStatus) const
 Retrieve status information for architectural and logical variables.
 
int setBasisStatus (const int *archStatus, const int *logStatus)
 Set a basis and update the factorization and solution.
 
virtual void getReducedGradient (double *columnReducedCosts, double *duals, const double *c) const
 Calculate duals and reduced costs for the given objective coefficients.
 
virtual void getBasics (int *index) const
 Get indices of basic variables.
 
virtual void getBInvCol (int col, double *betak) const
 Get a column of the basis inverse.
 
virtual void getBInvACol (int col, double *abarj) const
 Get a column of the tableau.
 
virtual void getBInvRow (int row, double *betai) const
 Get a row of the basis inverse.
 
virtual void getBInvARow (int row, double *abari, double *betai=0) const
 Get a row of the tableau.
 
Debugging Methods
void activateRowCutDebugger (const char *modelName)
 Activate the row cut debugger.
 
void activateRowCutDebugger (const double *solution, bool keepContinuous=false)
 Activate the row cut debugger.
 
Dylp-specific methods
void dylp_controlfile (const char *name, const bool silent, const bool mustexist=true)
 Process an options (.spc) file.
 
void dylp_logfile (const char *name, bool echo=false)
 Establish a log file.
 
void dylp_outfile (const char *name)
 Establish an output (solution and/or statistics) file.
 
void dylp_printsoln (bool wantSoln, bool wantStats)
 Print the solution and/or statistics to the output file.
 
void setOsiDylpMessages (CoinMessages::Language local_language)
 Set the language for messages.
 
Unsupported functions
void branchAndBound ()
 Invoke the solver's built-in branch-and-bound algorithm.
 
- Public Member Functions inherited from OsiSolverInterface
void copyParameters (OsiSolverInterface &rhs)
 
double getIntegerTolerance () const
 
virtual CoinWarmStartgetPointerToWarmStart (bool &mustDelete)
 
virtual bool isFreeBinary (int colIndex) const
 
const char * columnType (bool refresh=false) const
 
void setColumnType (int iColumn, char type)
 
virtual const char * getColType (bool refresh=false) const
 
virtual CoinPackedMatrixgetMutableMatrixByRow () const
 
virtual CoinPackedMatrixgetMutableMatrixByCol () const
 
virtual const double * getStrictColSolution ()
 
virtual OsiVectorInt getFractionalIndices (const double etol=1.e-05) const
 
virtual void setObjCoeffSet (const int *indexFirst, const int *indexLast, const double *coeffList)
 
virtual void setColBounds (int elementIndex, double lower, double upper)
 
virtual void setColSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 
virtual void setRowBounds (int elementIndex, double lower, double upper)
 
virtual void setRowSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 
virtual void setRowSetTypes (const int *indexFirst, const int *indexLast, const char *senseList, const double *rhsList, const double *rangeList)
 
virtual int reducedCostFix (double gap, bool justInteger=true)
 
virtual std::string dfltRowColName (char rc, int ndx, unsigned digits=7) const
 
virtual std::string getObjName (unsigned maxLen=static_cast< unsigned >(std::string::npos)) const
 
virtual std::string getRowName (int rowIndex, unsigned maxLen=static_cast< unsigned >(std::string::npos)) const
 
virtual const OsiNameVecgetRowNames ()
 
virtual void setRowNames (OsiNameVec &srcNames, int srcStart, int len, int tgtStart)
 
virtual void deleteRowNames (int tgtStart, int len)
 
virtual std::string getColName (int colIndex, unsigned maxLen=static_cast< unsigned >(std::string::npos)) const
 
virtual const OsiNameVecgetColNames ()
 
virtual void setColNames (OsiNameVec &srcNames, int srcStart, int len, int tgtStart)
 
virtual void deleteColNames (int tgtStart, int len)
 
void setRowColNames (const CoinMpsIO &mps)
 
void setRowColNames (CoinModel &mod)
 
void setRowColNames (CoinLpIO &mod)
 
virtual void addCols (const int numcols, const CoinPackedVectorBase *const *cols, const double *collb, const double *colub, const double *obj)
 
virtual void addCols (const int numcols, const CoinBigIndex *columnStarts, const int *rows, const double *elements, const double *collb, const double *colub, const double *obj)
 
void addCols (const CoinBuild &buildObject)
 
int addCols (CoinModel &modelObject)
 
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)
 
virtual void addRows (const int numrows, const CoinBigIndex *rowStarts, const int *columns, const double *element, const double *rowlb, const double *rowub)
 
void addRows (const CoinBuild &buildObject)
 
int addRows (CoinModel &modelObject)
 
virtual void replaceMatrixOptional (const CoinPackedMatrix &)
 
virtual void replaceMatrix (const CoinPackedMatrix &)
 
virtual void saveBaseModel ()
 
virtual void restoreBaseModel (int numberRows)
 
virtual ApplyCutsReturnCode applyCuts (const OsiCuts &cs, double effectivenessLb=0.0)
 
virtual void applyRowCuts (int numberCuts, const OsiRowCut *cuts)
 
virtual void applyRowCuts (int numberCuts, const OsiRowCut **cuts)
 
void deleteBranchingInfo (int numberDeleted, const int *which)
 
virtual int loadFromCoinModel (CoinModel &modelObject, bool keepSolution=false)
 
virtual int readGMPL (const char *filename, const char *dataname=NULL)
 
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
 
virtual void writeLp (const char *filename, const char *extension="lp", double epsilon=1e-5, int numberAcross=10, int decimals=9, double objSense=0.0, bool useRowNames=true) const
 
virtual void writeLp (FILE *fp, double epsilon=1e-5, int numberAcross=10, int decimals=5, double objSense=0.0, bool useRowNames=true) const
 
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
 
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
 
virtual int readLp (const char *filename, const double epsilon=1e-5)
 
int readLp (FILE *fp, const double epsilon=1e-5)
 
int differentModel (OsiSolverInterface &other, bool ignoreNames=true)
 
void statistics (double &minimumNegative, double &maximumNegative, double &minimumPositive, double &maximumPositive, int type=3) const
 
void setApplicationData (void *appData)
 
void setAuxiliaryInfo (OsiAuxInfo *auxiliaryInfo)
 
void * getApplicationData () const
 
OsiAuxInfogetAuxiliaryInfo () const
 
virtual void passInMessageHandler (CoinMessageHandler *handler)
 
void newLanguage (CoinMessages::Language language)
 
void setLanguage (CoinMessages::Language language)
 
CoinMessageHandlermessageHandler () const
 
CoinMessages messages ()
 
CoinMessagesmessagesPointer ()
 
bool defaultHandler () const
 
void findIntegers (bool justCount)
 
virtual int findIntegersAndSOS (bool justCount)
 
int numberObjects () const
 
void setNumberObjects (int number)
 
OsiObject ** objects () const
 
const OsiObjectobject (int which) const
 
OsiObjectmodifiableObject (int which) const
 
void deleteObjects ()
 
void addObjects (int numberObjects, OsiObject **objects)
 
double forceFeasible ()
 
const OsiRowCutDebuggergetRowCutDebugger () const
 
OsiRowCutDebuggergetRowCutDebuggerAlways () const
 
bool optimalBasisIsAvailable () const
 
virtual void enableSimplexInterface (bool doingPrimal)
 
virtual void disableSimplexInterface ()
 
virtual int pivot (int colIn, int colOut, int outStatus)
 
virtual int primalPivotResult (int colIn, int sign, int &colOut, int &outStatus, double &t, CoinPackedVector *dx)
 
virtual int dualPivotResult (int &colIn, int &sign, int colOut, int outStatus, double &t, CoinPackedVector *dx)
 
 OsiSolverInterface ()
 
 OsiSolverInterface (const OsiSolverInterface &)
 
OsiSolverInterfaceoperator= (const OsiSolverInterface &rhs)
 
virtual ~OsiSolverInterface ()
 
void copyParameters (OsiSolverInterface &rhs)
 
double getIntegerTolerance () const
 
virtual CoinWarmStartgetPointerToWarmStart (bool &mustDelete)
 
virtual bool isFreeBinary (int colIndex) const
 
const char * columnType (bool refresh=false) const
 
void setColumnType (int iColumn, char type)
 
virtual const char * getColType (bool refresh=false) const
 
virtual CoinPackedMatrixgetMutableMatrixByRow () const
 
virtual CoinPackedMatrixgetMutableMatrixByCol () const
 
virtual const double * getStrictColSolution ()
 
virtual OsiVectorInt getFractionalIndices (const double etol=1.e-05) const
 
virtual void setObjCoeffSet (const int *indexFirst, const int *indexLast, const double *coeffList)
 
virtual void setColBounds (int elementIndex, double lower, double upper)
 
virtual void setColSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 
virtual void setRowBounds (int elementIndex, double lower, double upper)
 
virtual void setRowSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 
virtual void setRowSetTypes (const int *indexFirst, const int *indexLast, const char *senseList, const double *rhsList, const double *rangeList)
 
virtual int reducedCostFix (double gap, bool justInteger=true)
 
virtual std::string dfltRowColName (char rc, int ndx, unsigned digits=7) const
 
virtual std::string getObjName (unsigned maxLen=static_cast< unsigned >(std::string::npos)) const
 
virtual std::string getRowName (int rowIndex, unsigned maxLen=static_cast< unsigned >(std::string::npos)) const
 
virtual const OsiNameVecgetRowNames ()
 
virtual void setRowNames (OsiNameVec &srcNames, int srcStart, int len, int tgtStart)
 
virtual void deleteRowNames (int tgtStart, int len)
 
virtual std::string getColName (int colIndex, unsigned maxLen=static_cast< unsigned >(std::string::npos)) const
 
virtual const OsiNameVecgetColNames ()
 
virtual void setColNames (OsiNameVec &srcNames, int srcStart, int len, int tgtStart)
 
virtual void deleteColNames (int tgtStart, int len)
 
void setRowColNames (const CoinMpsIO &mps)
 
void setRowColNames (CoinModel &mod)
 
void setRowColNames (CoinLpIO &mod)
 
virtual void addCols (const int numcols, const CoinPackedVectorBase *const *cols, const double *collb, const double *colub, const double *obj)
 
virtual void addCols (const int numcols, const CoinBigIndex *columnStarts, const int *rows, const double *elements, const double *collb, const double *colub, const double *obj)
 
void addCols (const CoinBuild &buildObject)
 
int addCols (CoinModel &modelObject)
 
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)
 
virtual void addRows (const int numrows, const CoinBigIndex *rowStarts, const int *columns, const double *element, const double *rowlb, const double *rowub)
 
void addRows (const CoinBuild &buildObject)
 
int addRows (CoinModel &modelObject)
 
virtual void replaceMatrixOptional (const CoinPackedMatrix &)
 
virtual void replaceMatrix (const CoinPackedMatrix &)
 
virtual void saveBaseModel ()
 
virtual void restoreBaseModel (int numberRows)
 
virtual ApplyCutsReturnCode applyCuts (const OsiCuts &cs, double effectivenessLb=0.0)
 
virtual void applyRowCuts (int numberCuts, const OsiRowCut *cuts)
 
virtual void applyRowCuts (int numberCuts, const OsiRowCut **cuts)
 
void deleteBranchingInfo (int numberDeleted, const int *which)
 
virtual int loadFromCoinModel (CoinModel &modelObject, bool keepSolution=false)
 
virtual int readGMPL (const char *filename, const char *dataname=NULL)
 
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
 
virtual void writeLp (const char *filename, const char *extension="lp", double epsilon=1e-5, int numberAcross=10, int decimals=9, double objSense=0.0, bool useRowNames=true) const
 
virtual void writeLp (FILE *fp, double epsilon=1e-5, int numberAcross=10, int decimals=5, double objSense=0.0, bool useRowNames=true) const
 
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
 
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
 
virtual int readLp (const char *filename, const double epsilon=1e-5)
 
int readLp (FILE *fp, const double epsilon=1e-5)
 
int differentModel (OsiSolverInterface &other, bool ignoreNames=true)
 
void statistics (double &minimumNegative, double &maximumNegative, double &minimumPositive, double &maximumPositive, int type=3) const
 
void setApplicationData (void *appData)
 
void setAuxiliaryInfo (OsiAuxInfo *auxiliaryInfo)
 
void * getApplicationData () const
 
OsiAuxInfogetAuxiliaryInfo () const
 
virtual void passInMessageHandler (CoinMessageHandler *handler)
 
void newLanguage (CoinMessages::Language language)
 
void setLanguage (CoinMessages::Language language)
 
CoinMessageHandlermessageHandler () const
 
CoinMessages messages ()
 
CoinMessagesmessagesPointer ()
 
bool defaultHandler () const
 
void findIntegers (bool justCount)
 
virtual int findIntegersAndSOS (bool justCount)
 
int numberObjects () const
 
void setNumberObjects (int number)
 
OsiObject ** objects () const
 
const OsiObjectobject (int which) const
 
OsiObjectmodifiableObject (int which) const
 
void deleteObjects ()
 
void addObjects (int numberObjects, OsiObject **objects)
 
double forceFeasible ()
 
const OsiRowCutDebuggergetRowCutDebugger () const
 
OsiRowCutDebuggergetRowCutDebuggerAlways () const
 
bool optimalBasisIsAvailable () const
 
virtual void enableSimplexInterface (bool doingPrimal)
 
virtual void disableSimplexInterface ()
 
virtual int pivot (int colIn, int colOut, int outStatus)
 
virtual int primalPivotResult (int colIn, int sign, int &colOut, int &outStatus, double &t, CoinPackedVector *dx)
 
virtual int dualPivotResult (int &colIn, int &sign, int colOut, int outStatus, double &t, CoinPackedVector *dx)
 
 OsiSolverInterface ()
 
 OsiSolverInterface (const OsiSolverInterface &)
 
OsiSolverInterfaceoperator= (const OsiSolverInterface &rhs)
 
virtual ~OsiSolverInterface ()
 

Friends

void OsiDylpSolverInterfaceUnitTest (const std::string &mpsDir, const std::string &netLibDir)
 Unit test for OsiDylpSolverInterface.
 

Dylp data structures

These fields hold pointers to the data structures which are used to pass an lp problem to dylp.

lpopts_structinitialSolveOptions
 Solver options for an initial solve.
 
lpopts_structresolveOptions
 Solver options for a resolve.
 
lptols_structtolerances
 Solver numeric tolerances.
 

Additional Inherited Members

- Public Types inherited from OsiSolverInterface
typedef std::vector< std::string > OsiNameVec
 
- Protected Member Functions inherited from OsiSolverInterface
void convertBoundToSense (const double lower, const double upper, char &sense, double &right, double &range) const
 
void convertSenseToBound (const char sense, const double right, const double range, double &lower, double &upper) const
 
forceIntoRange (const T value, const T lower, const T upper) const
 
void setInitialData ()
 
void convertBoundToSense (const double lower, const double upper, char &sense, double &right, double &range) const
 
void convertSenseToBound (const char sense, const double right, const double range, double &lower, double &upper) const
 
forceIntoRange (const T value, const T lower, const T upper) const
 
void setInitialData ()
 
- Protected Attributes inherited from OsiSolverInterface
OsiRowCutDebuggerrowCutDebugger_
 
CoinMessageHandlerhandler_
 
bool defaultHandler_
 
CoinMessages messages_
 
int numberIntegers_
 
int numberObjects_
 
OsiObject ** object_
 
char * columnType_
 

Detailed Description

COIN OSI API for dylp.

The class OsiDylpSolverInterface (ODSI) implements the public functions defined for the COIN OsiSolverInterface (OSI) API.

OsiDylpSolverInterface Principles for Users

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 implementation comments are contained in OsiDylpSolverInterface.cpp, which is not normally scanned when generating COIN OSI API documentation.

Definition at line 107 of file OsiDylpSolverInterface.hpp.

Constructor & Destructor Documentation

◆ OsiDylpSolverInterface() [1/2]

OsiDylpSolverInterface::OsiDylpSolverInterface ( )

Default constructor.

◆ OsiDylpSolverInterface() [2/2]

OsiDylpSolverInterface::OsiDylpSolverInterface ( const OsiDylpSolverInterface & src)

Copy constructor.

◆ ~OsiDylpSolverInterface()

OsiDylpSolverInterface::~OsiDylpSolverInterface ( )

Destructor.

Member Function Documentation

◆ clone()

OsiSolverInterface * OsiDylpSolverInterface::clone ( bool copyData = true) const
virtual

Clone the solver object.

Implements OsiSolverInterface.

◆ operator=()

OsiDylpSolverInterface & OsiDylpSolverInterface::operator= ( const OsiDylpSolverInterface & rhs)

Assignment.

◆ reset()

void OsiDylpSolverInterface::reset ( )
virtual

Reset the solver object to the state produced by the default constructor.

Reimplemented from OsiSolverInterface.

◆ readMps() [1/2]

int OsiDylpSolverInterface::readMps ( const char * filename,
const char * extension = "mps" )
virtual

Read a problem description in MPS format from a file.


Reimplemented from OsiSolverInterface.

◆ readMps() [2/2]

int OsiDylpSolverInterface::readMps ( const char * filename,
const char * extension,
int & numberSets,
CoinSet **& sets )
virtual

Read a problem description in MPS format from a file, including SOS information.

Reimplemented from OsiSolverInterface.

◆ writeMps()

void OsiDylpSolverInterface::writeMps ( const char * basename,
const char * extension = "mps",
double objsense = 0.0 ) const
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.

◆ loadProblem() [1/4]

void OsiDylpSolverInterface::loadProblem ( const CoinPackedMatrix & matrix,
const double * collb,
const double * colub,
const double * obj,
const char * rowsen,
const double * rowrhs,
const double * rowrng )
virtual

Load a problem description (OSI packed matrix, row sense, parameters unaffected).

Implements OsiSolverInterface.

◆ loadProblem() [2/4]

void OsiDylpSolverInterface::loadProblem ( const CoinPackedMatrix & matrix,
const double * collb,
const double * colub,
const double * obj,
const double * rowlb,
const double * rowub )
virtual

Load a problem description (OSI packed matrix, row bounds, parameters unaffected).

Implements OsiSolverInterface.

◆ loadProblem() [3/4]

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 )
virtual

Load a problem description (standard column-major packed matrix, row sense, parameters unaffected)

Implements OsiSolverInterface.

◆ loadProblem() [4/4]

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 )
virtual

Load a problem description (standard column-major packed matrix, row bounds, parameters unaffected)

Implements OsiSolverInterface.

◆ assignProblem() [1/2]

void OsiDylpSolverInterface::assignProblem ( CoinPackedMatrix *& matrix,
double *& collb,
double *& colub,
double *& obj,
char *& rowsen,
double *& rowrhs,
double *& rowrng )
virtual

Load a problem description (OSI packed matrix, row sense, parameters destroyed).

Implements OsiSolverInterface.

◆ assignProblem() [2/2]

void OsiDylpSolverInterface::assignProblem ( CoinPackedMatrix *& matrix,
double *& collb,
double *& colub,
double *& obj,
double *& rowlb,
double *& rowub )
virtual

Load a problem description (OSI packed matrix, row bounds, parameters destroyed).

Implements OsiSolverInterface.

◆ getNumCols()

int OsiDylpSolverInterface::getNumCols ( ) const
virtual

Get the number of columns (variables)

Implements OsiSolverInterface.

◆ getNumRows()

int OsiDylpSolverInterface::getNumRows ( ) const
virtual

Get the number of rows (constraints)

Implements OsiSolverInterface.

◆ getNumElements()

int OsiDylpSolverInterface::getNumElements ( ) const
virtual

Get the number of non-zero coefficients.

Implements OsiSolverInterface.

◆ getNumIntegers()

int OsiDylpSolverInterface::getNumIntegers ( ) const
virtual

Get the number of integer variables.

Counts both binary and general integer variables.

Reimplemented from OsiSolverInterface.

◆ getColLower()

const double * OsiDylpSolverInterface::getColLower ( ) const
virtual

Get the column (variable) lower bound vector.

Implements OsiSolverInterface.

◆ getColUpper()

const double * OsiDylpSolverInterface::getColUpper ( ) const
virtual

Get the column (variable) upper bound vector.

Implements OsiSolverInterface.

◆ isContinuous()

bool OsiDylpSolverInterface::isContinuous ( int colIndex) const
virtual

Return true if the variable is continuous.

Implements OsiSolverInterface.

◆ isBinary()

bool OsiDylpSolverInterface::isBinary ( int colIndex) const
virtual

Return true if the variable is binary.

Reimplemented from OsiSolverInterface.

◆ isIntegerNonBinary()

bool OsiDylpSolverInterface::isIntegerNonBinary ( int colIndex) const
virtual

Return true if the variable is general integer.

Reimplemented from OsiSolverInterface.

◆ isInteger()

bool OsiDylpSolverInterface::isInteger ( int colIndex) const
virtual

Return true if the variable is integer (general or binary)

Reimplemented from OsiSolverInterface.

◆ getRowSense()

const char * OsiDylpSolverInterface::getRowSense ( ) const
virtual

Get the row sense (constraint type) vector.

Implements OsiSolverInterface.

◆ getRightHandSide()

const double * OsiDylpSolverInterface::getRightHandSide ( ) const
virtual

Get the row (constraint) right-hand-side vector.

Implements OsiSolverInterface.

◆ getRowRange()

const double * OsiDylpSolverInterface::getRowRange ( ) const
virtual

Get the row (constraint) range vector.

Implements OsiSolverInterface.

◆ getRowLower()

const double * OsiDylpSolverInterface::getRowLower ( ) const
virtual

Get the row (constraint) lower bound vector.

Implements OsiSolverInterface.

◆ getRowUpper()

const double * OsiDylpSolverInterface::getRowUpper ( ) const
virtual

Get the row (constraint) upper bound vector.

Implements OsiSolverInterface.

◆ getObjCoefficients()

const double * OsiDylpSolverInterface::getObjCoefficients ( ) const
virtual

Get the objective function coefficient vector.

Implements OsiSolverInterface.

◆ getObjSense()

double OsiDylpSolverInterface::getObjSense ( ) const
virtual

Get the objective function sense (min/max)

A value of 1 indicates minimisation; -1 indicates maximisation.

Implements OsiSolverInterface.

◆ getMatrixByRow()

const CoinPackedMatrix * OsiDylpSolverInterface::getMatrixByRow ( ) const
virtual

Get a pointer to a row-major copy of the constraint matrix.

Implements OsiSolverInterface.

◆ getMatrixByCol()

const CoinPackedMatrix * OsiDylpSolverInterface::getMatrixByCol ( ) const
virtual

Get a pointer to a column-major copy of the constraint matrix.

Implements OsiSolverInterface.

◆ setObjName()

void OsiDylpSolverInterface::setObjName ( std::string name)
virtual

Set the objective function name.

Reimplemented from OsiSolverInterface.

◆ setRowName()

void OsiDylpSolverInterface::setRowName ( int ndx,
std::string name )
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.

◆ setColName()

void OsiDylpSolverInterface::setColName ( int ndx,
std::string name )
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.

◆ setContinuous() [1/2]

void OsiDylpSolverInterface::setContinuous ( int index)
virtual

Set a single variable to be continuous.

Implements OsiSolverInterface.

◆ setInteger() [1/2]

void OsiDylpSolverInterface::setInteger ( int index)
virtual

Set a single variable to be integer.

Implements OsiSolverInterface.

◆ setColLower() [1/2]

void OsiDylpSolverInterface::setColLower ( int index,
double value )
virtual

Set the lower bound on a column (variable)

Implements OsiSolverInterface.

◆ setColUpper() [1/2]

void OsiDylpSolverInterface::setColUpper ( int index,
double value )
virtual

Set the upper bound on a column (variable)

Implements OsiSolverInterface.

◆ setRowLower()

void OsiDylpSolverInterface::setRowLower ( int index,
double value )
virtual

Set the lower bound on a row (constraint)

Implements OsiSolverInterface.

◆ setRowUpper()

void OsiDylpSolverInterface::setRowUpper ( int index,
double value )
virtual

Set the upper bound on a row (constraint)

Implements OsiSolverInterface.

◆ setRowType()

void OsiDylpSolverInterface::setRowType ( int index,
char rowsen,
double rowrhs,
double rowrng )
virtual

Set the type of a row (constraint)

Implements OsiSolverInterface.

◆ setObjCoeff()

void OsiDylpSolverInterface::setObjCoeff ( int index,
double value )
virtual

Set an objective function coefficient.

Implements OsiSolverInterface.

◆ setObjective()

void OsiDylpSolverInterface::setObjective ( const double * array)
virtual

Set the objective coefficients for all columns.


Reimplemented from OsiSolverInterface.

◆ setObjSense()

void OsiDylpSolverInterface::setObjSense ( double sense)
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.

◆ setColSolution()

void OsiDylpSolverInterface::setColSolution ( const double * colsol)
virtual

Set the value of the primal variables in the problem solution.

Implements OsiSolverInterface.

◆ setRowPrice()

void OsiDylpSolverInterface::setRowPrice ( const double * )
virtual

Set the value of the dual variables in the problem solution.

Implements OsiSolverInterface.

◆ addCol() [1/4]

void OsiDylpSolverInterface::addCol ( const CoinPackedVectorBase & vec,
const double collb,
const double colub,
const double obj )
virtual

Add a column (variable) to the problem.

Implements OsiSolverInterface.

◆ deleteCols()

void OsiDylpSolverInterface::deleteCols ( const int num,
const int * colIndices )
virtual

Remove column(s) (variable(s)) from the problem.

Implements OsiSolverInterface.

◆ addRow() [1/5]

void OsiDylpSolverInterface::addRow ( const CoinPackedVectorBase & row,
const double rowlb,
const double rowub )
virtual

Add a row (constraint) to the problem.

Implements OsiSolverInterface.

◆ addRow() [2/5]

void OsiDylpSolverInterface::addRow ( const CoinPackedVectorBase & row,
const char rowsen,
const double rowrhs,
const double rowrng )
virtual

Add a row (constraint) to the problem.

Implements OsiSolverInterface.

◆ deleteRows()

void OsiDylpSolverInterface::deleteRows ( const int num,
const int * rowIndices )
virtual

Delete row(s) (constraint(s)) from the problem.

Implements OsiSolverInterface.

◆ applyRowCut()

void OsiDylpSolverInterface::applyRowCut ( const OsiRowCut & cut)
virtual

Apply a row (constraint) cut (add one constraint)

Implements OsiSolverInterface.

◆ applyColCut()

void OsiDylpSolverInterface::applyColCut ( const OsiColCut & cut)
virtual

Apply a column (variable) cut (adjust one or more bounds)

Implements OsiSolverInterface.

◆ initialSolve()

void OsiDylpSolverInterface::initialSolve ( )
virtual

Solve an lp from scratch.

Implements OsiSolverInterface.

◆ getEmptyWarmStart()

CoinWarmStart * OsiDylpSolverInterface::getEmptyWarmStart ( ) const
virtual

Get an empty OsiDylpWarmStartBasis object.

Implements OsiSolverInterface.

◆ getWarmStart()

CoinWarmStart * OsiDylpSolverInterface::getWarmStart ( ) const
virtual

Build a warm start object for the current lp solution.

Implements OsiSolverInterface.

◆ setWarmStart()

bool OsiDylpSolverInterface::setWarmStart ( const CoinWarmStart * warmStart)
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.

◆ resolve()

void OsiDylpSolverInterface::resolve ( )
virtual

Call dylp to reoptimize (warm start).

Implements OsiSolverInterface.

◆ markHotStart()

void OsiDylpSolverInterface::markHotStart ( )
virtual

Create a hot start snapshot.

Reimplemented from OsiSolverInterface.

◆ solveFromHotStart()

void OsiDylpSolverInterface::solveFromHotStart ( )
virtual

Call dylp to reoptimize (hot start).

Reimplemented from OsiSolverInterface.

◆ unmarkHotStart()

void OsiDylpSolverInterface::unmarkHotStart ( )
virtual

Delete the hot start snapshot.

Reimplemented from OsiSolverInterface.

◆ isAbandoned()

bool OsiDylpSolverInterface::isAbandoned ( ) const
virtual

True if dylp abandoned the problem.

Implements OsiSolverInterface.

◆ isProvenOptimal()

bool OsiDylpSolverInterface::isProvenOptimal ( ) const
virtual

True if dylp reported an optimal solution.

Implements OsiSolverInterface.

◆ isProvenPrimalInfeasible()

bool OsiDylpSolverInterface::isProvenPrimalInfeasible ( ) const
virtual

True if dylp reported the problem to be primal infeasible.

Implements OsiSolverInterface.

◆ isProvenDualInfeasible()

bool OsiDylpSolverInterface::isProvenDualInfeasible ( ) const
virtual

True if dylp reported the problem to be dual infeasible (primal unbounded)

Implements OsiSolverInterface.

◆ isIterationLimitReached()

bool OsiDylpSolverInterface::isIterationLimitReached ( ) const
virtual

True if dylp reached the iteration limit.

Implements OsiSolverInterface.

◆ getIterationCount()

int OsiDylpSolverInterface::getIterationCount ( ) const
virtual

Get the number of iterations for the last lp.

Implements OsiSolverInterface.

◆ isPrimalObjectiveLimitReached()

bool OsiDylpSolverInterface::isPrimalObjectiveLimitReached ( ) const
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.

Reimplemented from OsiSolverInterface.

◆ isDualObjectiveLimitReached()

bool OsiDylpSolverInterface::isDualObjectiveLimitReached ( ) const
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.

Reimplemented from OsiSolverInterface.

◆ getInfinity()

double OsiDylpSolverInterface::getInfinity ( ) const
virtual

Get dylp's value for infinity.

Implements OsiSolverInterface.

◆ setIntParam()

bool OsiDylpSolverInterface::setIntParam ( OsiIntParam key,
int value )
virtual

Set an OSI integer parameter.

Reimplemented from OsiSolverInterface.

◆ setDblParam()

bool OsiDylpSolverInterface::setDblParam ( OsiDblParam key,
double value )
virtual

Set an OSI double parameter.

Reimplemented from OsiSolverInterface.

◆ setStrParam()

bool OsiDylpSolverInterface::setStrParam ( OsiStrParam key,
const std::string & value )
virtual

Set an OSI string parameter.

Reimplemented from OsiSolverInterface.

◆ setHintParam()

bool OsiDylpSolverInterface::setHintParam ( OsiHintParam key,
bool sense = true,
OsiHintStrength strength = OsiHintTry,
void * info = 0 )
virtual

Set an OSI hint.

Reimplemented from OsiSolverInterface.

◆ getIntParam()

bool OsiDylpSolverInterface::getIntParam ( OsiIntParam key,
int & value ) const
virtual

Get an OSI integer parameter.

Reimplemented from OsiSolverInterface.

◆ getDblParam()

bool OsiDylpSolverInterface::getDblParam ( OsiDblParam key,
double & value ) const
virtual

Get an OSI double parameter.

Reimplemented from OsiSolverInterface.

◆ getStrParam()

bool OsiDylpSolverInterface::getStrParam ( OsiStrParam key,
std::string & value ) const
virtual

Get an OSI string parameter.

Reimplemented from OsiSolverInterface.

◆ getHintParam() [1/3]

bool OsiDylpSolverInterface::getHintParam ( OsiHintParam key,
bool & sense,
OsiHintStrength & strength,
void *& info ) const
virtual

Get an OSI hint.

Reimplemented from OsiSolverInterface.

◆ newLanguage()

void OsiDylpSolverInterface::newLanguage ( CoinMessages::Language language)
inline

Change the language for OsiDylp messages.

Definition at line 569 of file OsiDylpSolverInterface.hpp.

◆ setLanguage()

void OsiDylpSolverInterface::setLanguage ( CoinMessages::Language language)
inline

An alias for OsiDylpSolverInterface::newLanguage.

Definition at line 574 of file OsiDylpSolverInterface.hpp.

◆ getObjValue()

double OsiDylpSolverInterface::getObjValue ( ) const
virtual

Get the objective function value for the solution.

Implements OsiSolverInterface.

◆ getColSolution()

const double * OsiDylpSolverInterface::getColSolution ( ) const
virtual

Return the vector of primal variables for the solution.

Implements OsiSolverInterface.

◆ getRowPrice()

const double * OsiDylpSolverInterface::getRowPrice ( ) const
virtual

Return the vector of dual variables for the solution.

Implements OsiSolverInterface.

◆ getReducedCost()

const double * OsiDylpSolverInterface::getReducedCost ( ) const
virtual

Return the vector of reduced costs for the solution.

Implements OsiSolverInterface.

◆ getRowActivity()

const double * OsiDylpSolverInterface::getRowActivity ( ) const
virtual

Return the vector of row activity for the solution.

Implements OsiSolverInterface.

◆ getDualRays()

std::vector< double * > OsiDylpSolverInterface::getDualRays ( int maxNumRays,
bool fullRay ) const
virtual

Get as many dual rays as the solver can provide.

If fullRay is false (the default), the ray will contain only the components associated with the row duals. If fullRay is set to true, the ray will also contain the components associated with nonbasic variables.

Implements OsiSolverInterface.

◆ getPrimalRays()

std::vector< double * > OsiDylpSolverInterface::getPrimalRays ( int maxNumRays) const
virtual

Get as many primal rays as the solver can provide.

Implements OsiSolverInterface.

◆ canDoSimplexInterface()

int OsiDylpSolverInterface::canDoSimplexInterface ( ) const
virtual

Return the simplex implementation level.


Reimplemented from OsiSolverInterface.

◆ enableFactorization()

void OsiDylpSolverInterface::enableFactorization ( ) const
virtual

Prepare the solver for the use of tableau access methods.

In order for the tableau methods to work, the ODSI object invoking them must own the solver; the most recent call to optimise the problem must have resulted in an optimal solution; and the solver must be holding retained data structures for that optimal solution. It's much more efficient if the solver is using the full system, but it's not mandatory.

Because this is a const method, we can't force any of this; we can only check.

Reimplemented from OsiSolverInterface.

◆ disableFactorization()

void OsiDylpSolverInterface::disableFactorization ( ) const
virtual

Undo the effects of enableFactorization.

Even if resolve was invoked by enableFactorization, little needs to be done here. Ownership of the solver is transferred by invocation, so there's no need to explicitly give it back.

Reimplemented from OsiSolverInterface.

◆ basisIsAvailable()

bool OsiDylpSolverInterface::basisIsAvailable ( ) const
virtual

Check if an optimal basis is available.

Reimplemented from OsiSolverInterface.

◆ getBasisStatus()

void OsiDylpSolverInterface::getBasisStatus ( int * archStatus,
int * logStatus ) const
virtual

Retrieve status information for architectural and logical variables.

Retrieve status vectors for architectural (also called structural or column) and logical (also called artificial or row) variables. Returns the same information as getWarmStart, but in a different format.

Reimplemented from OsiSolverInterface.

◆ setBasisStatus()

int OsiDylpSolverInterface::setBasisStatus ( const int * archStatus,
const int * logStatus )
virtual

Set a basis and update the factorization and solution.

Provides the combined functionality of setWarmStart followed by resolve. As with getBasisStatus, the status vectors are coded as integers.

Reimplemented from OsiSolverInterface.

◆ getReducedGradient()

virtual void OsiDylpSolverInterface::getReducedGradient ( double * columnReducedCosts,
double * duals,
const double * c ) const
virtual

Calculate duals and reduced costs for the given objective coefficients.

The solver's objective coefficient vector is not changed (cf. #setObjectiveAndRefresh)

Reimplemented from OsiSolverInterface.

◆ getBasics()

virtual void OsiDylpSolverInterface::getBasics ( int * index) const
virtual

Get indices of basic variables.

Reimplemented from OsiSolverInterface.

◆ getBInvCol()

virtual void OsiDylpSolverInterface::getBInvCol ( int col,
double * betak ) const
virtual

Get a column of the basis inverse.

Reimplemented from OsiSolverInterface.

◆ getBInvACol()

virtual void OsiDylpSolverInterface::getBInvACol ( int col,
double * abarj ) const
virtual

Get a column of the tableau.

Reimplemented from OsiSolverInterface.

◆ getBInvRow()

virtual void OsiDylpSolverInterface::getBInvRow ( int row,
double * betai ) const
virtual

Get a row of the basis inverse.

Reimplemented from OsiSolverInterface.

◆ getBInvARow()

virtual void OsiDylpSolverInterface::getBInvARow ( int row,
double * abari,
double * betai = 0 ) const
virtual

Get a row of the tableau.

Reimplemented from OsiSolverInterface.

◆ activateRowCutDebugger() [1/2]

void OsiDylpSolverInterface::activateRowCutDebugger ( const char * modelName)
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.

◆ activateRowCutDebugger() [2/2]

void OsiDylpSolverInterface::activateRowCutDebugger ( const double * solution,
bool keepContinuous = false )
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 variables need to be correct. The debugger will fill in the continuous variables by solving an lp relaxation with the integer variables fixed as specified. If the given values for the continuous variables should be preserved, set keepContinuous to true.

Reimplemented from OsiSolverInterface.

◆ dylp_controlfile()

void OsiDylpSolverInterface::dylp_controlfile ( const char * name,
const bool silent,
const bool mustexist = true )

Process an options (.spc) file.

◆ dylp_logfile()

void OsiDylpSolverInterface::dylp_logfile ( const char * name,
bool echo = false )

Establish a log file.

◆ dylp_outfile()

void OsiDylpSolverInterface::dylp_outfile ( const char * name)

Establish an output (solution and/or statistics) file.

◆ dylp_printsoln()

void OsiDylpSolverInterface::dylp_printsoln ( bool wantSoln,
bool wantStats )

Print the solution and/or statistics to the output file.

◆ setOsiDylpMessages()

void OsiDylpSolverInterface::setOsiDylpMessages ( CoinMessages::Language local_language)

Set the language for messages.

◆ branchAndBound()

void OsiDylpSolverInterface::branchAndBound ( )
virtual

Invoke the solver's built-in branch-and-bound algorithm.

Implements OsiSolverInterface.

◆ setContinuous() [2/2]

virtual void OsiSolverInterface::setContinuous ( const int * indices,
int len )
virtual

Reimplemented from OsiSolverInterface.

◆ setInteger() [2/2]

virtual void OsiSolverInterface::setInteger ( const int * indices,
int len )
virtual

Reimplemented from OsiSolverInterface.

◆ setColLower() [2/2]

virtual void OsiSolverInterface::setColLower ( const double * array)
virtual

Reimplemented from OsiSolverInterface.

◆ setColUpper() [2/2]

virtual void OsiSolverInterface::setColUpper ( const double * array)
virtual

Reimplemented from OsiSolverInterface.

◆ addCol() [2/4]

virtual void OsiSolverInterface::addCol ( const CoinPackedVectorBase & vec,
const double collb,
const double colub,
const double obj,
std::string name )
virtual

Reimplemented from OsiSolverInterface.

◆ addCol() [3/4]

virtual void OsiSolverInterface::addCol ( int numberElements,
const int * rows,
const double * elements,
const double collb,
const double colub,
const double obj )
virtual

Reimplemented from OsiSolverInterface.

◆ addCol() [4/4]

virtual void OsiSolverInterface::addCol ( int numberElements,
const int * rows,
const double * elements,
const double collb,
const double colub,
const double obj,
std::string name )
virtual

Reimplemented from OsiSolverInterface.

◆ addRow() [3/5]

virtual void OsiSolverInterface::addRow ( const CoinPackedVectorBase & vec,
const double rowlb,
const double rowub,
std::string name )
virtual

Reimplemented from OsiSolverInterface.

◆ addRow() [4/5]

virtual void OsiSolverInterface::addRow ( const CoinPackedVectorBase & vec,
const char rowsen,
const double rowrhs,
const double rowrng,
std::string name )
virtual

Reimplemented from OsiSolverInterface.

◆ addRow() [5/5]

virtual void OsiSolverInterface::addRow ( int numberElements,
const int * columns,
const double * element,
const double rowlb,
const double rowub )
virtual

Reimplemented from OsiSolverInterface.

◆ getHintParam() [2/3]

virtual bool OsiSolverInterface::getHintParam ( OsiHintParam key,
bool & yesNo,
OsiHintStrength & strength ) const
virtual

Reimplemented from OsiSolverInterface.

◆ getHintParam() [3/3]

virtual bool OsiSolverInterface::getHintParam ( OsiHintParam key,
bool & yesNo ) const
virtual

Reimplemented from OsiSolverInterface.

Friends And Related Symbol Documentation

◆ OsiDylpSolverInterfaceUnitTest

void OsiDylpSolverInterfaceUnitTest ( const std::string & mpsDir,
const std::string & netLibDir )
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.

Member Data Documentation

◆ initialSolveOptions

lpopts_struct* OsiDylpSolverInterface::initialSolveOptions

Solver options for an initial solve.

Definition at line 778 of file OsiDylpSolverInterface.hpp.

◆ resolveOptions

lpopts_struct* OsiDylpSolverInterface::resolveOptions

Solver options for a resolve.

Definition at line 781 of file OsiDylpSolverInterface.hpp.

◆ tolerances

lptols_struct* OsiDylpSolverInterface::tolerances

Solver numeric tolerances.

Definition at line 784 of file OsiDylpSolverInterface.hpp.

◆ basis

CoinWarmStart* OsiDylpSolverInterface::basis

Definition at line 939 of file OsiDylpSolverInterface.hpp.

◆ condition

basisCondition OsiDylpSolverInterface::condition

Definition at line 940 of file OsiDylpSolverInterface.hpp.

◆ balance

int OsiDylpSolverInterface::balance

Definition at line 941 of file OsiDylpSolverInterface.hpp.

◆ simplex

int OsiDylpSolverInterface::simplex

Definition at line 957 of file OsiDylpSolverInterface.hpp.

◆ saved_fullsys

bool OsiDylpSolverInterface::saved_fullsys

Definition at line 958 of file OsiDylpSolverInterface.hpp.


The documentation for this class was generated from the following file: