Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Friends | List of all members
OsiClpSolverInterface Class Reference

Clp Solver Interface. More...

#include <OsiClpSolverInterface.hpp>

+ Inheritance diagram for OsiClpSolverInterface:
+ Collaboration diagram for OsiClpSolverInterface:

Public Member Functions

virtual void setObjSense (double s)
 Set objective function sense (1 for min (default), -1 for max,) More...
 
virtual void setColSolution (const double *colsol)
 Set the primal solution column values. More...
 
virtual void setRowPrice (const double *rowprice)
 Set dual solution vector. More...
 
Solve methods
virtual void initialSolve ()
 Solve initial LP relaxation. More...
 
virtual void resolve ()
 Resolve an LP relaxation after problem modification. More...
 
virtual void resolveGub (int needed)
 Resolve an LP relaxation after problem modification (try GUB) More...
 
virtual void branchAndBound ()
 Invoke solver's built-in enumeration algorithm. More...
 
void crossover (int options, int basis)
 Solve when primal column and dual row solutions are near-optimal options - 0 no presolve (use primal and dual) 1 presolve (just use primal) 2 no presolve (just use primal) basis - 0 use all slack basis 1 try and put some in basis. More...
 
OsiSimplexInterface methods

Methods for the Osi Simplex API.

The current implementation should work for both minimisation and maximisation in mode 1 (tableau access). In mode 2 (single pivot), only minimisation is supported as of 100907.

virtual int canDoSimplexInterface () const
 Simplex API capability. More...
 
virtual void enableFactorization () const
 Enables simplex mode 1 (tableau access) More...
 
virtual void disableFactorization () const
 Undo any setting changes made by enableFactorization. More...
 
virtual bool basisIsAvailable () const
 Returns true if a basis is available AND problem is optimal. 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 void getReducedGradient (double *columnReducedCosts, double *duals, const double *c) const
 Get the reduced gradient for the cost vector c. 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 getBInvARow (int row, CoinIndexedVector *z, CoinIndexedVector *slack=NULL, bool keepScaled=false) const
 Get a row of the tableau (slack part in slack if not NULL) If keepScaled is true then scale factors not applied after so user has to use coding similar to what is in this method. 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 getBInvACol (int col, CoinIndexedVector *vec) const
 Get a column of the tableau. More...
 
virtual void getBInvACol (CoinIndexedVector *vec) const
 Update (i.e. 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...
 
virtual void enableSimplexInterface (bool doingPrimal)
 Enables simplex mode 2 (individual pivot control) More...
 
void copyEnabledSuff (OsiClpSolverInterface &rhs)
 Copy across enabled stuff from one solver to another. More...
 
virtual void disableSimplexInterface ()
 Undo setting changes made by enableSimplexInterface. More...
 
void copyEnabledStuff (ClpSimplex &rhs)
 Copy across enabled stuff from one solver to another. 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...
 
Parameter set/get methods

The set methods return true if the parameter was set to the given value, false otherwise.

There can be various reasons for failure: the given parameter is not applicable for the solver (e.g., refactorization frequency for the clp algorithm), the parameter is not yet implemented for the solver or simply the value of the parameter is out of the range the solver accepts. If a parameter setting call returns false check the details of your solver.

The get methods return true if the given parameter is applicable for the solver and is implemented. In this case the value of the parameter is returned in the second argument. Otherwise they return false.

bool setIntParam (OsiIntParam key, int value)
 Set an integer parameter. More...
 
bool setDblParam (OsiDblParam key, double value)
 Set a double parameter. More...
 
bool setStrParam (OsiStrParam key, const std::string &value)
 Set a string parameter. More...
 
bool getIntParam (OsiIntParam key, int &value) const
 Get an integer parameter. More...
 
bool getDblParam (OsiDblParam key, double &value) const
 Get a double parameter. More...
 
bool getStrParam (OsiStrParam key, std::string &value) const
 Get a string parameter. More...
 
virtual bool setHintParam (OsiHintParam key, bool yesNo=true, OsiHintStrength strength=OsiHintTry, void *otherInformation=NULL)
 Set a hint parameter. More...
 
Methods returning info on how the solution process terminated
virtual bool isAbandoned () const
 Are there a numerical difficulties? More...
 
virtual bool isProvenOptimal () const
 Is optimality proven? More...
 
virtual bool isProvenPrimalInfeasible () const
 Is primal infeasiblity proven? More...
 
virtual bool isProvenDualInfeasible () const
 Is dual infeasiblity proven? More...
 
virtual bool isPrimalObjectiveLimitReached () const
 Is the given primal objective limit reached? More...
 
virtual bool isDualObjectiveLimitReached () const
 Is the given dual objective limit reached? More...
 
virtual bool isIterationLimitReached () const
 Iteration limit reached? More...
 
WarmStart related methods
virtual CoinWarmStartgetEmptyWarmStart () const
 Get an empty warm start object. More...
 
virtual CoinWarmStartgetWarmStart () const
 Get warmstarting information. More...
 
CoinWarmStartBasisgetPointerToWarmStart ()
 Get warmstarting information. More...
 
const CoinWarmStartBasisgetConstPointerToWarmStart () const
 Get warmstarting information. More...
 
virtual bool setWarmStart (const CoinWarmStart *warmstart)
 Set warmstarting information. More...
 
virtual CoinWarmStartgetPointerToWarmStart (bool &mustDelete)
 Get warm start information. More...
 
void setColumnStatus (int iColumn, ClpSimplex::Status status)
 Set column status in ClpSimplex and warmStart. More...
 
Hotstart related methods (primarily used in strong branching).

The user can create a hotstart (a snapshot) of the optimization process then reoptimize over and over again always starting from there.


NOTE: between hotstarted optimizations only bound changes are allowed.

virtual void markHotStart ()
 Create a hotstart point of the optimization process. More...
 
virtual void solveFromHotStart ()
 Optimize starting from the hotstart. More...
 
virtual void unmarkHotStart ()
 Delete the snapshot. More...
 
int startFastDual (int options)
 Start faster dual - returns negative if problems 1 if infeasible, Options to pass to solver 1 - create external reduced costs for columns 2 - create external reduced costs for rows 4 - create external row activity (columns always done) Above only done if feasible When set resolve does less work. More...
 
void stopFastDual ()
 Stop fast dual. More...
 
void setStuff (double tolerance, double increment)
 Sets integer tolerance and increment. More...
 
OsiRowCutsmallModelCut (const double *originalLower, const double *originalUpper, int numberRowsAtContinuous, const int *whichGenerator, int typeCut=0)
 Return a conflict analysis cut from small model. More...
 
OsiRowCutmodelCut (const double *originalLower, const double *originalUpper, int numberRowsAtContinuous, const int *whichGenerator, int typeCut=0)
 Return a conflict analysis cut from model If type is 0 then genuine cut, if 1 then only partially processed. More...
 
Methods related to querying the input data
virtual int getNumCols () const
 Get number of columns. More...
 
virtual int getNumRows () const
 Get number of rows. More...
 
virtual int getNumElements () const
 Get number of nonzero elements. More...
 
virtual std::string getRowName (int rowIndex, unsigned maxLen=static_cast< unsigned >(std::string::npos)) const
 Return name of row if one exists or Rnnnnnnn maxLen is currently ignored and only there to match the signature from the base class! More...
 
virtual std::string getColName (int colIndex, unsigned maxLen=static_cast< unsigned >(std::string::npos)) const
 Return name of column if one exists or Cnnnnnnn maxLen is currently ignored and only there to match the signature from the base class! More...
 
virtual const double * getColLower () const
 Get pointer to array[getNumCols()] of column lower bounds. More...
 
virtual const double * getColUpper () const
 Get pointer to array[getNumCols()] of column upper bounds. More...
 
virtual const char * getRowSense () const
 Get pointer to array[getNumRows()] of row constraint senses. More...
 
virtual const double * getRightHandSide () const
 Get pointer to array[getNumRows()] of rows right-hand sides. More...
 
virtual const double * getRowRange () const
 Get pointer to array[getNumRows()] of row ranges. More...
 
virtual const double * getRowLower () const
 Get pointer to array[getNumRows()] of row lower bounds. More...
 
virtual const double * getRowUpper () const
 Get pointer to array[getNumRows()] of row upper bounds. More...
 
virtual const double * getObjCoefficients () const
 Get pointer to array[getNumCols()] of objective function coefficients. More...
 
virtual double getObjSense () const
 Get objective function sense (1 for min (default), -1 for max) More...
 
virtual bool isContinuous (int colNumber) const
 Return true if column is continuous. More...
 
virtual bool isBinary (int colIndex) const
 Return true if variable is binary. More...
 
virtual bool isInteger (int colIndex) const
 Return true if column is integer. More...
 
virtual bool isIntegerNonBinary (int colIndex) const
 Return true if variable is general integer. More...
 
virtual bool isFreeBinary (int colIndex) const
 Return true if variable is binary and not fixed at either bound. More...
 
virtual const char * getColType (bool refresh=false) const
 Return array of column length 0 - continuous 1 - binary (may get fixed later) 2 - general integer (may get fixed later) More...
 
bool isOptionalInteger (int colIndex) const
 Return true if column is integer but does not have to be declared as such. More...
 
void setOptionalInteger (int index)
 Set the index-th variable to be an optional integer variable. More...
 
virtual const CoinPackedMatrixgetMatrixByRow () const
 Get pointer to row-wise copy of matrix. More...
 
virtual const CoinPackedMatrixgetMatrixByCol () const
 Get pointer to column-wise copy of matrix. More...
 
virtual CoinPackedMatrixgetMutableMatrixByCol () const
 Get pointer to mutable column-wise copy of matrix. More...
 
virtual double getInfinity () const
 Get solver's value for infinity. More...
 
Methods related to querying the solution
virtual const double * getColSolution () const
 Get pointer to array[getNumCols()] of primal solution vector. More...
 
virtual const double * getRowPrice () const
 Get pointer to array[getNumRows()] of dual prices. More...
 
virtual const double * getReducedCost () const
 Get a pointer to array[getNumCols()] of reduced costs. More...
 
virtual const double * getRowActivity () const
 Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vector. More...
 
virtual double getObjValue () const
 Get objective function value. More...
 
virtual int getIterationCount () const
 Get how many iterations it took to solve the problem (whatever "iteration" mean to the solver. More...
 
virtual std::vector< double * > getDualRays (int maxNumRays, bool fullRay=false) const
 Get as many dual rays as the solver can provide. More...
 
virtual std::vector< double * > getPrimalRays (int maxNumRays) const
 Get as many primal rays as the solver can provide. More...
 
Changing bounds on variables and constraints
virtual void setObjCoeff (int elementIndex, double elementValue)
 Set an objective function coefficient. More...
 
virtual void setColLower (int elementIndex, double elementValue)
 Set a single column lower bound
Use -DBL_MAX for -infinity. More...
 
virtual void setColUpper (int elementIndex, double elementValue)
 Set a single column upper bound
Use DBL_MAX for infinity. 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 bounds on a number of columns simultaneously
The default implementation just invokes setColLower() and setColUpper() over and over again. More...
 
virtual void setRowLower (int elementIndex, double elementValue)
 Set a single row lower bound
Use -DBL_MAX for -infinity. More...
 
virtual void setRowUpper (int elementIndex, double elementValue)
 Set a single row upper bound
Use DBL_MAX for infinity. More...
 
virtual void setRowBounds (int elementIndex, double lower, double upper)
 Set a single row lower and upper bound. More...
 
virtual void setRowType (int index, char sense, double rightHandSide, double range)
 Set the type of a single row
More...
 
virtual void setRowSetBounds (const int *indexFirst, const int *indexLast, const double *boundList)
 Set the bounds on a number of rows simultaneously
The default implementation just invokes setRowLower() and setRowUpper() over and over again. More...
 
virtual void setRowSetTypes (const int *indexFirst, const int *indexLast, const char *senseList, const double *rhsList, const double *rangeList)
 Set the type of a number of rows simultaneously
The default implementation just invokes setRowType() over and over again. More...
 
virtual void setObjective (const double *array)
 Set the objective coefficients for all columns array [getNumCols()] is an array of values for the objective. More...
 
virtual void setColLower (const double *array)
 Set the lower bounds for all columns array [getNumCols()] is an array of values for the objective. More...
 
virtual void setColUpper (const double *array)
 Set the upper bounds for all columns array [getNumCols()] is an array of values for the objective. More...
 
virtual void setRowName (int rowIndex, std::string name)
 Set name of row. More...
 
virtual void setColName (int colIndex, std::string name)
 Set name of column. More...
 
Integrality related changing methods
virtual void setContinuous (int index)
 Set the index-th variable to be a continuous variable. More...
 
virtual void setInteger (int index)
 Set the index-th variable to be an integer variable. More...
 
virtual void setContinuous (const int *indices, int len)
 Set the variables listed in indices (which is of length len) to be continuous variables. More...
 
virtual void setInteger (const int *indices, int len)
 Set the variables listed in indices (which is of length len) to be integer variables. More...
 
int numberSOS () const
 Number of SOS sets. More...
 
const CoinSetsetInfo () const
 SOS set info. More...
 
virtual int findIntegersAndSOS (bool justCount)
 Identify integer variables and SOS and create corresponding objects. More...
 
Methods to expand a problem.<br>

Note that if a column is added then by default it will correspond to a continuous variable.

virtual void addCol (const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj)
 Add a column (primal variable) to the problem. 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...
 
virtual void deleteCols (const int num, const int *colIndices)
 Remove a set of columns (primal variables) from the problem. More...
 
virtual void addRow (const CoinPackedVectorBase &vec, const double rowlb, const double rowub)
 Add a row (constraint) to the problem. 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)
 Add a row (constraint) to the problem. More...
 
virtual void addRow (int numberElements, const int *columns, const double *element, const double rowlb, const double rowub)
 Add a 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 addRows (const int numrows, const CoinPackedVectorBase *const *rows, const double *rowlb, const double *rowub)
 Add a set of rows (constraints) to the problem. More...
 
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 modifyCoefficient (int row, int column, double newElement, bool keepZero=false)
 
virtual void deleteRows (const int num, const int *rowIndices)
 Delete a set of rows (constraints) from the problem. More...
 
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 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...
 
virtual ApplyCutsReturnCode applyCuts (const OsiCuts &cs, double effectivenessLb=0.0)
 Apply a collection of cuts. More...
 
Methods to input a problem
virtual void loadProblem (const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub)
 Load in an problem by copying the arguments (the constraints on the rows are given by lower and upper bounds). More...
 
virtual void assignProblem (CoinPackedMatrix *&matrix, double *&collb, double *&colub, double *&obj, double *&rowlb, double *&rowub)
 Load in an problem by assuming ownership of the arguments (the constraints on the rows are given by lower and upper bounds). More...
 
virtual void loadProblem (const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const char *rowsen, const double *rowrhs, const double *rowrng)
 Load in an problem by copying the arguments (the constraints on the rows are given by sense/rhs/range triplets). More...
 
virtual void assignProblem (CoinPackedMatrix *&matrix, double *&collb, double *&colub, double *&obj, char *&rowsen, double *&rowrhs, double *&rowrng)
 Load in an problem by assuming ownership of the arguments (the constraints on the rows are given by sense/rhs/range triplets). More...
 
virtual void loadProblem (const ClpMatrixBase &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub)
 Just like the other loadProblem() methods except that the matrix is given as a ClpMatrixBase. 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)
 Just like the other loadProblem() methods except that the matrix is given in a standard column major ordered format (without gaps). 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)
 Just like the other loadProblem() methods except that the matrix is given in a standard column major ordered format (without gaps). More...
 
