Cbc  2.10.7
OsiCbcSolverInterface.hpp
Go to the documentation of this file.
1 // $Id$
2 // Copyright (C) 2000, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 
6 #ifndef OsiCbcSolverInterface_H
7 #define OsiCbcSolverInterface_H
8 
9 #include <string>
10 #include <cfloat>
11 #include <map>
12 #include "CbcModel.hpp"
13 #include "CoinPackedMatrix.hpp"
14 #include "OsiSolverInterface.hpp"
15 #include "CbcStrategy.hpp"
16 #include "CoinWarmStartBasis.hpp"
17 
18 class OsiRowCut;
19 class OsiClpSolverInterface;
20 static const double OsiCbcInfinity = COIN_DBL_MAX;
21 
22 //#############################################################################
23 
30 class OsiCbcSolverInterface : virtual public OsiSolverInterface {
31  friend void OsiCbcSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir);
32 
33 public:
34  //---------------------------------------------------------------------------
37  virtual void initialSolve();
39 
41  virtual void resolve();
42 
44  virtual void branchAndBound();
46 
47  //---------------------------------------------------------------------------
63  // Set an integer parameter
64  bool setIntParam(OsiIntParam key, int value);
65  // Set an double parameter
66  bool setDblParam(OsiDblParam key, double value);
67  // Set a string parameter
68  bool setStrParam(OsiStrParam key, const std::string &value);
69  // Get an integer parameter
70  bool getIntParam(OsiIntParam key, int &value) const;
71  // Get an double parameter
72  bool getDblParam(OsiDblParam key, double &value) const;
73  // Get a string parameter
74  bool getStrParam(OsiStrParam key, std::string &value) const;
75  // Set a hint parameter - overrides OsiSolverInterface
76  virtual bool setHintParam(OsiHintParam key, bool yesNo = true,
77  OsiHintStrength strength = OsiHintTry,
78  void *otherInformation = NULL);
80  virtual bool getHintParam(OsiHintParam key, bool &yesNo,
81  OsiHintStrength &strength,
82  void *&otherInformation) const;
83 
84  using OsiSolverInterface::getHintParam;
86  virtual bool getHintParam(OsiHintParam key, bool &yesNo,
87  OsiHintStrength &strength) const;
89 
90  //---------------------------------------------------------------------------
92 
93  virtual bool isAbandoned() const;
96  virtual bool isProvenOptimal() const;
98  virtual bool isProvenPrimalInfeasible() const;
100  virtual bool isProvenDualInfeasible() const;
102  virtual bool isPrimalObjectiveLimitReached() const;
104  virtual bool isDualObjectiveLimitReached() const;
106  virtual bool isIterationLimitReached() const;
108 
109  //---------------------------------------------------------------------------
112 
120  virtual CoinWarmStart *getEmptyWarmStart() const;
121 
123  virtual CoinWarmStart *getWarmStart() const;
126  virtual bool setWarmStart(const CoinWarmStart *warmstart);
128 
129  //---------------------------------------------------------------------------
136  virtual void markHotStart();
139  virtual void solveFromHotStart();
141  virtual void unmarkHotStart();
143 
144  //---------------------------------------------------------------------------
159  virtual int getNumCols() const;
161 
163  virtual int getNumRows() const;
164 
166  virtual CoinBigIndex getNumElements() const;
167 
169  virtual const double *getColLower() const;
170 
172  virtual const double *getColUpper() const;
173 
183  virtual const char *getRowSense() const;
184 
193  virtual const double *getRightHandSide() const;
194 
203  virtual const double *getRowRange() const;
204 
206  virtual const double *getRowLower() const;
207 
209  virtual const double *getRowUpper() const;
210 
212  virtual const double *getObjCoefficients() const;
213 
215  virtual double getObjSense() const;
216 
218  virtual bool isContinuous(int colNumber) const;
219 
221  virtual const CoinPackedMatrix *getMatrixByRow() const;
222 
224  virtual const CoinPackedMatrix *getMatrixByCol() const;
225 
227  virtual double getInfinity() const;
229 
233  virtual const double *getColSolution() const;
234 
236  virtual const double *getRowPrice() const;
237 
239  virtual const double *getReducedCost() const;
240 
243  virtual const double *getRowActivity() const;
244 
246  virtual double getObjValue() const;
247 
250  virtual int getIterationCount() const;
251 
269  virtual std::vector< double * > getDualRays(int maxNumRays,
270  bool fullRay = false) const;
282  virtual std::vector< double * > getPrimalRays(int maxNumRays) const;
283 
285 
294 
297  virtual std::string dfltRowColName(char rc,
298  int ndx, unsigned digits = 7) const;
299 
302  virtual std::string getObjName(std::string::size_type maxLen = std::string::npos) const;
303 
306  virtual void setObjName(std::string name);
307 
310  virtual std::string getRowName(int rowIndex,
311  std::string::size_type maxLen = std::string::npos) const;
312 
315  virtual const OsiNameVec &getRowNames();
316 
319  virtual void setRowName(int ndx, std::string name);
320 
323  virtual void setRowNames(OsiNameVec &srcNames,
324  int srcStart, int len, int tgtStart);
325 
328  virtual void deleteRowNames(int tgtStart, int len);
329 
332  virtual std::string getColName(int colIndex,
333  std::string::size_type maxLen = std::string::npos) const;
334 
337  virtual const OsiNameVec &getColNames();
338 
341  virtual void setColName(int ndx, std::string name);
342 
345  virtual void setColNames(OsiNameVec &srcNames,
346  int srcStart, int len, int tgtStart);
347 
349  virtual void deleteColNames(int tgtStart, int len);
350 
352 
354 
355  //---------------------------------------------------------------------------
356 
359  //-------------------------------------------------------------------------
363  virtual void setObjCoeff(int elementIndex, double elementValue);
364 
365  using OsiSolverInterface::setColLower;
368  virtual void setColLower(int elementIndex, double elementValue);
369 
370  using OsiSolverInterface::setColUpper;
373  virtual void setColUpper(int elementIndex, double elementValue);
374 
376  virtual void setColBounds(int elementIndex,
377  double lower, double upper);
378 
387  virtual void setColSetBounds(const int *indexFirst,
388  const int *indexLast,
389  const double *boundList);
390 
393  virtual void setRowLower(int elementIndex, double elementValue);
394 
397  virtual void setRowUpper(int elementIndex, double elementValue);
398 
400  virtual void setRowBounds(int elementIndex,
401  double lower, double upper);
402 
404  virtual void setRowType(int index, char sense, double rightHandSide,
405  double range);
406 
415  virtual void setRowSetBounds(const int *indexFirst,
416  const int *indexLast,
417  const double *boundList);
418 
429  virtual void setRowSetTypes(const int *indexFirst,
430  const int *indexLast,
431  const char *senseList,
432  const double *rhsList,
433  const double *rangeList);
435 
436  //-------------------------------------------------------------------------
440  virtual void setContinuous(int index);
442  virtual void setInteger(int index);
445  virtual void setContinuous(const int *indices, int len);
448  virtual void setInteger(const int *indices, int len);
450 
451  //-------------------------------------------------------------------------
453  virtual void setObjSense(double s);
454 
465  virtual void setColSolution(const double *colsol);
466 
477  virtual void setRowPrice(const double *rowprice);
478 
479  //-------------------------------------------------------------------------
484  using OsiSolverInterface::addCol;
486  virtual void addCol(const CoinPackedVectorBase &vec,
487  const double collb, const double colub,
488  const double obj);
490  virtual void addCol(int numberElements, const int *rows, const double *elements,
491  const double collb, const double colub,
492  const double obj);
493 
494  using OsiSolverInterface::addCols;
496  virtual void addCols(const int numcols,
497  const CoinPackedVectorBase *const *cols,
498  const double *collb, const double *colub,
499  const double *obj);
501  virtual void deleteCols(const int num, const int *colIndices);
502 
503  using OsiSolverInterface::addRow;
505  virtual void addRow(const CoinPackedVectorBase &vec,
506  const double rowlb, const double rowub);
508  virtual void addRow(const CoinPackedVectorBase &vec,
509  const char rowsen, const double rowrhs,
510  const double rowrng);
511 
512  using OsiSolverInterface::addRows;
514  virtual void addRows(const int numrows,
515  const CoinPackedVectorBase *const *rows,
516  const double *rowlb, const double *rowub);
518  virtual void addRows(const int numrows,
519  const CoinPackedVectorBase *const *rows,
520  const char *rowsen, const double *rowrhs,
521  const double *rowrng);
523  virtual void deleteRows(const int num, const int *rowIndices);
524 
525  //-----------------------------------------------------------------------
529  virtual void applyRowCuts(int numberCuts, const OsiRowCut *cuts);
534  virtual void applyRowCuts(int numberCuts, const OsiRowCut **cuts);
536 
537 
538  //---------------------------------------------------------------------------
539 
540 public:
554  virtual void loadProblem(const CoinPackedMatrix &matrix,
555  const double *collb, const double *colub,
556  const double *obj,
557  const double *rowlb, const double *rowub);
558 
566  virtual void assignProblem(CoinPackedMatrix *&matrix,
567  double *&collb, double *&colub, double *&obj,
568  double *&rowlb, double *&rowub);
569 
582  virtual void loadProblem(const CoinPackedMatrix &matrix,
583  const double *collb, const double *colub,
584  const double *obj,
585  const char *rowsen, const double *rowrhs,
586  const double *rowrng);
587 
595  virtual void assignProblem(CoinPackedMatrix *&matrix,
596  double *&collb, double *&colub, double *&obj,
597  char *&rowsen, double *&rowrhs,
598  double *&rowrng);
599 
602  virtual void loadProblem(const int numcols, const int numrows,
603  const CoinBigIndex *start, const int *index,
604  const double *value,
605  const double *collb, const double *colub,
606  const double *obj,
607  const double *rowlb, const double *rowub);
608 
611  virtual void loadProblem(const int numcols, const int numrows,
612  const CoinBigIndex *start, const int *index,
613  const double *value,
614  const double *collb, const double *colub,
615  const double *obj,
616  const char *rowsen, const double *rowrhs,
617  const double *rowrng);
618 
619  using OsiSolverInterface::readMps;
622  virtual int readMps(const char *filename,
623  const char *extension = "mps");
624 
629  virtual void writeMps(const char *filename,
630  const char *extension = "mps",
631  double objSense = 0.0) const;
640  virtual int writeMpsNative(const char *filename,
641  const char **rowNames, const char **columnNames,
642  int formatType = 0, int numberAcross = 2,
643  double objSense = 0.0) const;
645 
651  void newLanguage(CoinMessages::Language language);
652  void setLanguage(CoinMessages::Language language)
653  {
654  newLanguage(language);
655  }
657  //---------------------------------------------------------------------------
658 
662  inline CbcModel *getModelPtr() const
663  {
664  return modelPtr_;
665  }
667  inline OsiSolverInterface *getRealSolverPtr() const
668  {
669  return modelPtr_->solver();
670  }
672  inline void setCutoff(double value)
673  {
674  modelPtr_->setCutoff(value);
675  }
677  inline double getCutoff() const
678  {
679  return modelPtr_->getCutoff();
680  }
682  inline void setMaximumNodes(int value)
683  {
684  modelPtr_->setMaximumNodes(value);
685  }
687  inline int getMaximumNodes() const
688  {
689  return modelPtr_->getMaximumNodes();
690  }
692  inline void setMaximumSolutions(int value)
693  {
695  }
697  inline int getMaximumSolutions() const
698  {
699  return modelPtr_->getMaximumSolutions();
700  }
702  inline void setMaximumSeconds(double value)
703  {
705  }
707  inline double getMaximumSeconds() const
708  {
709  return modelPtr_->getMaximumSeconds();
710  }
712  inline bool isNodeLimitReached() const
713  {
714  return modelPtr_->isNodeLimitReached();
715  }
717  inline bool isSolutionLimitReached() const
718  {
720  }
722  inline int getNodeCount() const
723  {
724  return modelPtr_->getNodeCount();
725  }
727  inline int status() const
728  {
729  return modelPtr_->status();
730  }
737  virtual void passInMessageHandler(CoinMessageHandler *handler);
739 
740  //---------------------------------------------------------------------------
741 
745  OsiCbcSolverInterface(OsiSolverInterface *solver = NULL,
746  CbcStrategy *strategy = NULL);
747 
749  virtual OsiSolverInterface *clone(bool copyData = true) const;
750 
753 #if 0
755  OsiCbcSolverInterface (CbcModel * rhs, bool reallyOwn=false);
756 
758  void releaseCbc();
759 #endif
762 
765 
767  //---------------------------------------------------------------------------
768 
769 protected:
771 
772 
773  virtual void applyRowCut(const OsiRowCut &rc);
774 
776  virtual void applyColCut(const OsiColCut &cc);
778 
781  mutable CbcModel *modelPtr_;
783 };
784 // So unit test can find out if NDEBUG set
786 
787 //#############################################################################
789 void OsiCbcSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir);
790 
791 #endif
void OsiCbcSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the OsiCbcSolverInterface class.
bool OsiCbcHasNDEBUG()
static const double OsiCbcInfinity
Simple Branch and bound class.
Definition: CbcModel.hpp:100
void setCutoff(double value)
Set cutoff bound on the objective function.
OsiSolverInterface * solver() const
Returns solver - has current state.
Definition: CbcModel.hpp:2216
bool isSolutionLimitReached() const
Solution limit reached?
int status() const
Final status of problem Some of these can be found out by is......
Definition: CbcModel.hpp:1056
bool setMaximumSolutions(int value)
Set the maximum number of solutions desired.
Definition: CbcModel.hpp:631
int getNodeCount() const
Get how many Nodes it took to solve the problem (including those in complete fathoming B&B inside CLP...
Definition: CbcModel.hpp:1028
double getMaximumSeconds() const
Get the maximum number of seconds desired.
Definition: CbcModel.hpp:667
bool isNodeLimitReached() const
Node limit reached?
int getMaximumNodes() const
Get the maximum node limit .
Definition: CbcModel.hpp:622
double getCutoff() const
Get the cutoff bound on the objective function - always as minimize.
Definition: CbcModel.hpp:608
bool setMaximumNodes(int value)
Set the maximum node limit .
Definition: CbcModel.hpp:616
int getMaximumSolutions() const
Get the maximum number of solutions desired.
Definition: CbcModel.hpp:639
bool setMaximumSeconds(double value)
Set the maximum number of seconds desired.
Definition: CbcModel.hpp:659
Strategy base class.
Definition: CbcStrategy.hpp:18
Cbc Solver Interface.
int getMaximumSolutions() const
Get the CbcModel::CbcMaxNumSol maximum number of solutions.
virtual CoinWarmStart * getWarmStart() const
Get warmstarting information.
CbcModel * getModelPtr() const
Get pointer to Cbc model.
virtual double getObjSense() const
Get objective function sense (1 for min (default), -1 for max)
void setMaximumSeconds(double value)
Set the CbcModel::CbcMaximumSeconds maximum number of seconds.
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 ...
virtual bool isContinuous(int colNumber) const
Return true if column is continuous.
virtual void deleteColNames(int tgtStart, int len)
Delete len column names starting at index tgtStart.
virtual void unmarkHotStart()
Delete the snapshot.
double getCutoff() const
Get the cutoff bound on the objective function - always as minimize.
virtual int getNumCols() const
Get number of columns.
virtual void applyRowCut(const OsiRowCut &rc)
Apply a row cut (append to constraint matrix).
virtual void initialSolve()
Solve initial LP relaxation.
virtual void setRowBounds(int elementIndex, double lower, double upper)
Set a single row lower and upper bound.
OsiCbcSolverInterface(const OsiCbcSolverInterface &)
Copy constructor.
virtual const double * getColSolution() const
Get pointer to array[getNumCols()] of primal solution vector.
virtual void setColLower(int elementIndex, double elementValue)
Set a single column lower bound Use -DBL_MAX for -infinity.
virtual void addRows(const int numrows, const CoinPackedVectorBase *const *rows, const double *rowlb, const double *rowub)
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...
OsiCbcSolverInterface & operator=(const OsiCbcSolverInterface &rhs)
Assignment operator.
virtual bool getHintParam(OsiHintParam key, bool &yesNo, OsiHintStrength &strength, void *&otherInformation) const
Get a hint parameter.
virtual void resolve()
Resolve an LP relaxation after problem modification.
int getNodeCount() const
Get how many Nodes it took to solve the problem.
bool getIntParam(OsiIntParam key, int &value) const
bool isSolutionLimitReached() const
Solution limit reached?
virtual bool isProvenDualInfeasible() const
Is dual infeasiblity proven?
virtual void addCol(const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj)
virtual void setObjCoeff(int elementIndex, double elementValue)
Set an objective function coefficient.
virtual bool isPrimalObjectiveLimitReached() const
Is the given primal objective limit reached?
virtual void setRowName(int ndx, std::string name)
Set a row name.
friend void OsiCbcSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the OsiCbcSolverInterface class.
virtual void deleteRowNames(int tgtStart, int len)
Delete len row names starting at index tgtStart.
virtual const double * getRowPrice() const
Get pointer to array[getNumRows()] of dual prices.
int getMaximumNodes() const
Get the CbcModel::CbcMaxNumNode maximum node limit.
virtual void setRowUpper(int elementIndex, double elementValue)
Set a single row upper bound Use DBL_MAX for infinity.
virtual void setInteger(int index)
Set the index-th variable to be an integer variable.
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()...
virtual void deleteCols(const int num, const int *colIndices)
virtual void setRowLower(int elementIndex, double elementValue)
Set a single row lower bound Use -DBL_MAX for -infinity.
virtual void setObjName(std::string name)
Set the name of the objective function.
virtual double getInfinity() const
Get solver's value for infinity.
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.
virtual std::string getRowName(int rowIndex, std::string::size_type maxLen=std::string::npos) const
Return the name of the row.
virtual void passInMessageHandler(CoinMessageHandler *handler)
Pass in a message handler.
void setCutoff(double value)
Set cutoff bound on the objective function.
virtual CoinBigIndex getNumElements() const
Get number of nonzero elements.
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.
double getMaximumSeconds() const
Get the CbcModel::CbcMaximumSeconds maximum number of seconds.
virtual bool getHintParam(OsiHintParam key, bool &yesNo, OsiHintStrength &strength) const
Get a hint parameter.
virtual std::string dfltRowColName(char rc, int ndx, unsigned digits=7) const
Generate a standard name of the form Rnnnnnnn or Cnnnnnnn.
virtual double getObjValue() const
Get objective function value.
bool getStrParam(OsiStrParam key, std::string &value) const
virtual void setColNames(OsiNameVec &srcNames, int srcStart, int len, int tgtStart)
Set multiple column names.
virtual const OsiNameVec & getRowNames()
Return a pointer to a vector of row names.
virtual bool isProvenPrimalInfeasible() const
Is primal infeasiblity proven?
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...
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 ...
virtual void setRowPrice(const double *rowprice)
Set dual solution vector.
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.
virtual void setInteger(const int *indices, int len)
Set the variables listed in indices (which is of length len) to be integer variables.
bool setIntParam(OsiIntParam key, int value)
virtual bool isProvenOptimal() const
Is optimality proven?
virtual bool isIterationLimitReached() const
Iteration limit reached?
OsiCbcSolverInterface(OsiSolverInterface *solver=NULL, CbcStrategy *strategy=NULL)
Default Constructor.
virtual void setRowNames(OsiNameVec &srcNames, int srcStart, int len, int tgtStart)
Set multiple row names.
virtual const char * getRowSense() const
Get pointer to array[getNumRows()] of row constraint senses.
virtual bool isDualObjectiveLimitReached() const
Is the given dual objective limit reached?
virtual void setColSolution(const double *colsol)
Set the primal solution column values.
virtual int getNumRows() const
Get number of rows.
virtual const double * getReducedCost() const
Get a pointer to array[getNumCols()] of reduced costs.
virtual std::string getObjName(std::string::size_type maxLen=std::string::npos) const
Return the name of the objective function.
virtual void addRow(const CoinPackedVectorBase &vec, const char rowsen, const double rowrhs, const double rowrng)
virtual void setContinuous(int index)
Set the index-th variable to be a continuous variable.
bool setStrParam(OsiStrParam key, const std::string &value)
virtual void setColUpper(int elementIndex, double elementValue)
Set a single column upper bound Use DBL_MAX for infinity.
virtual ~OsiCbcSolverInterface()
Destructor.
virtual bool setHintParam(OsiHintParam key, bool yesNo=true, OsiHintStrength strength=OsiHintTry, void *otherInformation=NULL)
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.
virtual std::string getColName(int colIndex, std::string::size_type maxLen=std::string::npos) const
Return the name of the column.
virtual void addCols(const int numcols, const CoinPackedVectorBase *const *cols, const double *collb, const double *colub, const double *obj)
virtual int getIterationCount() const
Get how many iterations it took to solve the problem (whatever "iteration" mean to the solver.
virtual bool isAbandoned() const
Are there a numerical difficulties?
virtual const double * getColLower() const
Get pointer to array[getNumCols()] of column lower bounds.
virtual void setObjSense(double s)
Set objective function sense (1 for min (default), -1 for max,)
void newLanguage(CoinMessages::Language language)
Set language.
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 Osi...
void setMaximumSolutions(int value)
Set the CbcModel::CbcMaxNumSol maximum number of solutions.
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...
virtual void addRow(const CoinPackedVectorBase &vec, const double rowlb, const double rowub)
virtual const double * getObjCoefficients() const
Get pointer to array[getNumCols()] of objective function coefficients.
int status() const
Final status of problem - 0 finished, 1 stopped, 2 difficulties.
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 const double * getRowUpper() const
Get pointer to array[getNumRows()] of row upper bounds.
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 CoinWarmStart * getEmptyWarmStart() const
Get an empty warm start object.
bool isNodeLimitReached() const
Node limit reached?
virtual void markHotStart()
Create a hotstart point of the optimization process.
virtual void solveFromHotStart()
Optimize starting from the hotstart.
virtual void setContinuous(const int *indices, int len)
Set the variables listed in indices (which is of length len) to be continuous variables.
bool setDblParam(OsiDblParam key, double value)
virtual const OsiNameVec & getColNames()
Return a pointer to a vector of column names.
virtual void applyRowCuts(int numberCuts, const OsiRowCut **cuts)
Apply a collection of row cuts which are all effective.
void setLanguage(CoinMessages::Language language)
virtual void addRows(const int numrows, const CoinPackedVectorBase *const *rows, const char *rowsen, const double *rowrhs, const double *rowrng)
virtual std::vector< double * > getPrimalRays(int maxNumRays) const
Get as many primal rays as the solver can provide.
virtual OsiSolverInterface * clone(bool copyData=true) const
Clone.
virtual void setColBounds(int elementIndex, double lower, double upper)
Set a single column lower and upper bound.
CbcModel * modelPtr_
Cbc model represented by this class instance.
virtual void branchAndBound()
Invoke solver's built-in enumeration algorithm.
OsiSolverInterface * getRealSolverPtr() const
Get pointer to underlying solver.
virtual void applyRowCuts(int numberCuts, const OsiRowCut *cuts)
Apply a collection of row cuts which are all effective.
virtual std::vector< double * > getDualRays(int maxNumRays, bool fullRay=false) const
Get as many dual rays as the solver can provide.
virtual bool setWarmStart(const CoinWarmStart *warmstart)
Set warmstarting information.
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...
virtual void applyColCut(const OsiColCut &cc)
Apply a column cut (adjust one or more bounds).
virtual const double * getColUpper() const
Get pointer to array[getNumCols()] of column upper bounds.
virtual const double * getRightHandSide() const
Get pointer to array[getNumRows()] of rows right-hand sides.
virtual const double * getRowLower() const
Get pointer to array[getNumRows()] of row lower bounds.
virtual void setColName(int ndx, std::string name)
Set a column name.
virtual const CoinPackedMatrix * getMatrixByRow() const
Get pointer to row-wise copy of matrix.
virtual void deleteRows(const int num, const int *rowIndices)
virtual void setRowType(int index, char sense, double rightHandSide, double range)
Set the type of a single row
virtual const double * getRowActivity() const
Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vecto...
bool getDblParam(OsiDblParam key, double &value) const
void setMaximumNodes(int value)
Set the CbcModel::CbcMaxNumNode maximum node limit.