13#ifndef OsiCpxSolverInterface_H
14#define OsiCpxSolverInterface_H
17#include "CoinWarmStartBasis.hpp"
211 virtual bool isBinary(
int columnNumber)
const;
217 virtual bool isInteger(
int columnNumber)
const;
276 bool fullRay =
false)
const;
311 const int *indexLast,
312 const double *coeffList);
328 double lower,
double upper);
338 const int *indexLast,
339 const double *boundList);
353 double lower,
double upper);
356 virtual void setRowType(
int index,
char sense,
double rightHandSide,
367 const int *indexLast,
368 const double *boundList);
380 const int *indexLast,
381 const char *senseList,
382 const double *rhsList,
383 const double *rangeList);
436 virtual void addCol(
const CoinPackedVectorBase &vec,
437 const double collb,
const double colub,
443 const CoinPackedVectorBase *
const *cols,
444 const double *collb,
const double *colub,
447 virtual void deleteCols(
const int num,
const int *colIndices);
451 virtual void addRow(
const CoinPackedVectorBase &vec,
452 const double rowlb,
const double rowub);
454 virtual void addRow(
const CoinPackedVectorBase &vec,
455 const char rowsen,
const double rowrhs,
456 const double rowrng);
461 const CoinPackedVectorBase *
const *rows,
462 const double *rowlb,
const double *rowub);
465 const CoinPackedVectorBase *
const *rows,
466 const char *rowsen,
const double *rowrhs,
467 const double *rowrng);
469 virtual void deleteRows(
const int num,
const int *rowIndices);
496 double effectivenessLb = 0.0);
517 const double *collb,
const double *colub,
519 const double *rowlb,
const double *rowub);
529 double *&collb,
double *&colub,
double *&obj,
530 double *&rowlb,
double *&rowub);
545 const double *collb,
const double *colub,
547 const char *rowsen,
const double *rowrhs,
548 const double *rowrng);
558 double *&collb,
double *&colub,
double *&obj,
559 char *&rowsen,
double *&rowrhs,
565 const int *start,
const int *index,
567 const double *collb,
const double *colub,
569 const double *rowlb,
const double *rowub);
574 const int *start,
const int *index,
576 const double *collb,
const double *colub,
578 const char *rowsen,
const double *rowrhs,
579 const double *rowrng);
584 const char *extension =
"mps");
591 const char *extension =
"mps",
592 double objSense = 0.0)
const;
724 virtual void getBInvARow(
int row,
double *z,
double *slack = NULL)
const;
std::vector< int > OsiVectorInt
Vector of int.
struct cpxenv * CPXENVptr
void OsiCpxSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the OsiCpxSolverInterface class.
virtual void disableFactorization() const
Useless function, defined only for compatibility with OsiSimplexInterface.
void freeCachedData(int keepCached=KEEPCACHED_NONE)
free all cached data (except specified entries, see getLpPtr())
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 l...
CPXLPptr getMutableLpPtr() const
Get LP Pointer for const methods.
virtual void setRowBounds(int elementIndex, double lower, double upper)
Set a single row lower and upper bound The default implementation just invokes setRowLower() and set...
virtual std::vector< double * > getDualRays(int maxNumRays, bool fullRay=false) const
Get as many dual rays as the solver can provide.
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 setRowLowe...
virtual void disableSimplexInterface()
Useless function, defined only for compatibility with OsiSimplexInterface.
virtual const CoinPackedMatrix * getMatrixByCol() const
Get pointer to column-wise copy of matrix.
virtual const double * getRowRange() const
Get pointer to array[getNumRows()] of row ranges.
OsiCpxSolverInterface()
Default Constructor.
virtual void setRowLower(int elementIndex, double elementValue)
Set a single row lower bound Use -COIN_DBL_MAX for -infinity.
virtual const double * getRowLower() const
Get pointer to array[getNumRows()] of row lower bounds.
double * rowsol_
Pointer to dual solution vector.
virtual void getBasisStatus(int *cstat, int *rstat) const
Returns a basis status of the structural/artificial variables At present as warm start i....
virtual void addCol(const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj)
Add a column (primal variable) to the problem.
virtual void getBInvARow(int row, double *z, double *slack=NULL) const
Get a row of the tableau (slack part in slack if not NULL)
char * rowsense_
Pointer to dense vector of row sense indicators.
virtual bool isContinuous(int colNumber) const
Return true if column is continuous.
virtual void setObjCoeffSet(const int *indexFirst, const int *indexLast, const double *coeffList)
Set a a set of objective function coefficients.
CPXENVptr env_
CPLEX environment used in this class instance.
bool getDblParam(OsiDblParam key, double &value) const
Get a double parameter.
void setMipStart(bool value)
virtual double getInfinity() const
Get solver's value for infinity.
virtual void loadProblem(const int numcols, const int numrows, const int *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 ...
virtual void unmarkHotStart()
Delete the snapshot.
bool disableadvbasis
Whether to disable use of advanced basis (if given)
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 s...
virtual void branchAndBound()
Invoke solver's built-in enumeration algorithm.
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...
void freeCachedResults()
free cached result vectors
virtual void deleteRows(const int num, const int *rowIndices)
Delete a set of rows (constraints) from the problem.
virtual int readMps(const char *filename, const char *extension="mps")
Read an mps file from the given filename.
virtual bool isDualObjectiveLimitReached() const
Is the given dual objective limit reached?
double * collower_
Pointer to dense vector of variable lower bounds.
virtual bool basisIsAvailable() const
Returns true if a basis is available.
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.
virtual bool isAbandoned() const
Are there a numerical difficulties?
virtual void reset()
Resets as if default constructor.
virtual void setInteger(const int *indices, int len)
Set the variables listed in indices (which is of length len) to be integer variables.
virtual bool isProvenPrimalInfeasible() const
Is primal infeasiblity proven?
double * colsol_
Pointer to primal solution vector.
virtual void loadProblem(const int numcols, const int numrows, const int *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 ...
void gutsOfDestructor()
The real work of the destructor.
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 setColl...
virtual void setColBounds(int elementIndex, double lower, double upper)
Set a single column lower and upper bound The default implementation just invokes setColLower() and ...
OsiCpxSolverInterface(const OsiCpxSolverInterface &)
Copy constructor.
double * rowrange_
Pointer to dense vector of slack upper bounds for range constraints (undefined for non-range rows)
void passInMessageHandler(CoinMessageHandler *handler)
Pass in a message handler It is the client's responsibility to destroy a message handler installed by...
bool getStrParam(OsiStrParam key, std::string &value) const
Get a string parameter.
bool getIntParam(OsiIntParam key, int &value) const
Get an integer parameter.
CPXENVptr getEnvironmentPtr()
Method to access CPLEX environment pointer.
virtual void deleteCols(const int num, const int *colIndices)
Remove a set of columns (primal variables) from the problem.
virtual const char * getRowSense() const
Get pointer to array[getNumRows()] of row constraint senses.
void freeCachedRowRim()
free cached row rim vectors
virtual void addRow(const CoinPackedVectorBase &vec, const double rowlb, const double rowub)
Add a row (constraint) to the problem.
bool setDblParam(OsiDblParam key, double value)
Set a double parameter.
virtual void setContinuous(const int *indices, int len)
Set the variables listed in indices (which is of length len) to be continuous variables.
virtual void setRowPrice(const double *rowprice)
Set dual solution vector.
virtual int getNumCols() const
Get number of columns.
virtual const double * getObjCoefficients() const
Get pointer to array[getNumCols()] of objective function coefficients.
const char * getCtype() const
return a vector of variable types (continous, binary, integer)
void freeCachedMatrix()
free cached matrices
double * colupper_
Pointer to dense vector of variable lower bounds.