virtual int loadFromCoinModel (CoinModel &modelObject, bool keepSolution=false)
 This loads a model from a coinModel object - returns number of errors. More...
 
virtual int readMps (const char *filename, const char *extension="mps")
 Read an mps file from the given filename (defaults to Osi reader) - returns number of errors (see OsiMpsReader class) More...
 
int readMps (const char *filename, bool keepNames, bool allowErrors)
 Read an mps file from the given filename returns number of errors (see OsiMpsReader class) More...
 
virtual int readMps (const char *filename, const char *extension, int &numberSets, CoinSet **&sets)
 Read an mps file. More...
 
virtual void writeMps (const char *filename, const char *extension="mps", double objSense=0.0) const
 Write the problem into an mps file of the given filename. More...
 
virtual int writeMpsNative (const char *filename, const char **rowNames, const char **columnNames, int formatType=0, int numberAcross=2, double objSense=0.0) const
 Write the problem into an mps file of the given filename, names may be null. More...
 
virtual int readLp (const char *filename, const double epsilon=1e-5)
 Read file in LP format (with names) 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. 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...
 
virtual void replaceMatrixOptional (const CoinPackedMatrix &matrix)
 I (JJF) am getting annoyed because I can't just replace a matrix. More...
 
virtual void replaceMatrix (const CoinPackedMatrix &matrix)
 And if it does matter (not used at present) More...
 
Message handling (extra for Clp messages).

Normally I presume you would want the same language.

If not then you could use underlying model pointer

virtual void passInMessageHandler (CoinMessageHandler *handler)
 Pass in a message handler. More...
 
void newLanguage (CoinMessages::Language language)
 Set language. More...
 
void setLanguage (CoinMessages::Language language)
 
void setLogLevel (int value)
 Set log level (will also set underlying solver's log level) More...
 
void generateCpp (FILE *fp)
 Create C++ lines to get to current state. More...
 
Clp specific public interfaces
ClpSimplexgetModelPtr () const
 Get pointer to Clp model. More...
 
ClpSimplexswapModelPtr (ClpSimplex *newModel)
 Set pointer to Clp model and return old. More...
 
unsigned int specialOptions () const
 Get special options. More...
 
void setSpecialOptions (unsigned int value)
 
int lastAlgorithm () const
 Last algorithm used , 1 = primal, 2 = dual other unknown. More...
 
void setLastAlgorithm (int value)
 Set last algorithm used , 1 = primal, 2 = dual other unknown. More...
 
int cleanupScaling () const
 Get scaling action option. More...
 
void setCleanupScaling (int value)
 Set Scaling option When scaling is on it is possible that the scaled problem is feasible but the unscaled is not. More...
 
double smallestElementInCut () const
 Get smallest allowed element in cut. More...
 
void setSmallestElementInCut (double value)
 Set smallest allowed element in cut. More...
 
double smallestChangeInCut () const
 Get smallest change in cut. More...
 
void setSmallestChangeInCut (double value)
 Set smallest change in cut. More...
 
void setSolveOptions (const ClpSolve &options)
 Pass in initial solve options. More...
 
virtual int tightenBounds (int lightweight=0)
 Tighten bounds - lightweight or very lightweight 0 - normal, 1 lightweight but just integers, 2 lightweight and all. More...
 
int infeasibleOtherWay (char *whichWay)
 See if any integer variables make infeasible other way. More...
 
virtual CoinBigIndex getSizeL () const
 Return number of entries in L part of current factorization. More...
 
virtual CoinBigIndex getSizeU () const
 Return number of entries in U part of current factorization. More...
 
const OsiClpDisasterHandlerdisasterHandler () const
 Get disaster handler. More...
 
void passInDisasterHandler (OsiClpDisasterHandler *handler)
 Pass in disaster handler. More...
 
ClpLinearObjectivefakeObjective () const
 Get fake objective. More...
 
void setFakeObjective (ClpLinearObjective *fakeObjective)
 Set fake objective (and take ownership) More...
 
void setFakeObjective (double *fakeObjective)
 Set fake objective. More...
 
void setupForRepeatedUse (int senseOfAdventure=0, int printOut=0)
 Set up solver for repeated use by Osi interface. More...
 
virtual void synchronizeModel ()
 Synchronize model (really if no cuts in tree) More...
 
void setSpecialOptionsMutable (unsigned int value) const
 Set special options in underlying clp solver. More...
 
Constructors and destructors
 OsiClpSolverInterface ()
 Default Constructor. More...
 
virtual OsiSolverInterfaceclone (bool copyData=true) const
 Clone. More...
 
 OsiClpSolverInterface (const OsiClpSolverInterface &)
 Copy constructor. More...
 
 OsiClpSolverInterface (ClpSimplex *rhs, bool reallyOwn=false)
 Borrow constructor - only delete one copy. More...
 
void releaseClp ()
 Releases so won't error. More...
 
OsiClpSolverInterfaceoperator= (const OsiClpSolverInterface &rhs)
 Assignment operator. More...
 
virtual ~OsiClpSolverInterface ()
 Destructor. More...
 
virtual void reset ()
 Resets as if default constructor. More...
 
- Public Member Functions inherited from OsiSolverInterface
virtual bool getHintParam (OsiHintParam key, bool &yesNo, OsiHintStrength &strength, void *&otherInformation) const
 Get a hint parameter (all information) 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 int getNumIntegers () const
 Get the number of integer variables. More...
 
const char * columnType (bool refresh=false) const
 Return an array[getNumCols()] of column types. More...
 
virtual CoinPackedMatrixgetMutableMatrixByRow () const
 Get a pointer to a mutable row-wise copy of the matrix. More...
 
virtual const double * getStrictColSolution ()
 Get a pointer to an array[getNumCols()] of primal variable values 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 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 void setObjName (std::string name)
 Set the name of the objective function. More...
 
virtual const OsiNameVecgetRowNames ()
 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 const OsiNameVecgetColNames ()
 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...
 
void addCols (const CoinBuild &buildObject)
 Add columns using a CoinBuild object. More...
 
int addCols (CoinModel &modelObject)
 Add columns from a model object. More...
 
void addRows (const CoinBuild &buildObject)
 Add rows using a CoinBuild object. More...
 
int addRows (CoinModel &modelObject)
 Add rows from a CoinModel object. More...
 
void deleteBranchingInfo (int numberDeleted, const int *which)
 Deletes branching information before columns deleted. 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...
 
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...
 
int readLp (FILE *fp, const double epsilon=1e-5)
 Read file in LP format from the file pointed to by fp. More...
 
int differentModel (OsiSolverInterface &other, bool ignoreNames=true)
 Check two models against each other. More...
 
void setApplicationData (void *appData)
 Set application data. More...
 
void setAuxiliaryInfo (OsiAuxInfo *auxiliaryInfo)
 Create a clone of an Auxiliary Information object. More...
 
voidgetApplicationData () const
 Get application data. More...
 
OsiAuxInfogetAuxiliaryInfo () const
 Get pointer to auxiliary info object. More...
 
void newLanguage (CoinMessages::Language language)
 Set language. More...
 
void setLanguage (CoinMessages::Language language)
 
CoinMessageHandlermessageHandler () const
 Return a pointer to the current message handler. More...
 
CoinMessages messages ()
 Return the current set of messages. More...
 
CoinMessagesmessagesPointer ()
 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...
 
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 OsiObjectobject (int which) const
 Get the specified object. More...
 
OsiObjectmodifiableObject (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...
 
virtual void activateRowCutDebugger (const char *modelName)
 Activate the row cut debugger. More...
 
virtual void activateRowCutDebugger (const double *solution, bool enforceOptimality=true)
 Activate the row cut debugger using a full solution array. More...
 
const OsiRowCutDebuggergetRowCutDebugger () const
 Get the row cut debugger provided the solution known to the debugger is within the feasible region held in the solver. More...
 
OsiRowCutDebuggergetRowCutDebuggerAlways () const
 Get the row cut debugger object. More...
 
bool optimalBasisIsAvailable () const
 Synonym for basisIsAvailable. More...
 
 OsiSolverInterface ()
 Default Constructor. More...
 
 OsiSolverInterface (const OsiSolverInterface &)
 Copy constructor. More...
 
OsiSolverInterfaceoperator= (const OsiSolverInterface &rhs)
 Assignment operator. More...
 
virtual ~OsiSolverInterface ()
 Destructor. More...
 

Protected Attributes

Protected member data
ClpSimplexmodelPtr_
 Clp model represented by this class instance. More...
 
Cached information derived from the OSL model
char * rowsense_
 Pointer to dense vector of row sense indicators. More...
 
double * rhs_
 Pointer to dense vector of row right-hand side values. More...
 
double * rowrange_
 Pointer to dense vector of slack upper bounds for range constraints (undefined for non-range rows) More...
 
CoinWarmStartBasisws_
 A pointer to the warmstart information to be used in the hotstarts. More...
 
double * rowActivity_
 also save row and column information for hot starts only used in hotstarts so can be casual More...
 
double * columnActivity_
 
ClpNodeStuff stuff_
 Stuff for fast dual. More...
 
int numberSOS_
 Number of SOS sets. More...
 
CoinSetsetInfo_
 SOS set info. More...
 
ClpSimplexsmallModel_
 Alternate model (hot starts) - but also could be permanent and used for crunch. More...
 
ClpFactorizationfactorization_
 factorization for hot starts More...
 
double smallestElementInCut_
 Smallest allowed element in cut. More...
 
double smallestChangeInCut_
 Smallest change in cut. More...
 
double largestAway_
 Largest amount continuous away from bound. More...
 
char * spareArrays_
 Arrays for hot starts. More...
 
CoinWarmStartBasis basis_
 Warmstart information to be used in resolves. More...
 
int itlimOrig_
 The original iteration limit before hotstarts started. More...
 
int lastAlgorithm_
 Last algorithm used. More...
 
bool notOwned_
 To say if destructor should delete underlying model. More...
 
CoinPackedMatrixmatrixByRow_
 Pointer to row-wise copy of problem matrix coefficients. More...
 
CoinPackedMatrixmatrixByRowAtContinuous_
 Pointer to row-wise copy of continuous problem matrix coefficients. More...
 
char * integerInformation_
 Pointer to integer information. More...
 
int * whichRange_
 Pointer to variables for which we want range information The number is in [0] memory is not owned by OsiClp. More...
 
bool fakeMinInSimplex_
 Faking min to get proper dual solution signs in simplex API. More...
 
double * linearObjective_
 Linear objective. More...
 
ClpDataSave saveData_
 To save data in OsiSimplex stuff. More...
 
ClpSolve solveOptions_
 Options for initialSolve. More...
 
int cleanupScaling_
 Scaling option When scaling is on it is possible that the scaled problem is feasible but the unscaled is not. More...
 
unsigned int specialOptions_
 Special options 0x80000000 off 0 simple stuff for branch and bound 1 try and keep work regions as much as possible 2 do not use any perturbation 4 allow exit before re-factorization 8 try and re-use factorization if no cuts 16 use standard strong branching rather than clp's 32 Just go to first factorization in fast dual 64 try and tighten bounds in crunch 128 Model will only change in column bounds 256 Clean up model before hot start 512 Give user direct access to Clp regions in getBInvARow etc (i.e., do not unscale, and do not return result in getBInv parameters; you have to know where to look for the answer) 1024 Don't "borrow" model in initialSolve 2048 Don't crunch 4096 quick check for optimality Bits above 8192 give where called from in Cbc At present 0 is normal, 1 doing fast hotstarts, 2 is can do quick check 65536 Keep simple i.e. More...
 
ClpSimplexbaseModel_
 Copy of model when option 131072 set. More...
 
int lastNumberRows_
 Number of rows when last "scaled". More...
 
ClpSimplexcontinuousModel_
 Continuous model. More...
 
OsiClpDisasterHandlerdisasterHandler_
 Possible disaster handler. More...
 
ClpLinearObjectivefakeObjective_
 Fake objective. More...
 
CoinDoubleArrayWithLength rowScale_
 Row scale factors (has inverse at end) More...
 
CoinDoubleArrayWithLength columnScale_
 Column scale factors (has inverse at end) More...
 
- Protected Attributes inherited from OsiSolverInterface
OsiRowCutDebuggerrowCutDebugger_
 Pointer to row cut debugger object. More...
 
CoinMessageHandlerhandler_
 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...
 

Friends

void OsiClpSolverInterfaceUnitTest (const std::string &mpsDir, const std::string &netlibDir)
 A function that tests the methods in the OsiClpSolverInterface class. More...
 

Protected methods

void setBasis (const CoinWarmStartBasis &basis)
 Sets up working basis as a copy of input and puts in as basis. More...
 
void setBasis ()
 Just puts current basis_ into ClpSimplex model. More...
 
CoinWarmStartDiffgetBasisDiff (const unsigned char *statusArray) const
 Warm start difference from basis_ to statusArray. More...
 
CoinWarmStartBasisgetBasis (const unsigned char *statusArray) const
 Warm start from statusArray. More...
 
void deleteScaleFactors ()
 Delete all scale factor stuff and reset option. More...
 
const double * upRange () const
 If doing fast hot start then ranges are computed. More...
 
const double * downRange () const
 
void passInRanges (int *array)
 Pass in range array. More...
 
void setSOSData (int numberSOS, const char *type, const int *start, const int *indices, const double *weights=NULL)
 Pass in sos stuff from AMPl. More...
 
void computeLargestAway ()
 Compute largest amount any at continuous away from bound. More...
 
double largestAway () const
 Get largest amount continuous away from bound. More...
 
void setLargestAway (double value)
 Set largest amount continuous away from bound. More...
 
void lexSolve ()
 Sort of lexicographic resolve. More...
 
virtual void applyRowCut (const OsiRowCut &rc)
 Apply a row cut (append to constraint matrix). More...
 
virtual void applyColCut (const OsiColCut &cc)
 Apply a column cut (adjust one or more bounds). More...
 
void gutsOfDestructor ()
 The real work of a copy constructor (used by copy and assignment) More...
 
void freeCachedResults () const
 Deletes all mutable stuff. More...
 
void freeCachedResults0 () const
 Deletes all mutable stuff for row ranges etc. More...
 
void freeCachedResults1 () const
 Deletes all mutable stuff for matrix etc. More...
 
void extractSenseRhsRange () const
 A method that fills up the rowsense_, rhs_ and rowrange_ arrays. More...
 
void fillParamMaps ()
 
CoinWarmStartBasis getBasis (ClpSimplex *model) const
 Warm start. More...
 
void setBasis (const CoinWarmStartBasis &basis, ClpSimplex *model)
 Sets up working basis as a copy of input. More...
 
void crunch ()
 Crunch down problem a bit. More...
 
void redoScaleFactors (int numberRows, const CoinBigIndex *starts, const int *indices, const double *elements)
 Extend scale factors. More...
 

Additional Inherited Members

- Public Types inherited from OsiSolverInterface
typedef std::vector< std::string > OsiNameVec
 Data type for name vectors. More...
 
- Protected Member Functions inherited from OsiSolverInterface
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 >
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...
 

Detailed Description

Clp Solver Interface.

Instantiation of OsiClpSolverInterface for the Model Algorithm.

Definition at line 38 of file OsiClpSolverInterface.hpp.

Constructor & Destructor Documentation

OsiClpSolverInterface::OsiClpSolverInterface ( )

Default Constructor.

OsiClpSolverInterface::OsiClpSolverInterface ( const OsiClpSolverInterface )

Copy constructor.

OsiClpSolverInterface::OsiClpSolverInterface ( ClpSimplex rhs,
bool  reallyOwn = false 
)

Borrow constructor - only delete one copy.

virtual OsiClpSolverInterface::~OsiClpSolverInterface ( )
virtual

Destructor.

Member Function Documentation

virtual void OsiClpSolverInterface::initialSolve ( )
virtual

Solve initial LP relaxation.

Implements OsiSolverInterface.

Reimplemented in OsiSolverLinearizedQuadratic, OsiSolverLink, CbcSolver2, CbcSolver3, CbcSolverLongThin, and ClpQuadInterface.

virtual void OsiClpSolverInterface::resolve ( )
virtual

Resolve an LP relaxation after problem modification.

Implements OsiSolverInterface.

Reimplemented in OsiSolverLink, CbcSolver2, CbcSolver3, CbcSolverLongThin, and ClpQuadInterface.

virtual void OsiClpSolverInterface::resolveGub ( int  needed)
virtual

Resolve an LP relaxation after problem modification (try GUB)

virtual void OsiClpSolverInterface::branchAndBound ( )
virtual

Invoke solver's built-in enumeration algorithm.

Implements OsiSolverInterface.

void OsiClpSolverInterface::crossover ( int  options,
int  basis 
)

Solve when primal column and dual row solutions are near-optimal options - 0 no presolve (use primal and dual) 1 presolve (just use primal) 2 no presolve (just use primal) basis - 0 use all slack basis 1 try and put some in basis.

virtual int OsiClpSolverInterface::canDoSimplexInterface ( ) const
virtual

Simplex API capability.

Returns

  • 0 if no simplex API
  • 1 if can just do getBInv etc
  • 2 if has all OsiSimplex methods

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::enableFactorization ( ) const
virtual

Enables simplex mode 1 (tableau access)

Tells solver that calls to getBInv etc are about to take place. Underlying code may need mutable as this may be called from CglCut::generateCuts which is const. If that is too horrific then each solver e.g. BCP or CBC will have to do something outside main loop.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::disableFactorization ( ) const
virtual

Undo any setting changes made by enableFactorization.

Reimplemented from OsiSolverInterface.

virtual bool OsiClpSolverInterface::basisIsAvailable ( ) const
virtual

Returns true if a basis is available AND problem is optimal.

This should be used to see if the BInvARow type operations are possible and meaningful.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::getBasisStatus ( int *  cstat,
int *  rstat 
) const
virtual

The following two methods may be replaced by the methods of OsiSolverInterface using OsiWarmStartBasis if:

  1. OsiWarmStartBasis resize operation is implemented more efficiently and
  2. It is ensured that effects on the solver are the same

Returns a basis status of the structural/artificial variables At present as warm start i.e 0 free, 1 basic, 2 upper, 3 lower

NOTE artificials are treated as +1 elements so for <= rhs artificial will be at lower bound if constraint is tight

This means that Clpsimplex flips artificials as it works in terms of row activities

Reimplemented from OsiSolverInterface.

virtual int OsiClpSolverInterface::setBasisStatus ( const int *  cstat,
const int *  rstat 
)
virtual

Set the status of structural/artificial variables and factorize, update solution etc.

NOTE artificials are treated as +1 elements so for <= rhs artificial will be at lower bound if constraint is tight

This means that Clpsimplex flips artificials as it works in terms of row activities Returns 0 if OK, 1 if problem is bad e.g. duplicate elements, too large ...

Reimplemented from OsiSolverInterface.

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

Get the reduced gradient for the cost vector c.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::getBInvARow ( int  row,
double *  z,
double *  slack = NULL 
) const
virtual

Get a row of the tableau (slack part in slack if not NULL)

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::getBInvARow ( int  row,
CoinIndexedVector z,
CoinIndexedVector slack = NULL,
bool  keepScaled = false 
) const
virtual

Get a row of the tableau (slack part in slack if not NULL) If keepScaled is true then scale factors not applied after so user has to use coding similar to what is in this method.

virtual void OsiClpSolverInterface::getBInvRow ( int  row,
double *  z 
) const
virtual

Get a row of the basis inverse.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::getBInvACol ( int  col,
double *  vec 
) const
virtual

Get a column of the tableau.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::getBInvACol ( int  col,
CoinIndexedVector vec 
) const
virtual

Get a column of the tableau.

virtual void OsiClpSolverInterface::getBInvACol ( CoinIndexedVector vec) const
virtual

Update (i.e.

ftran) the vector passed in. Unscaling is applied after - can't be applied before

virtual void OsiClpSolverInterface::getBInvCol ( int  col,
double *  vec 
) const
virtual

Get a column of the basis inverse.

Reimplemented from OsiSolverInterface.

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

Get basic indices (order of indices corresponds to the order of elements in a vector retured by getBInvACol() and getBInvCol()).

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::enableSimplexInterface ( bool  doingPrimal)
virtual

Enables simplex mode 2 (individual pivot control)

This method is supposed to ensure that all typical things (like reduced costs, etc.) are updated when individual pivots are executed and can be queried by other methods.

Reimplemented from OsiSolverInterface.

void OsiClpSolverInterface::copyEnabledSuff ( OsiClpSolverInterface rhs)

Copy across enabled stuff from one solver to another.

virtual void OsiClpSolverInterface::disableSimplexInterface ( )
virtual

Undo setting changes made by enableSimplexInterface.

Reimplemented from OsiSolverInterface.

void OsiClpSolverInterface::copyEnabledStuff ( ClpSimplex rhs)

Copy across enabled stuff from one solver to another.

virtual int OsiClpSolverInterface::pivot ( int  colIn,
int  colOut,
int  outStatus 
)
virtual

Perform a pivot by substituting a colIn for colOut in the basis.

The status of the leaving variable is given in statOut. Where 1 is to upper bound, -1 to lower bound Return code is 0 for okay, 1 if inaccuracy forced re-factorization (should be okay) and -1 for singular factorization

Reimplemented from OsiSolverInterface.

virtual int OsiClpSolverInterface::primalPivotResult ( int  colIn,
int  sign,
int &  colOut,
int &  outStatus,
double &  t,
CoinPackedVector dx 
)
virtual

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.

Inputs: colIn – entering column, sign – direction of its change (+/-1). Both for colIn and colOut, artificial variables are index by the negative of the row index minus 1. Return code (for now): 0 – leaving variable found, -1 – everything else? Clearly, more informative set of return values is required Primal and dual solutions are updated

Reimplemented from OsiSolverInterface.

virtual int OsiClpSolverInterface::dualPivotResult ( int &  colIn,
int &  sign,
int  colOut,
int  outStatus,
double &  t,
CoinPackedVector dx 
)
virtual

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.

Reimplemented from OsiSolverInterface.

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

Set an integer parameter.

Reimplemented from OsiSolverInterface.

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

Set a double parameter.

Reimplemented from OsiSolverInterface.

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

Set a string parameter.

Reimplemented from OsiSolverInterface.

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

Get an integer parameter.

Reimplemented from OsiSolverInterface.

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

Get a double parameter.

Reimplemented from OsiSolverInterface.

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

Get a string parameter.

Reimplemented from OsiSolverInterface.

virtual bool OsiClpSolverInterface::setHintParam ( OsiHintParam  key,
bool  yesNo = true,
OsiHintStrength  strength = OsiHintTry,
void = NULL 
)
virtual

Set a hint parameter.

The otherInformation parameter can be used to pass in an arbitrary block of information which is interpreted by the OSI and the underlying solver. Users are cautioned that this hook is solver-specific.

Implementors: The default implementation completely ignores otherInformation and always throws an exception for OsiForceDo. This is almost certainly not the behaviour you want; you really should override this method.

Reimplemented from OsiSolverInterface.

virtual bool OsiClpSolverInterface::isAbandoned ( ) const
virtual

Are there a numerical difficulties?

Implements OsiSolverInterface.

virtual bool OsiClpSolverInterface::isProvenOptimal ( ) const
virtual

Is optimality proven?

Implements OsiSolverInterface.

virtual bool OsiClpSolverInterface::isProvenPrimalInfeasible ( ) const
virtual

Is primal infeasiblity proven?

Implements OsiSolverInterface.

virtual bool OsiClpSolverInterface::isProvenDualInfeasible ( ) const
virtual

Is dual infeasiblity proven?

Implements OsiSolverInterface.

virtual bool OsiClpSolverInterface::isPrimalObjectiveLimitReached ( ) const
virtual

Is the given primal objective limit reached?

Reimplemented from OsiSolverInterface.

virtual bool OsiClpSolverInterface::isDualObjectiveLimitReached ( ) const
virtual

Is the given dual objective limit reached?

Reimplemented from OsiSolverInterface.

virtual bool OsiClpSolverInterface::isIterationLimitReached ( ) const
virtual

Iteration limit reached?

Implements OsiSolverInterface.

virtual CoinWarmStart* OsiClpSolverInterface::getEmptyWarmStart ( ) const
virtual

Get an empty warm start object.

This routine returns an empty CoinWarmStartBasis object. Its purpose is to provide a way to give a client a warm start basis object of the appropriate type, which can resized and modified as desired.

Implements OsiSolverInterface.

virtual CoinWarmStart* OsiClpSolverInterface::getWarmStart ( ) const
virtual

Get warmstarting information.

Implements OsiSolverInterface.

CoinWarmStartBasis* OsiClpSolverInterface::getPointerToWarmStart ( )
inline

Get warmstarting information.

Definition at line 292 of file OsiClpSolverInterface.hpp.

const CoinWarmStartBasis* OsiClpSolverInterface::getConstPointerToWarmStart ( ) const
inline

Get warmstarting information.

Definition at line 295 of file OsiClpSolverInterface.hpp.

virtual bool OsiClpSolverInterface::setWarmStart ( const CoinWarmStart warmstart)
virtual

Set warmstarting information.

Return true/false depending on whether the warmstart information was accepted or not.

Implements OsiSolverInterface.

virtual CoinWarmStart* OsiClpSolverInterface::getPointerToWarmStart ( bool &  mustDelete)
virtual

Get warm start information.

Return warm start information for the current state of the solver interface. If there is no valid warm start information, an empty warm start object wil be returned. This does not necessarily create an object - may just point to one. must Delete set true if user should delete returned object. OsiClp version always returns pointer and false.

Reimplemented from OsiSolverInterface.

void OsiClpSolverInterface::setColumnStatus ( int  iColumn,
ClpSimplex::Status  status 
)

Set column status in ClpSimplex and warmStart.

virtual void OsiClpSolverInterface::markHotStart ( )
virtual

Create a hotstart point of the optimization process.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::solveFromHotStart ( )
virtual

Optimize starting from the hotstart.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::unmarkHotStart ( )
virtual

Delete the snapshot.

Reimplemented from OsiSolverInterface.

int OsiClpSolverInterface::startFastDual ( int  options)

Start faster dual - returns negative if problems 1 if infeasible, Options to pass to solver 1 - create external reduced costs for columns 2 - create external reduced costs for rows 4 - create external row activity (columns always done) Above only done if feasible When set resolve does less work.

void OsiClpSolverInterface::stopFastDual ( )

Stop fast dual.

void OsiClpSolverInterface::setStuff ( double  tolerance,
double  increment 
)

Sets integer tolerance and increment.

OsiRowCut* OsiClpSolverInterface::smallModelCut ( const double *  originalLower,
const double *  originalUpper,
int  numberRowsAtContinuous,
const int *  whichGenerator,
int  typeCut = 0 
)

Return a conflict analysis cut from small model.

OsiRowCut* OsiClpSolverInterface::modelCut ( const double *  originalLower,
const double *  originalUpper,
int  numberRowsAtContinuous,
const int *  whichGenerator,
int  typeCut = 0 
)

Return a conflict analysis cut from model If type is 0 then genuine cut, if 1 then only partially processed.

virtual int OsiClpSolverInterface::getNumCols ( ) const
inlinevirtual

Get number of columns.

Implements OsiSolverInterface.

Definition at line 370 of file OsiClpSolverInterface.hpp.

virtual int OsiClpSolverInterface::getNumRows ( ) const
inlinevirtual

Get number of rows.

Implements OsiSolverInterface.

Definition at line 374 of file OsiClpSolverInterface.hpp.

virtual int OsiClpSolverInterface::getNumElements ( ) const
inlinevirtual

Get number of nonzero elements.

Implements OsiSolverInterface.

Definition at line 378 of file OsiClpSolverInterface.hpp.

virtual std::string OsiClpSolverInterface::getRowName ( int  rowIndex,
unsigned  maxLen = static_cast< unsigned >(std::string::npos) 
) const
virtual

Return name of row if one exists or Rnnnnnnn maxLen is currently ignored and only there to match the signature from the base class!

Reimplemented from OsiSolverInterface.

virtual std::string OsiClpSolverInterface::getColName ( int  colIndex,
unsigned  maxLen = static_cast< unsigned >(std::string::npos) 
) const
virtual

Return name of column if one exists or Cnnnnnnn maxLen is currently ignored and only there to match the signature from the base class!

Reimplemented from OsiSolverInterface.

virtual const double* OsiClpSolverInterface::getColLower ( ) const
inlinevirtual

Get pointer to array[getNumCols()] of column lower bounds.

Implements OsiSolverInterface.

Definition at line 396 of file OsiClpSolverInterface.hpp.

virtual const double* OsiClpSolverInterface::getColUpper ( ) const
inlinevirtual

Get pointer to array[getNumCols()] of column upper bounds.

Implements OsiSolverInterface.

Definition at line 399 of file OsiClpSolverInterface.hpp.

virtual const char* OsiClpSolverInterface::getRowSense ( ) const
virtual

Get pointer to array[getNumRows()] of row constraint senses.

  • 'L' <= constraint
  • 'E' = constraint
  • 'G' >= constraint
  • 'R' ranged constraint
  • 'N' free constraint

Implements OsiSolverInterface.

virtual const double* OsiClpSolverInterface::getRightHandSide ( ) const
virtual

Get pointer to array[getNumRows()] of rows right-hand sides.

  • if rowsense()[i] == 'L' then rhs()[i] == rowupper()[i]
  • if rowsense()[i] == 'G' then rhs()[i] == rowlower()[i]
  • if rowsense()[i] == 'R' then rhs()[i] == rowupper()[i]
  • if rowsense()[i] == 'N' then rhs()[i] == 0.0

Implements OsiSolverInterface.

virtual const double* OsiClpSolverInterface::getRowRange ( ) const
virtual

Get pointer to array[getNumRows()] of row ranges.

  • if rowsense()[i] == 'R' then rowrange()[i] == rowupper()[i] - rowlower()[i]
  • if rowsense()[i] != 'R' then rowrange()[i] is undefined

Implements OsiSolverInterface.

virtual const double* OsiClpSolverInterface::getRowLower ( ) const
inlinevirtual

Get pointer to array[getNumRows()] of row lower bounds.

Implements OsiSolverInterface.

Definition at line 433 of file OsiClpSolverInterface.hpp.

virtual const double* OsiClpSolverInterface::getRowUpper ( ) const
inlinevirtual

Get pointer to array[getNumRows()] of row upper bounds.

Implements OsiSolverInterface.

Definition at line 436 of file OsiClpSolverInterface.hpp.

virtual const double* OsiClpSolverInterface::getObjCoefficients ( ) const
inlinevirtual

Get pointer to array[getNumCols()] of objective function coefficients.

Implements OsiSolverInterface.

Definition at line 439 of file OsiClpSolverInterface.hpp.

virtual double OsiClpSolverInterface::getObjSense ( ) const
inlinevirtual

Get objective function sense (1 for min (default), -1 for max)

Implements OsiSolverInterface.

Definition at line 446 of file OsiClpSolverInterface.hpp.

virtual bool OsiClpSolverInterface::isContinuous ( int  colNumber) const
virtual

Return true if column is continuous.

Implements OsiSolverInterface.

virtual bool OsiClpSolverInterface::isBinary ( int  colIndex) const
virtual

Return true if variable is binary.

Reimplemented from OsiSolverInterface.

virtual bool OsiClpSolverInterface::isInteger ( int  colIndex) const
virtual

Return true if column is integer.

Note: This function returns true if the the column is binary or a general integer.

Reimplemented from OsiSolverInterface.

virtual bool OsiClpSolverInterface::isIntegerNonBinary ( int  colIndex) const
virtual

Return true if variable is general integer.

Reimplemented from OsiSolverInterface.

virtual bool OsiClpSolverInterface::isFreeBinary ( int  colIndex) const
virtual

Return true if variable is binary and not fixed at either bound.

Reimplemented from OsiSolverInterface.

virtual const char* OsiClpSolverInterface::getColType ( bool  refresh = false) const
virtual

Return array of column length 0 - continuous 1 - binary (may get fixed later) 2 - general integer (may get fixed later)

Reimplemented from OsiSolverInterface.

bool OsiClpSolverInterface::isOptionalInteger ( int  colIndex) const

Return true if column is integer but does not have to be declared as such.

Note: This function returns true if the the column is binary or a general integer.

void OsiClpSolverInterface::setOptionalInteger ( int  index)

Set the index-th variable to be an optional integer variable.

virtual const CoinPackedMatrix* OsiClpSolverInterface::getMatrixByRow ( ) const
virtual

Get pointer to row-wise copy of matrix.

Implements OsiSolverInterface.

virtual const CoinPackedMatrix* OsiClpSolverInterface::getMatrixByCol ( ) const
virtual

Get pointer to column-wise copy of matrix.

Implements OsiSolverInterface.

virtual CoinPackedMatrix* OsiClpSolverInterface::getMutableMatrixByCol ( ) const
virtual

Get pointer to mutable column-wise copy of matrix.

Reimplemented from OsiSolverInterface.

virtual double OsiClpSolverInterface::getInfinity ( ) const
inlinevirtual

Get solver's value for infinity.

Implements OsiSolverInterface.

Definition at line 492 of file OsiClpSolverInterface.hpp.

virtual const double* OsiClpSolverInterface::getColSolution ( ) const
virtual

Get pointer to array[getNumCols()] of primal solution vector.

Implements OsiSolverInterface.

virtual const double* OsiClpSolverInterface::getRowPrice ( ) const
virtual

Get pointer to array[getNumRows()] of dual prices.

Implements OsiSolverInterface.

virtual const double* OsiClpSolverInterface::getReducedCost ( ) const
virtual

Get a pointer to array[getNumCols()] of reduced costs.

Implements OsiSolverInterface.

virtual const double* OsiClpSolverInterface::getRowActivity ( ) const
virtual

Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vector.

Implements OsiSolverInterface.

virtual double OsiClpSolverInterface::getObjValue ( ) const
virtual

Get objective function value.

Implements OsiSolverInterface.

Reimplemented in ClpQuadInterface.

virtual int OsiClpSolverInterface::getIterationCount ( ) const
inlinevirtual

Get how many iterations it took to solve the problem (whatever "iteration" mean to the solver.

Implements OsiSolverInterface.

Definition at line 515 of file OsiClpSolverInterface.hpp.

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

Get as many dual rays as the solver can provide.

(In case of proven primal infeasibility there should be at least one.)

The first getNumRows() ray components will always be associated with the row duals (as returned by getRowPrice()). If fullRay is true, the final getNumCols() entries will correspond to the ray components associated with the nonbasic variables. If the full ray is requested and the method cannot provide it, it will throw an exception.

NOTE for implementers of solver interfaces:
The double pointers in the vector should point to arrays of length getNumRows() and they should be allocated via new[].

NOTE for users of solver interfaces:
It is the user's responsibility to free the double pointers in the vector using delete[].

Implements OsiSolverInterface.

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

Get as many primal rays as the solver can provide.

(In case of proven dual infeasibility there should be at least one.)

NOTE for implementers of solver interfaces:
The double pointers in the vector should point to arrays of length getNumCols() and they should be allocated via new[].

NOTE for users of solver interfaces:
It is the user's responsibility to free the double pointers in the vector using delete[].

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::setObjCoeff ( int  elementIndex,
double  elementValue 
)
virtual

Set an objective function coefficient.

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::setColLower ( int  elementIndex,
double  elementValue 
)
virtual

Set a single column lower bound
Use -DBL_MAX for -infinity.

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::setColUpper ( int  elementIndex,
double  elementValue 
)
virtual

Set a single column upper bound
Use DBL_MAX for infinity.

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::setColBounds ( int  elementIndex,
double  lower,
double  upper 
)
virtual

Set a single column lower and upper bound.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::setColSetBounds ( const int *  indexFirst,
const int *  indexLast,
const double *  boundList 
)
virtual

Set the bounds on a number of columns simultaneously
The default implementation just invokes setColLower() and setColUpper() over and over again.

Parameters
indexFirst,indexLastpointers to the beginning and after the end of the array of the indices of the variables whose either bound changes
boundListthe new lower/upper bound pairs for the variables

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::setRowLower ( int  elementIndex,
double  elementValue 
)
virtual

Set a single row lower bound
Use -DBL_MAX for -infinity.

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::setRowUpper ( int  elementIndex,
double  elementValue 
)
virtual

Set a single row upper bound
Use DBL_MAX for infinity.

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::setRowBounds ( int  elementIndex,
double  lower,
double  upper 
)
virtual

Set a single row lower and upper bound.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::setRowType ( int  index,
char  sense,
double  rightHandSide,
double  range 
)
virtual

Set the type of a single row

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::setRowSetBounds ( const int *  indexFirst,
const int *  indexLast,
const double *  boundList 
)
virtual

Set the bounds on a number of rows simultaneously
The default implementation just invokes setRowLower() and setRowUpper() over and over again.

Parameters
indexFirst,indexLastpointers to the beginning and after the end of the array of the indices of the constraints whose either bound changes
boundListthe new lower/upper bound pairs for the constraints

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::setRowSetTypes ( const int *  indexFirst,
const int *  indexLast,
const char *  senseList,
const double *  rhsList,
const double *  rangeList 
)
virtual

Set the type of a number of rows simultaneously
The default implementation just invokes setRowType() over and over again.

Parameters
indexFirst,indexLastpointers to the beginning and after the end of the array of the indices of the constraints whose any characteristics changes
senseListthe new senses
rhsListthe new right hand sides
rangeListthe new ranges

Reimplemented from OsiSolverInterface.

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

Set the objective coefficients for all columns array [getNumCols()] is an array of values for the objective.

This defaults to a series of set operations and is here for speed.

Reimplemented from OsiSolverInterface.

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

Set the lower bounds for all columns array [getNumCols()] is an array of values for the objective.

This defaults to a series of set operations and is here for speed.

Reimplemented from OsiSolverInterface.

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

Set the upper bounds for all columns array [getNumCols()] is an array of values for the objective.

This defaults to a series of set operations and is here for speed.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::setRowName ( int  rowIndex,
std::string  name 
)
virtual

Set name of row.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::setColName ( int  colIndex,
std::string  name 
)
virtual

Set name of column.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::setContinuous ( int  index)
virtual

Set the index-th variable to be a continuous variable.

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::setInteger ( int  index)
virtual

Set the index-th variable to be an integer variable.

Implements OsiSolverInterface.

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

Set the variables listed in indices (which is of length len) to be continuous variables.

Reimplemented from OsiSolverInterface.

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

Set the variables listed in indices (which is of length len) to be integer variables.

Reimplemented from OsiSolverInterface.

int OsiClpSolverInterface::numberSOS ( ) const
inline

Number of SOS sets.

Definition at line 674 of file OsiClpSolverInterface.hpp.

const CoinSet* OsiClpSolverInterface::setInfo ( ) const
inline

SOS set info.

Definition at line 677 of file OsiClpSolverInterface.hpp.

virtual int OsiClpSolverInterface::findIntegersAndSOS ( bool  justCount)
virtual

Identify integer variables and SOS and create corresponding objects.

Record integer variables and create an OsiSimpleInteger object for each one. All existing OsiSimpleInteger objects will be destroyed. If the solver supports SOS then do the same for SOS. If justCount then no objects created and we just store numberIntegers_ Returns number of SOS

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::setObjSense ( double  s)
inlinevirtual

Set objective function sense (1 for min (default), -1 for max,)

Implements OsiSolverInterface.

Definition at line 693 of file OsiClpSolverInterface.hpp.

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

Set the primal solution column values.

colsol[numcols()] is an array of values of the problem column variables. These values are copied to memory owned by the solver object or the solver. They will be returned as the result of colsol() until changed by another call to setColsol() or by a call to any solver routine. Whether the solver makes use of the solution in any way is solver-dependent.

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::setRowPrice ( const double *  rowprice)
virtual

Set dual solution vector.

rowprice[numrows()] is an array of values of the problem row dual variables. These values are copied to memory owned by the solver object or the solver. They will be returned as the result of rowprice() until changed by another call to setRowprice() or by a call to any solver routine. Whether the solver makes use of the solution in any way is solver-dependent.

Implements OsiSolverInterface.

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

Add a column (primal variable) to the problem.

Implements OsiSolverInterface.

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

Add a named column (primal variable) to the problem.

Reimplemented from OsiSolverInterface.

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

Add a column (primal variable) to the problem.

Reimplemented from OsiSolverInterface.

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

Add a named column (primal variable) to the problem.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::addCols ( const int  numcols,
const CoinPackedVectorBase *const *  cols,
const double *  collb,
const double *  colub,
const double *  obj 
)
virtual

Add a set of columns (primal variables) to the problem.

The default implementation simply makes repeated calls to addCol().

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::addCols ( const int  numcols,
const int *  columnStarts,
const int *  rows,
const double *  elements,
const double *  collb,
const double *  colub,
const double *  obj 
)
virtual

Add a set of columns (primal variables) to the problem.

The default implementation simply makes repeated calls to addCol().

Reimplemented from OsiSolverInterface.

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

Remove a set of columns (primal variables) from the problem.

The solver interface for a basis-oriented solver will maintain valid warm start information if all deleted variables are nonbasic.

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::addRow ( const CoinPackedVectorBase vec,
const double  rowlb,
const double  rowub 
)
virtual

Add a row (constraint) to the problem.

Implements OsiSolverInterface.

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

Add a named row (constraint) to the problem.

The default implementation adds the row, then changes the name. This can surely be made more efficient within an OsiXXX class.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::addRow ( const CoinPackedVectorBase vec,
const char  rowsen,
const double  rowrhs,
const double  rowrng 
)
virtual

Add a row (constraint) to the problem.

Implements OsiSolverInterface.

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

Add a row (constraint) to the problem.

Reimplemented from OsiSolverInterface.

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

Add a named row (constraint) to the problem.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::addRows ( const int  numrows,
const CoinPackedVectorBase *const *  rows,
const double *  rowlb,
const double *  rowub 
)
virtual

Add a set of rows (constraints) to the problem.

The default implementation simply makes repeated calls to addRow().

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::addRows ( const int  numrows,
const CoinPackedVectorBase *const *  rows,
const char *  rowsen,
const double *  rowrhs,
const double *  rowrng 
)
virtual

Add a set of rows (constraints) to the problem.

The default implementation simply makes repeated calls to addRow().

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::addRows ( const int  numrows,
const int *  rowStarts,
const int *  columns,
const double *  element,
const double *  rowlb,
const double *  rowub 
)
virtual

Add a set of rows (constraints) to the problem.

The default implementation simply makes repeated calls to addRow().

Reimplemented from OsiSolverInterface.

void OsiClpSolverInterface::modifyCoefficient ( int  row,
int  column,
double  newElement,
bool  keepZero = false 
)
inline

Definition at line 797 of file OsiClpSolverInterface.hpp.

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

Delete a set of rows (constraints) from the problem.

The solver interface for a basis-oriented solver will maintain valid warm start information if all deleted rows are loose.

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::saveBaseModel ( )
virtual

If solver wants it can save a copy of "base" (continuous) model here.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::restoreBaseModel ( int  numberRows)
virtual

Strip off rows to get to this number of rows.

If solver wants it can restore a copy of "base" (continuous) model here

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::applyRowCuts ( int  numberCuts,
const OsiRowCut cuts 
)
virtual

Apply a collection of row cuts which are all effective.

applyCuts seems to do one at a time which seems inefficient.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::applyRowCuts ( int  numberCuts,
const OsiRowCut **  cuts 
)
virtual

Apply a collection of row cuts which are all effective.

applyCuts seems to do one at a time which seems inefficient. This uses array of pointers

Reimplemented from OsiSolverInterface.

virtual ApplyCutsReturnCode OsiClpSolverInterface::applyCuts ( const OsiCuts cs,
double  effectivenessLb = 0.0 
)
virtual

Apply a collection of cuts.

Only cuts which have an effectiveness >= effectivenessLb are applied.

  • ReturnCode.getNumineffective() – number of cuts which were not applied because they had an effectiveness < effectivenessLb
  • ReturnCode.getNuminconsistent() – number of invalid cuts
  • ReturnCode.getNuminconsistentWrtIntegerModel() – number of cuts that are invalid with respect to this integer model
  • ReturnCode.getNuminfeasible() – number of cuts that would make this integer model infeasible
  • ReturnCode.getNumApplied() – number of integer cuts which were applied to the integer model
  • cs.size() == getNumineffective() + getNuminconsistent() + getNuminconsistentWrtIntegerModel() + getNuminfeasible() + getNumApplied()

Reimplemented from OsiSolverInterface.

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

Load in an problem by copying the arguments (the constraints on the rows are given by lower and upper bounds).

If a pointer is NULL then the following values are the default:

  • colub: all columns have upper bound infinity
  • collb: all columns have lower bound 0
  • rowub: all rows have upper bound infinity
  • rowlb: all rows have lower bound -infinity
  • obj: all variables have 0 objective coefficient

Implements OsiSolverInterface.

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

Load in an problem by assuming ownership of the arguments (the constraints on the rows are given by lower and upper bounds).

For default values see the previous method.
WARNING: The arguments passed to this method will be freed using the C++ delete and delete[] functions.

Implements OsiSolverInterface.

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

Load in an problem by copying the arguments (the constraints on the rows are given by sense/rhs/range triplets).

If a pointer is NULL then the following values are the default:

  • colub: all columns have upper bound infinity
  • collb: all columns have lower bound 0
  • obj: all variables have 0 objective coefficient
  • rowsen: all rows are >=
  • rowrhs: all right hand sides are 0
  • rowrng: 0 for the ranged rows

Implements OsiSolverInterface.

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

Load in an problem by assuming ownership of the arguments (the constraints on the rows are given by sense/rhs/range triplets).

For default values see the previous method.
WARNING: The arguments passed to this method will be freed using the C++ delete and delete[] functions.

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::loadProblem ( const ClpMatrixBase matrix,
const double *  collb,
const double *  colub,
const double *  obj,
const double *  rowlb,
const double *  rowub 
)
virtual

Just like the other loadProblem() methods except that the matrix is given as a ClpMatrixBase.

virtual void OsiClpSolverInterface::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 
)
virtual

Just like the other loadProblem() methods except that the matrix is given in a standard column major ordered format (without gaps).

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::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 
)
virtual

Just like the other loadProblem() methods except that the matrix is given in a standard column major ordered format (without gaps).

Implements OsiSolverInterface.

virtual int OsiClpSolverInterface::loadFromCoinModel ( CoinModel modelObject,
bool  keepSolution = false 
)
virtual

This loads a model from a coinModel object - returns number of errors.

Reimplemented from OsiSolverInterface.

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

Read an mps file from the given filename (defaults to Osi reader) - returns number of errors (see OsiMpsReader class)

Reimplemented from OsiSolverInterface.

int OsiClpSolverInterface::readMps ( const char *  filename,
bool  keepNames,
bool  allowErrors 
)

Read an mps file from the given filename returns number of errors (see OsiMpsReader class)

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

Read an mps file.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::writeMps ( const char *  filename,
const char *  extension = "mps",
double  objSense = 0.0 
) const
virtual

Write the problem into an mps file of the given filename.

If objSense is non zero then -1.0 forces the code to write a maximization objective and +1.0 to write a minimization one. If 0.0 then solver can do what it wants

Implements OsiSolverInterface.

virtual int OsiClpSolverInterface::writeMpsNative ( const char *  filename,
const char **  rowNames,
const char **  columnNames,
int  formatType = 0,
int  numberAcross = 2,
double  objSense = 0.0 
) const
virtual

Write the problem into an mps file of the given filename, names may be null.

formatType is 0 - normal 1 - extra accuracy 2 - IEEE hex (later)

Returns non-zero on I/O error

virtual int OsiClpSolverInterface::readLp ( const char *  filename,
const double  epsilon = 1e-5 
)
virtual

Read file in LP format (with names)

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::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
virtual

Write the problem into an Lp file of the given filename.

If objSense is non zero then -1.0 forces the code to write a maximization objective and +1.0 to write a minimization one. If 0.0 then solver can do what it wants. This version calls writeLpNative with names

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::writeLp ( FILE *  fp,
double  epsilon = 1e-5,
int  numberAcross = 10,
int  decimals = 5,
double  objSense = 0.0,
bool  useRowNames = true 
) const
virtual

Write the problem into the file pointed to by the parameter fp.

Other parameters are similar to those of writeLp() with first parameter filename.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::replaceMatrixOptional ( const CoinPackedMatrix matrix)
virtual

I (JJF) am getting annoyed because I can't just replace a matrix.

The default behavior of this is do nothing so only use where that would not matter e.g. strengthening a matrix for MIP

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::replaceMatrix ( const CoinPackedMatrix matrix)
virtual

And if it does matter (not used at present)

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::passInMessageHandler ( CoinMessageHandler handler)
virtual

Pass in a message handler.

It is the client's responsibility to destroy a message handler installed by this routine; it will not be destroyed when the solver interface is destroyed.

Reimplemented from OsiSolverInterface.

void OsiClpSolverInterface::newLanguage ( CoinMessages::Language  language)

Set language.

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

Definition at line 1018 of file OsiClpSolverInterface.hpp.

void OsiClpSolverInterface::setLogLevel ( int  value)

Set log level (will also set underlying solver's log level)

void OsiClpSolverInterface::generateCpp ( FILE *  fp)

Create C++ lines to get to current state.

ClpSimplex* OsiClpSolverInterface::getModelPtr ( ) const

Get pointer to Clp model.

ClpSimplex* OsiClpSolverInterface::swapModelPtr ( ClpSimplex newModel)
inline

Set pointer to Clp model and return old.

Definition at line 1032 of file OsiClpSolverInterface.hpp.

unsigned int OsiClpSolverInterface::specialOptions ( ) const
inline

Get special options.

Definition at line 1035 of file OsiClpSolverInterface.hpp.

void OsiClpSolverInterface::setSpecialOptions ( unsigned int  value)
int OsiClpSolverInterface::lastAlgorithm ( ) const
inline

Last algorithm used , 1 = primal, 2 = dual other unknown.

Definition at line 1039 of file OsiClpSolverInterface.hpp.

void OsiClpSolverInterface::setLastAlgorithm ( int  value)
inline

Set last algorithm used , 1 = primal, 2 = dual other unknown.

Definition at line 1042 of file OsiClpSolverInterface.hpp.

int OsiClpSolverInterface::cleanupScaling ( ) const
inline

Get scaling action option.

Definition at line 1045 of file OsiClpSolverInterface.hpp.

void OsiClpSolverInterface::setCleanupScaling ( int  value)
inline

Set Scaling option When scaling is on it is possible that the scaled problem is feasible but the unscaled is not.

Clp returns a secondary status code to that effect. This option allows for a cleanup. If you use it I would suggest 1. This only affects actions when scaled optimal 0 - no action 1 - clean up using dual if primal infeasibility 2 - clean up using dual if dual infeasibility 3 - clean up using dual if primal or dual infeasibility 11,12,13 - as 1,2,3 but use primal

Definition at line 1059 of file OsiClpSolverInterface.hpp.

double OsiClpSolverInterface::smallestElementInCut ( ) const
inline

Get smallest allowed element in cut.

If smaller than this then ignored

Definition at line 1063 of file OsiClpSolverInterface.hpp.

void OsiClpSolverInterface::setSmallestElementInCut ( double  value)
inline

Set smallest allowed element in cut.

If smaller than this then ignored

Definition at line 1067 of file OsiClpSolverInterface.hpp.

double OsiClpSolverInterface::smallestChangeInCut ( ) const
inline

Get smallest change in cut.

If (upper-lower)*element < this then element is taken out and cut relaxed. (upper-lower) is taken to be at least 1.0 and this is assumed >= smallestElementInCut_

Definition at line 1075 of file OsiClpSolverInterface.hpp.

void OsiClpSolverInterface::setSmallestChangeInCut ( double  value)
inline

Set smallest change in cut.

If (upper-lower)*element < this then element is taken out and cut relaxed. (upper-lower) is taken to be at least 1.0 and this is assumed >= smallestElementInCut_

Definition at line 1083 of file OsiClpSolverInterface.hpp.

void OsiClpSolverInterface::setSolveOptions ( const ClpSolve options)
inline

Pass in initial solve options.

Definition at line 1086 of file OsiClpSolverInterface.hpp.

virtual int OsiClpSolverInterface::tightenBounds ( int  lightweight = 0)
virtual

Tighten bounds - lightweight or very lightweight 0 - normal, 1 lightweight but just integers, 2 lightweight and all.

int OsiClpSolverInterface::infeasibleOtherWay ( char *  whichWay)

See if any integer variables make infeasible other way.

virtual CoinBigIndex OsiClpSolverInterface::getSizeL ( ) const
virtual

Return number of entries in L part of current factorization.

virtual CoinBigIndex OsiClpSolverInterface::getSizeU ( ) const
virtual

Return number of entries in U part of current factorization.

const OsiClpDisasterHandler* OsiClpSolverInterface::disasterHandler ( ) const
inline

Get disaster handler.

Definition at line 1099 of file OsiClpSolverInterface.hpp.

void OsiClpSolverInterface::passInDisasterHandler ( OsiClpDisasterHandler handler)

Pass in disaster handler.

ClpLinearObjective* OsiClpSolverInterface::fakeObjective ( ) const
inline

Get fake objective.

Definition at line 1104 of file OsiClpSolverInterface.hpp.

void OsiClpSolverInterface::setFakeObjective ( ClpLinearObjective fakeObjective)

Set fake objective (and take ownership)

void OsiClpSolverInterface::setFakeObjective ( double *  fakeObjective)

Set fake objective.

void OsiClpSolverInterface::setupForRepeatedUse ( int  senseOfAdventure = 0,
int  printOut = 0 
)

Set up solver for repeated use by Osi interface.

The normal usage does things like keeping factorization around so can be used. Will also do things like keep scaling and row copy of matrix if matrix does not change.

senseOfAdventure:

  • 0 - safe stuff as above
  • 1 - will take more risks - if it does not work then bug which will be fixed
  • 2 - don't bother doing most extreme termination checks e.g. don't bother re-factorizing if less than 20 iterations.
  • 3 - Actually safer than 1 (mainly just keeps factorization)

printOut

  • -1 always skip round common messages instead of doing some work
  • 0 skip if normal defaults
  • 1 leaves
virtual void OsiClpSolverInterface::synchronizeModel ( )
virtual

Synchronize model (really if no cuts in tree)

void OsiClpSolverInterface::setSpecialOptionsMutable ( unsigned int  value) const

Set special options in underlying clp solver.

Safe as const because modelPtr_ is mutable.

virtual OsiSolverInterface* OsiClpSolverInterface::clone ( bool  copyData = true) const
virtual
void OsiClpSolverInterface::releaseClp ( )

Releases so won't error.

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

Assignment operator.

virtual void OsiClpSolverInterface::reset ( )
virtual

Resets as if default constructor.

Reimplemented from OsiSolverInterface.

virtual void OsiClpSolverInterface::applyRowCut ( const OsiRowCut rc)
protectedvirtual

Apply a row cut (append to constraint matrix).

Implements OsiSolverInterface.

virtual void OsiClpSolverInterface::applyColCut ( const OsiColCut cc)
protectedvirtual

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

Implements OsiSolverInterface.

void OsiClpSolverInterface::gutsOfDestructor ( )
protected

The real work of a copy constructor (used by copy and assignment)

void OsiClpSolverInterface::freeCachedResults ( ) const
protected

Deletes all mutable stuff.

void OsiClpSolverInterface::freeCachedResults0 ( ) const
protected

Deletes all mutable stuff for row ranges etc.

void OsiClpSolverInterface::freeCachedResults1 ( ) const
protected

Deletes all mutable stuff for matrix etc.

void OsiClpSolverInterface::extractSenseRhsRange ( ) const
protected

A method that fills up the rowsense_, rhs_ and rowrange_ arrays.

void OsiClpSolverInterface::fillParamMaps ( )
protected
CoinWarmStartBasis OsiClpSolverInterface::getBasis ( ClpSimplex model) const
protected

Warm start.

NOTE artificials are treated as +1 elements so for <= rhs artificial will be at lower bound if constraint is tight

This means that Clpsimplex flips artificials as it works in terms of row activities

void OsiClpSolverInterface::setBasis ( const CoinWarmStartBasis basis,
ClpSimplex model 
)
protected

Sets up working basis as a copy of input.

NOTE artificials are treated as +1 elements so for <= rhs artificial will be at lower bound if constraint is tight

This means that Clpsimplex flips artificials as it works in terms of row activities

void OsiClpSolverInterface::crunch ( )
protected

Crunch down problem a bit.

void OsiClpSolverInterface::redoScaleFactors ( int  numberRows,
const CoinBigIndex starts,
const int *  indices,
const double *  elements 
)
protected

Extend scale factors.

void OsiClpSolverInterface::setBasis ( const CoinWarmStartBasis basis)

Sets up working basis as a copy of input and puts in as basis.

void OsiClpSolverInterface::setBasis ( )
inline

Just puts current basis_ into ClpSimplex model.

Definition at line 1231 of file OsiClpSolverInterface.hpp.

CoinWarmStartDiff* OsiClpSolverInterface::getBasisDiff ( const unsigned char *  statusArray) const

Warm start difference from basis_ to statusArray.

CoinWarmStartBasis* OsiClpSolverInterface::getBasis ( const unsigned char *  statusArray) const

Warm start from statusArray.

void OsiClpSolverInterface::deleteScaleFactors ( )

Delete all scale factor stuff and reset option.

const double* OsiClpSolverInterface::upRange ( ) const
inline

If doing fast hot start then ranges are computed.

Definition at line 1240 of file OsiClpSolverInterface.hpp.

const double* OsiClpSolverInterface::downRange ( ) const
inline

Definition at line 1242 of file OsiClpSolverInterface.hpp.

void OsiClpSolverInterface::passInRanges ( int *  array)
inline

Pass in range array.

Definition at line 1245 of file OsiClpSolverInterface.hpp.

void OsiClpSolverInterface::setSOSData ( int  numberSOS,
const char *  type,
const int *  start,
const int *  indices,
const double *  weights = NULL 
)

Pass in sos stuff from AMPl.

void OsiClpSolverInterface::computeLargestAway ( )

Compute largest amount any at continuous away from bound.

double OsiClpSolverInterface::largestAway ( ) const
inline

Get largest amount continuous away from bound.

Definition at line 1253 of file OsiClpSolverInterface.hpp.

void OsiClpSolverInterface::setLargestAway ( double  value)
inline

Set largest amount continuous away from bound.

Definition at line 1256 of file OsiClpSolverInterface.hpp.

void OsiClpSolverInterface::lexSolve ( )

Sort of lexicographic resolve.

Friends And Related Function Documentation

void OsiClpSolverInterfaceUnitTest ( const std::string &  mpsDir,
const std::string &  netlibDir 
)
friend

A function that tests the methods in the OsiClpSolverInterface class.

Member Data Documentation

ClpSimplex* OsiClpSolverInterface::modelPtr_
mutableprotected

Clp model represented by this class instance.

Definition at line 1266 of file OsiClpSolverInterface.hpp.

char* OsiClpSolverInterface::rowsense_
mutableprotected

Pointer to dense vector of row sense indicators.

Definition at line 1271 of file OsiClpSolverInterface.hpp.

double* OsiClpSolverInterface::rhs_
mutableprotected

Pointer to dense vector of row right-hand side values.

Definition at line 1274 of file OsiClpSolverInterface.hpp.

double* OsiClpSolverInterface::rowrange_
mutableprotected

Pointer to dense vector of slack upper bounds for range constraints (undefined for non-range rows)

Definition at line 1279 of file OsiClpSolverInterface.hpp.

CoinWarmStartBasis* OsiClpSolverInterface::ws_
mutableprotected

A pointer to the warmstart information to be used in the hotstarts.

This is NOT efficient and more thought should be given to it...

Definition at line 1283 of file OsiClpSolverInterface.hpp.

double* OsiClpSolverInterface::rowActivity_
mutableprotected

also save row and column information for hot starts only used in hotstarts so can be casual

Definition at line 1286 of file OsiClpSolverInterface.hpp.

double* OsiClpSolverInterface::columnActivity_
mutableprotected

Definition at line 1287 of file OsiClpSolverInterface.hpp.

ClpNodeStuff OsiClpSolverInterface::stuff_
protected

Stuff for fast dual.

Definition at line 1289 of file OsiClpSolverInterface.hpp.

int OsiClpSolverInterface::numberSOS_
protected

Number of SOS sets.

Definition at line 1291 of file OsiClpSolverInterface.hpp.

CoinSet* OsiClpSolverInterface::setInfo_
protected

SOS set info.

Definition at line 1293 of file OsiClpSolverInterface.hpp.

ClpSimplex* OsiClpSolverInterface::smallModel_
protected

Alternate model (hot starts) - but also could be permanent and used for crunch.

Definition at line 1295 of file OsiClpSolverInterface.hpp.

ClpFactorization* OsiClpSolverInterface::factorization_
protected

factorization for hot starts

Definition at line 1297 of file OsiClpSolverInterface.hpp.

double OsiClpSolverInterface::smallestElementInCut_
protected

Smallest allowed element in cut.

If smaller than this then ignored

Definition at line 1300 of file OsiClpSolverInterface.hpp.

double OsiClpSolverInterface::smallestChangeInCut_
protected

Smallest change in cut.

If (upper-lower)*element < this then element is taken out and cut relaxed.

Definition at line 1304 of file OsiClpSolverInterface.hpp.

double OsiClpSolverInterface::largestAway_
protected

Largest amount continuous away from bound.

Definition at line 1306 of file OsiClpSolverInterface.hpp.

char* OsiClpSolverInterface::spareArrays_
protected

Arrays for hot starts.

Definition at line 1308 of file OsiClpSolverInterface.hpp.

CoinWarmStartBasis OsiClpSolverInterface::basis_
protected

Warmstart information to be used in resolves.

Definition at line 1310 of file OsiClpSolverInterface.hpp.

int OsiClpSolverInterface::itlimOrig_
protected

The original iteration limit before hotstarts started.

Definition at line 1312 of file OsiClpSolverInterface.hpp.

int OsiClpSolverInterface::lastAlgorithm_
mutableprotected

Last algorithm used.

Coded as

  • 0 invalid
  • 1 primal
  • 2 dual
  • -911 disaster in the algorithm that was attempted
  • 999 current solution no longer optimal due to change in problem or basis

Definition at line 1324 of file OsiClpSolverInterface.hpp.

bool OsiClpSolverInterface::notOwned_
protected

To say if destructor should delete underlying model.

Definition at line 1327 of file OsiClpSolverInterface.hpp.

CoinPackedMatrix* OsiClpSolverInterface::matrixByRow_
mutableprotected

Pointer to row-wise copy of problem matrix coefficients.

Definition at line 1330 of file OsiClpSolverInterface.hpp.

CoinPackedMatrix* OsiClpSolverInterface::matrixByRowAtContinuous_
protected

Pointer to row-wise copy of continuous problem matrix coefficients.

Definition at line 1333 of file OsiClpSolverInterface.hpp.

char* OsiClpSolverInterface::integerInformation_
protected

Pointer to integer information.

Definition at line 1336 of file OsiClpSolverInterface.hpp.

int* OsiClpSolverInterface::whichRange_
protected

Pointer to variables for which we want range information The number is in [0] memory is not owned by OsiClp.

Definition at line 1342 of file OsiClpSolverInterface.hpp.

bool OsiClpSolverInterface::fakeMinInSimplex_
mutableprotected

Faking min to get proper dual solution signs in simplex API.

Definition at line 1349 of file OsiClpSolverInterface.hpp.

double* OsiClpSolverInterface::linearObjective_
mutableprotected

Linear objective.

Normally a pointer to the linear coefficient array in the clp objective. An independent copy when fakeMinInSimplex_ is true, because we need something permanent to point to when getObjCoefficients is called.

Definition at line 1356 of file OsiClpSolverInterface.hpp.

ClpDataSave OsiClpSolverInterface::saveData_
mutableprotected

To save data in OsiSimplex stuff.

Definition at line 1359 of file OsiClpSolverInterface.hpp.

ClpSolve OsiClpSolverInterface::solveOptions_
protected

Options for initialSolve.

Definition at line 1361 of file OsiClpSolverInterface.hpp.

int OsiClpSolverInterface::cleanupScaling_
protected

Scaling option When scaling is on it is possible that the scaled problem is feasible but the unscaled is not.

Clp returns a secondary status code to that effect. This option allows for a cleanup. If you use it I would suggest 1. This only affects actions when scaled optimal 0 - no action 1 - clean up using dual if primal infeasibility 2 - clean up using dual if dual infeasibility 3 - clean up using dual if primal or dual infeasibility 11,12,13 - as 1,2,3 but use primal

Definition at line 1374 of file OsiClpSolverInterface.hpp.

unsigned int OsiClpSolverInterface::specialOptions_
mutableprotected

Special options 0x80000000 off 0 simple stuff for branch and bound 1 try and keep work regions as much as possible 2 do not use any perturbation 4 allow exit before re-factorization 8 try and re-use factorization if no cuts 16 use standard strong branching rather than clp's 32 Just go to first factorization in fast dual 64 try and tighten bounds in crunch 128 Model will only change in column bounds 256 Clean up model before hot start 512 Give user direct access to Clp regions in getBInvARow etc (i.e., do not unscale, and do not return result in getBInv parameters; you have to know where to look for the answer) 1024 Don't "borrow" model in initialSolve 2048 Don't crunch 4096 quick check for optimality Bits above 8192 give where called from in Cbc At present 0 is normal, 1 doing fast hotstarts, 2 is can do quick check 65536 Keep simple i.e.

no crunch etc 131072 Try and keep scaling factors around 262144 Don't try and tighten bounds (funny global cuts) 524288 Fake objective and 0-1 1048576 Don't recompute ray after crunch 2097152

Definition at line 1402 of file OsiClpSolverInterface.hpp.

ClpSimplex* OsiClpSolverInterface::baseModel_
protected

Copy of model when option 131072 set.

Definition at line 1404 of file OsiClpSolverInterface.hpp.

int OsiClpSolverInterface::lastNumberRows_
protected

Number of rows when last "scaled".

Definition at line 1406 of file OsiClpSolverInterface.hpp.

ClpSimplex* OsiClpSolverInterface::continuousModel_
protected

Continuous model.

Definition at line 1408 of file OsiClpSolverInterface.hpp.

OsiClpDisasterHandler* OsiClpSolverInterface::disasterHandler_
protected

Possible disaster handler.

Definition at line 1410 of file OsiClpSolverInterface.hpp.

ClpLinearObjective* OsiClpSolverInterface::fakeObjective_
protected

Fake objective.

Definition at line 1412 of file OsiClpSolverInterface.hpp.

CoinDoubleArrayWithLength OsiClpSolverInterface::rowScale_
protected

Row scale factors (has inverse at end)

Definition at line 1414 of file OsiClpSolverInterface.hpp.

CoinDoubleArrayWithLength OsiClpSolverInterface::columnScale_
protected

Column scale factors (has inverse at end)

Definition at line 1416 of file OsiClpSolverInterface.hpp.


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