Cbc  2.10.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OsiSolverInterface.hpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 // This code is licensed under the terms of the Eclipse Public License (EPL).
4 
5 #ifndef OsiSolverInterface_H
6 #define OsiSolverInterface_H
7 
8 #include <cstdlib>
9 #include <string>
10 #include <vector>
11 
12 #include "CoinTypes.hpp"
13 #include "CoinMessageHandler.hpp"
14 #include "CoinPackedVectorBase.hpp"
15 #include "CoinPackedMatrix.hpp"
16 #include "CoinWarmStart.hpp"
17 #include "CoinFinite.hpp"
18 #include "CoinError.hpp"
19 
20 #include "OsiCollections.hpp"
21 #include "OsiSolverParameters.hpp"
22 
23 class CoinSnapshot;
24 class CoinLpIO;
25 class CoinMpsIO;
26 
27 class OsiCuts;
28 class OsiAuxInfo;
29 class OsiRowCut;
30 class OsiRowCutDebugger;
31 class CoinSet;
32 class CoinBuild;
33 class CoinModel;
34 class OsiSolverBranch;
35 class OsiSolverResult;
36 class OsiObject;
37 
38 //#############################################################################
39 
63  const OsiSolverInterface *emptySi,
64  const std::string &mpsDir,
65  const std::string &netlibDir);
67  const std::vector< OsiSolverInterface * > &vecSiP,
68  const std::string &mpsDir);
69 
70 public:
73  friend class OsiSolverInterface;
74  friend class OsiClpSolverInterface;
75  friend class OsiGrbSolverInterface;
76 
77  public:
79 
82  : intInconsistent_(0)
83  , extInconsistent_(0)
84  , infeasible_(0)
85  , ineffective_(0)
86  , applied_(0)
87  {
88  }
95  , applied_(rhs.applied_)
96  {
97  }
100  {
101  if (this != &rhs) {
104  infeasible_ = rhs.infeasible_;
106  applied_ = rhs.applied_;
107  }
108  return *this;
109  }
113 
116  inline int getNumInconsistent() const
118  {
119  return intInconsistent_;
120  }
123  {
124  return extInconsistent_;
125  }
127  inline int getNumInfeasible() const
128  {
129  return infeasible_;
130  }
132  inline int getNumIneffective() const
133  {
134  return ineffective_;
135  }
137  inline int getNumApplied() const
138  {
139  return applied_;
140  }
142 
143  private:
151  inline void incrementInfeasible() { infeasible_++; }
153  inline void incrementIneffective() { ineffective_++; }
155  inline void incrementApplied() { applied_++; }
157 
159 
160  int intInconsistent_;
169  int applied_;
171  };
172 
173  //---------------------------------------------------------------------------
174 
176 
177  virtual void initialSolve() = 0;
179 
185  virtual void resolve() = 0;
186 
188  virtual void branchAndBound() = 0;
189 
190 #ifdef CBC_NEXT_VERSION
191  /*
192  Would it make sense to collect all of these routines in a `MIP Helper'
193  section? It'd make it easier for users and implementors to find them.
194  */
212  virtual int solveBranches(int depth, const OsiSolverBranch *branch,
213  OsiSolverResult *result,
214  int &numberSolves, int &numberIterations,
215  bool forceBranch = false);
216 #endif
217 
218 
219  //---------------------------------------------------------------------------
277  virtual bool setIntParam(OsiIntParam key, int value)
279  {
280  if (key == OsiLastIntParam)
281  return (false);
282  intParam_[key] = value;
283  return true;
284  }
286  virtual bool setDblParam(OsiDblParam key, double value)
287  {
288  if (key == OsiLastDblParam)
289  return (false);
290  dblParam_[key] = value;
291  return true;
292  }
294  virtual bool setStrParam(OsiStrParam key, const std::string &value)
295  {
296  if (key == OsiLastStrParam)
297  return (false);
298  strParam_[key] = value;
299  return true;
300  }
312  virtual bool setHintParam(OsiHintParam key, bool yesNo = true,
313  OsiHintStrength strength = OsiHintTry,
314  void * /*otherInformation*/ = NULL)
315  {
316  if (key == OsiLastHintParam)
317  return false;
318  hintParam_[key] = yesNo;
319  hintStrength_[key] = strength;
320  if (strength == OsiForceDo)
321  throw CoinError("OsiForceDo illegal",
322  "setHintParam", "OsiSolverInterface");
323  return true;
324  }
326  virtual bool getIntParam(OsiIntParam key, int &value) const
327  {
328  if (key == OsiLastIntParam)
329  return (false);
330  value = intParam_[key];
331  return true;
332  }
334  virtual bool getDblParam(OsiDblParam key, double &value) const
335  {
336  if (key == OsiLastDblParam)
337  return (false);
338  value = dblParam_[key];
339  return true;
340  }
342  virtual bool getStrParam(OsiStrParam key, std::string &value) const
343  {
344  if (key == OsiLastStrParam)
345  return (false);
346  value = strParam_[key];
347  return true;
348  }
358  virtual bool getHintParam(OsiHintParam key, bool &yesNo,
359  OsiHintStrength &strength,
360  void *&otherInformation) const
361  {
362  if (key == OsiLastHintParam)
363  return false;
364  yesNo = hintParam_[key];
365  strength = hintStrength_[key];
366  otherInformation = NULL;
367  return true;
368  }
373  virtual bool getHintParam(OsiHintParam key, bool &yesNo,
374  OsiHintStrength &strength) const
375  {
376  if (key == OsiLastHintParam)
377  return false;
378  yesNo = hintParam_[key];
379  strength = hintStrength_[key];
380  return true;
381  }
386  virtual bool getHintParam(OsiHintParam key, bool &yesNo) const
387  {
388  if (key == OsiLastHintParam)
389  return false;
390  yesNo = hintParam_[key];
391  return true;
392  }
400 
414  inline double getIntegerTolerance() const
415  {
417  }
419 
420  //---------------------------------------------------------------------------
422 
423  virtual bool isAbandoned() const = 0;
426  virtual bool isProvenOptimal() const = 0;
428  virtual bool isProvenPrimalInfeasible() const = 0;
430  virtual bool isProvenDualInfeasible() const = 0;
432  virtual bool isPrimalObjectiveLimitReached() const;
434  virtual bool isDualObjectiveLimitReached() const;
436  virtual bool isIterationLimitReached() const = 0;
438 
439  //---------------------------------------------------------------------------
457  virtual CoinWarmStart *getEmptyWarmStart() const = 0;
458 
465  virtual CoinWarmStart *getWarmStart() const = 0;
474  virtual CoinWarmStart *getPointerToWarmStart(bool &mustDelete);
475 
484  virtual bool setWarmStart(const CoinWarmStart *warmstart) = 0;
486 
487  //---------------------------------------------------------------------------
508  virtual void markHotStart();
511  virtual void solveFromHotStart();
513  virtual void unmarkHotStart();
515 
516  //---------------------------------------------------------------------------
527  virtual int getNumCols() const = 0;
529 
531  virtual int getNumRows() const = 0;
532 
534  virtual CoinBigIndex getNumElements() const = 0;
535 
537  virtual int getNumIntegers() const;
538 
540  virtual const double *getColLower() const = 0;
541 
543  virtual const double *getColUpper() const = 0;
544 
555  virtual const char *getRowSense() const = 0;
556 
570  virtual const double *getRightHandSide() const = 0;
571 
581  virtual const double *getRowRange() const = 0;
582 
584  virtual const double *getRowLower() const = 0;
585 
587  virtual const double *getRowUpper() const = 0;
588 
592  virtual const double *getObjCoefficients() const = 0;
593 
599  virtual double getObjSense() const = 0;
600 
602  virtual bool isContinuous(int colIndex) const = 0;
603 
605  virtual bool isBinary(int colIndex) const;
606 
611  virtual bool isInteger(int colIndex) const;
612 
614  virtual bool isIntegerNonBinary(int colIndex) const;
615 
617  virtual bool isFreeBinary(int colIndex) const;
618 
623  inline const char *columnType(bool refresh = false) const
624  {
625  return getColType(refresh);
626  }
627 
629  inline void setColumnType(int iColumn, char type)
630  {
631  if (!columnType_)
632  getColType(true);
633  columnType_[iColumn] = type;
634  }
635 
649  virtual const char *getColType(bool refresh = false) const;
650 
652  virtual const CoinPackedMatrix *getMatrixByRow() const = 0;
653 
655  virtual const CoinPackedMatrix *getMatrixByCol() const = 0;
656 
662  virtual CoinPackedMatrix *getMutableMatrixByRow() const { return NULL; }
663 
669  virtual CoinPackedMatrix *getMutableMatrixByCol() const { return NULL; }
670 
672  virtual double getInfinity() const = 0;
674 
677  virtual const double *getColSolution() const = 0;
679 
683  virtual const double *getStrictColSolution();
684 
686  virtual const double *getRowPrice() const = 0;
687 
689  virtual const double *getReducedCost() const = 0;
690 
696  virtual const double *getRowActivity() const = 0;
697 
699  virtual double getObjValue() const = 0;
700 
704  virtual int getIterationCount() const = 0;
705 
728  virtual std::vector< double * > getDualRays(int maxNumRays,
729  bool fullRay = false) const = 0;
730 
746  virtual std::vector< double * > getPrimalRays(int maxNumRays) const = 0;
747 
750  virtual OsiVectorInt getFractionalIndices(const double etol = 1.e-05)
751  const;
753 
754  //-------------------------------------------------------------------------
767  virtual void setObjCoeff(int elementIndex, double elementValue) = 0;
768 
770  virtual void setObjCoeffSet(const int *indexFirst,
771  const int *indexLast,
772  const double *coeffList);
773 
779  virtual void setObjective(const double *array);
780 
791  virtual void setObjSense(double s) = 0;
792 
795  virtual void setColLower(int elementIndex, double elementValue) = 0;
796 
802  virtual void setColLower(const double *array);
803 
806  virtual void setColUpper(int elementIndex, double elementValue) = 0;
807 
813  virtual void setColUpper(const double *array);
814 
818  virtual void setColBounds(int elementIndex,
819  double lower, double upper)
820  {
821  setColLower(elementIndex, lower);
822  setColUpper(elementIndex, upper);
823  }
824 
831  virtual void setColSetBounds(const int *indexFirst,
832  const int *indexLast,
833  const double *boundList);
834 
837  virtual void setRowLower(int elementIndex, double elementValue) = 0;
838 
841  virtual void setRowUpper(int elementIndex, double elementValue) = 0;
842 
846  virtual void setRowBounds(int elementIndex,
847  double lower, double upper)
848  {
849  setRowLower(elementIndex, lower);
850  setRowUpper(elementIndex, upper);
851  }
852 
859  virtual void setRowSetBounds(const int *indexFirst,
860  const int *indexLast,
861  const double *boundList);
862 
864  virtual void setRowType(int index, char sense, double rightHandSide,
865  double range)
866  = 0;
867 
872  virtual void setRowSetTypes(const int *indexFirst,
873  const int *indexLast,
874  const char *senseList,
875  const double *rhsList,
876  const double *rangeList);
877 
887  virtual void setColSolution(const double *colsol) = 0;
888 
898  virtual void setRowPrice(const double *rowprice) = 0;
899 
908  virtual int reducedCostFix(double gap, bool justInteger = true);
910 
911  //-------------------------------------------------------------------------
915  virtual void setContinuous(int index) = 0;
917  virtual void setInteger(int index) = 0;
920  virtual void setContinuous(const int *indices, int len);
923  virtual void setInteger(const int *indices, int len);
925  //-------------------------------------------------------------------------
926 
927  //-------------------------------------------------------------------------
928 
930  typedef std::vector< std::string > OsiNameVec;
931 
952 
962  virtual std::string dfltRowColName(char rc,
963  int ndx, unsigned digits = 7) const;
964 
967  virtual std::string getObjName(unsigned maxLen = static_cast< unsigned >(std::string::npos)) const;
968 
971  virtual inline void setObjName(std::string name)
972  {
973  objName_ = name;
974  }
975 
982  virtual std::string getRowName(int rowIndex,
983  unsigned maxLen = static_cast< unsigned >(std::string::npos)) const;
984 
996  virtual const OsiNameVec &getRowNames();
997 
1003  virtual void setRowName(int ndx, std::string name);
1004 
1011  virtual void setRowNames(OsiNameVec &srcNames,
1012  int srcStart, int len, int tgtStart);
1013 
1019  virtual void deleteRowNames(int tgtStart, int len);
1020 
1027  virtual std::string getColName(int colIndex,
1028  unsigned maxLen = static_cast< unsigned >(std::string::npos)) const;
1029 
1039  virtual const OsiNameVec &getColNames();
1040 
1046  virtual void setColName(int ndx, std::string name);
1047 
1054  virtual void setColNames(OsiNameVec &srcNames,
1055  int srcStart, int len, int tgtStart);
1056 
1062  virtual void deleteColNames(int tgtStart, int len);
1063 
1070  void setRowColNames(const CoinMpsIO &mps);
1071 
1077  void setRowColNames(CoinModel &mod);
1078 
1085  void setRowColNames(CoinLpIO &mod);
1086 
1088  //-------------------------------------------------------------------------
1089 
1090  //-------------------------------------------------------------------------
1096 
1098  virtual void addCol(const CoinPackedVectorBase &vec,
1099  const double collb, const double colub,
1100  const double obj)
1101  = 0;
1102 
1108  virtual void addCol(const CoinPackedVectorBase &vec,
1109  const double collb, const double colub,
1110  const double obj, std::string name);
1111 
1113  virtual void addCol(int numberElements,
1114  const int *rows, const double *elements,
1115  const double collb, const double colub,
1116  const double obj);
1117 
1123  virtual void addCol(int numberElements,
1124  const int *rows, const double *elements,
1125  const double collb, const double colub,
1126  const double obj, std::string name);
1127 
1133  virtual void addCols(const int numcols,
1134  const CoinPackedVectorBase *const *cols,
1135  const double *collb, const double *colub,
1136  const double *obj);
1137 
1143  virtual void addCols(const int numcols, const CoinBigIndex *columnStarts,
1144  const int *rows, const double *elements,
1145  const double *collb, const double *colub,
1146  const double *obj);
1147 
1149  void addCols(const CoinBuild &buildObject);
1150 
1156  int addCols(CoinModel &modelObject);
1157 
1158 #if 0
1159 
1160  virtual void addCols(const CoinPackedMatrix& matrix,
1161  const double* collb, const double* colub,
1162  const double* obj);
1163 #endif
1164 
1171  virtual void deleteCols(const int num, const int *colIndices) = 0;
1172 
1174  virtual void addRow(const CoinPackedVectorBase &vec,
1175  const double rowlb, const double rowub)
1176  = 0;
1177 
1183  virtual void addRow(const CoinPackedVectorBase &vec,
1184  const double rowlb, const double rowub,
1185  std::string name);
1186 
1188  virtual void addRow(const CoinPackedVectorBase &vec,
1189  const char rowsen, const double rowrhs,
1190  const double rowrng)
1191  = 0;
1192 
1198  virtual void addRow(const CoinPackedVectorBase &vec,
1199  const char rowsen, const double rowrhs,
1200  const double rowrng, std::string name);
1201 
1206  virtual void addRow(int numberElements,
1207  const int *columns, const double *element,
1208  const double rowlb, const double rowub);
1209 
1215  virtual void addRows(const int numrows,
1216  const CoinPackedVectorBase *const *rows,
1217  const double *rowlb, const double *rowub);
1218 
1224  virtual void addRows(const int numrows,
1225  const CoinPackedVectorBase *const *rows,
1226  const char *rowsen, const double *rowrhs,
1227  const double *rowrng);
1228 
1234  virtual void addRows(const int numrows, const CoinBigIndex *rowStarts,
1235  const int *columns, const double *element,
1236  const double *rowlb, const double *rowub);
1237 
1239  void addRows(const CoinBuild &buildObject);
1240 
1249  int addRows(CoinModel &modelObject);
1250 
1251 #if 0
1252 
1253  virtual void addRows(const CoinPackedMatrix& matrix,
1254  const double* rowlb, const double* rowub);
1256  virtual void addRows(const CoinPackedMatrix& matrix,
1257  const char* rowsen, const double* rowrhs,
1258  const double* rowrng);
1259 #endif
1260 
1266  virtual void deleteRows(const int num, const int *rowIndices) = 0;
1267 
1274  virtual void replaceMatrixOptional(const CoinPackedMatrix &) {}
1275 
1280  virtual void replaceMatrix(const CoinPackedMatrix &) { abort(); }
1281 
1286  virtual void saveBaseModel() {}
1287 
1301  virtual void restoreBaseModel(int numberRows);
1302  //-----------------------------------------------------------------------
1325  virtual ApplyCutsReturnCode applyCuts(const OsiCuts &cs,
1326  double effectivenessLb = 0.0);
1327 
1332  virtual void applyRowCuts(int numberCuts, const OsiRowCut *cuts);
1333 
1337  virtual void applyRowCuts(int numberCuts, const OsiRowCut **cuts);
1338 
1340  void deleteBranchingInfo(int numberDeleted, const int *which);
1341 
1343 
1344  //---------------------------------------------------------------------------
1345 
1363  virtual void loadProblem(const CoinPackedMatrix &matrix,
1364  const double *collb, const double *colub,
1365  const double *obj,
1366  const double *rowlb, const double *rowub)
1367  = 0;
1368 
1378  virtual void assignProblem(CoinPackedMatrix *&matrix,
1379  double *&collb, double *&colub, double *&obj,
1380  double *&rowlb, double *&rowub)
1381  = 0;
1382 
1399  virtual void loadProblem(const CoinPackedMatrix &matrix,
1400  const double *collb, const double *colub,
1401  const double *obj,
1402  const char *rowsen, const double *rowrhs,
1403  const double *rowrng)
1404  = 0;
1405 
1415  virtual void assignProblem(CoinPackedMatrix *&matrix,
1416  double *&collb, double *&colub, double *&obj,
1417  char *&rowsen, double *&rowrhs,
1418  double *&rowrng)
1419  = 0;
1420 
1433  virtual void loadProblem(const int numcols, const int numrows,
1434  const CoinBigIndex *start, const int *index,
1435  const double *value,
1436  const double *collb, const double *colub,
1437  const double *obj,
1438  const double *rowlb, const double *rowub)
1439  = 0;
1440 
1453  virtual void loadProblem(const int numcols, const int numrows,
1454  const CoinBigIndex *start, const int *index,
1455  const double *value,
1456  const double *collb, const double *colub,
1457  const double *obj,
1458  const char *rowsen, const double *rowrhs,
1459  const double *rowrng)
1460  = 0;
1461 
1468  virtual int loadFromCoinModel(CoinModel &modelObject,
1469  bool keepSolution = false);
1470 
1476  virtual int readMps(const char *filename,
1477  const char *extension = "mps");
1478 
1485  virtual int readMps(const char *filename, const char *extension,
1486  int &numberSets, CoinSet **&sets);
1487 
1493  virtual int readGMPL(const char *filename, const char *dataname = NULL);
1494 
1501  virtual void writeMps(const char *filename,
1502  const char *extension = "mps",
1503  double objSense = 0.0) const = 0;
1504 
1518  int writeMpsNative(const char *filename,
1519  const char **rowNames, const char **columnNames,
1520  int formatType = 0, int numberAcross = 2,
1521  double objSense = 0.0, int numberSOS = 0,
1522  const CoinSet *setInfo = NULL) const;
1523 
1524  /***********************************************************************/
1525  // Lp files
1526 
1546  virtual void writeLp(const char *filename,
1547  const char *extension = "lp",
1548  double epsilon = 1e-5,
1549  int numberAcross = 10,
1550  int decimals = 9,
1551  double objSense = 0.0,
1552  bool useRowNames = true) const;
1553 
1558  virtual void writeLp(FILE *fp,
1559  double epsilon = 1e-5,
1560  int numberAcross = 10,
1561  int decimals = 5,
1562  double objSense = 0.0,
1563  bool useRowNames = true) const;
1564 
1583  int writeLpNative(const char *filename,
1584  char const *const *const rowNames,
1585  char const *const *const columnNames,
1586  const double epsilon = 1.0e-5,
1587  const int numberAcross = 10,
1588  const int decimals = 5,
1589  const double objSense = 0.0,
1590  const bool useRowNames = true) const;
1591 
1596  int writeLpNative(FILE *fp,
1597  char const *const *const rowNames,
1598  char const *const *const columnNames,
1599  const double epsilon = 1.0e-5,
1600  const int numberAcross = 10,
1601  const int decimals = 5,
1602  const double objSense = 0.0,
1603  const bool useRowNames = true) const;
1604 
1607  virtual int readLp(const char *filename, const double epsilon = 1e-5);
1608 
1611  int readLp(FILE *fp, const double epsilon = 1e-5);
1612 
1614 
1615  //---------------------------------------------------------------------------
1616 
1625  bool ignoreNames = true);
1630  void statistics(double &minimumNegative, double &maximumNegative,
1631  double &minimumPositive, double &maximumPositive,
1632  int type = 3) const;
1633 #ifdef COIN_SNAPSHOT
1634  virtual CoinSnapshot *snapshot(bool createArrays = true) const;
1636 #endif
1637 #ifdef COIN_FACTORIZATION_INFO
1638  virtual CoinBigIndex getSizeL() const;
1641  virtual CoinBigIndex getSizeU() const;
1642 #endif
1643 
1644 
1645  //---------------------------------------------------------------------------
1646 
1656  void setApplicationData(void *appData);
1663  void setAuxiliaryInfo(OsiAuxInfo *auxiliaryInfo);
1664 
1666  void *getApplicationData() const;
1668  OsiAuxInfo *getAuxiliaryInfo() const;
1670  //---------------------------------------------------------------------------
1671 
1685  virtual void passInMessageHandler(CoinMessageHandler *handler);
1687  void newLanguage(CoinMessages::Language language);
1688  inline void setLanguage(CoinMessages::Language language)
1689  {
1690  newLanguage(language);
1691  }
1694  {
1695  return handler_;
1696  }
1699  {
1700  return messages_;
1701  }
1704  {
1705  return &messages_;
1706  }
1708  inline bool defaultHandler() const
1709  {
1710  return defaultHandler_;
1711  }
1713  //---------------------------------------------------------------------------
1728  void findIntegers(bool justCount);
1739  virtual int findIntegersAndSOS(bool justCount);
1741  inline int numberObjects() const { return numberObjects_; }
1743  inline void setNumberObjects(int number)
1744  {
1745  numberObjects_ = number;
1746  }
1747 
1749  inline OsiObject **objects() const { return object_; }
1750 
1752  const inline OsiObject *object(int which) const { return object_[which]; }
1754  inline OsiObject *modifiableObject(int which) const { return object_[which]; }
1755 
1757  void deleteObjects();
1758 
1768  double forceFeasible();
1770  //---------------------------------------------------------------------------
1771 
1783  virtual void activateRowCutDebugger(const char *modelName);
1784 
1798  virtual void activateRowCutDebugger(const double *solution,
1799  bool enforceOptimality = true);
1800 
1812  const OsiRowCutDebugger *getRowCutDebugger() const;
1813 
1823 
1832 
1843  virtual int canDoSimplexInterface() const;
1845 
1853 
1862  virtual void enableFactorization() const;
1863 
1865  virtual void disableFactorization() const;
1866 
1877  virtual bool basisIsAvailable() const;
1878 
1880  inline bool optimalBasisIsAvailable() const { return basisIsAvailable(); }
1881 
1905  virtual void getBasisStatus(int *cstat, int *rstat) const;
1906 
1921  virtual int setBasisStatus(const int *cstat, const int *rstat);
1922 
1928  virtual void getReducedGradient(double *columnReducedCosts,
1929  double *duals, const double *c) const;
1930 
1936  virtual void getBInvARow(int row, double *z, double *slack = NULL) const;
1937 
1939  virtual void getBInvRow(int row, double *z) const;
1940 
1942  virtual void getBInvACol(int col, double *vec) const;
1943 
1945  virtual void getBInvCol(int col, double *vec) const;
1946 
1954  virtual void getBasics(int *index) const;
1955 
1957 
1965 
1972  virtual void enableSimplexInterface(bool doingPrimal);
1973 
1975  virtual void disableSimplexInterface();
1983  virtual int pivot(int colIn, int colOut, int outStatus);
1984 
1996  virtual int primalPivotResult(int colIn, int sign,
1997  int &colOut, int &outStatus,
1998  double &t, CoinPackedVector *dx);
1999 
2006  virtual int dualPivotResult(int &colIn, int &sign,
2007  int colOut, int outStatus,
2008  double &t, CoinPackedVector *dx);
2010 
2011  //---------------------------------------------------------------------------
2012 
2014 
2017 
2023  virtual OsiSolverInterface *clone(bool copyData = true) const = 0;
2024 
2027 
2030 
2032  virtual ~OsiSolverInterface();
2033 
2040  virtual void reset();
2042 
2043  //---------------------------------------------------------------------------
2044 
2045 protected:
2047 
2048 
2049  virtual void applyRowCut(const OsiRowCut &rc) = 0;
2050 
2052  virtual void applyColCut(const OsiColCut &cc) = 0;
2053 
2056  inline void
2057  convertBoundToSense(const double lower, const double upper,
2058  char &sense, double &right, double &range) const;
2061  inline void
2062  convertSenseToBound(const char sense, const double right,
2063  const double range,
2064  double &lower, double &upper) const;
2067  template < class T >
2068  inline T
2069  forceIntoRange(const T value, const T lower, const T upper) const
2070  {
2071  return value < lower ? lower : (value > upper ? upper : value);
2072  }
2079  void setInitialData();
2081 
2083 
2084 
2090  // Why not just make useful stuff protected?
2105 
2115  mutable char *columnType_;
2116 
2118 
2119  //---------------------------------------------------------------------------
2120 
2121 private:
2123 
2140  std::vector< double > strictColSolution_;
2141 
2147  std::string objName_;
2148 
2150 };
2151 
2152 //#############################################################################
2155 inline void
2156 OsiSolverInterface::convertBoundToSense(const double lower, const double upper,
2157  char &sense, double &right,
2158  double &range) const
2159 {
2160  double inf = getInfinity();
2161  range = 0.0;
2162  if (lower > -inf) {
2163  if (upper < inf) {
2164  right = upper;
2165  if (upper == lower) {
2166  sense = 'E';
2167  } else {
2168  sense = 'R';
2169  range = upper - lower;
2170  }
2171  } else {
2172  sense = 'G';
2173  right = lower;
2174  }
2175  } else {
2176  if (upper < inf) {
2177  sense = 'L';
2178  right = upper;
2179  } else {
2180  sense = 'N';
2181  right = 0.0;
2182  }
2183  }
2184 }
2185 
2186 //-----------------------------------------------------------------------------
2189 inline void
2190 OsiSolverInterface::convertSenseToBound(const char sense, const double right,
2191  const double range,
2192  double &lower, double &upper) const
2193 {
2194  double inf = getInfinity();
2195  switch (sense) {
2196  case 'E':
2197  lower = upper = right;
2198  break;
2199  case 'L':
2200  lower = -inf;
2201  upper = right;
2202  break;
2203  case 'G':
2204  lower = right;
2205  upper = inf;
2206  break;
2207  case 'R':
2208  lower = right - range;
2209  upper = right;
2210  break;
2211  case 'N':
2212  lower = -inf;
2213  upper = inf;
2214  break;
2215  }
2216 }
2217 
2218 #endif
2219 
2220 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
2221 */
virtual std::string getObjName(unsigned maxLen=static_cast< unsigned >(std::string::npos)) const
Return the name of the objective function.
virtual void applyColCut(const OsiColCut &cc)=0
Apply a column cut (adjust the bounds of one or more variables).
virtual void setColSolution(const double *colsol)=0
Set the primal solution variable values.
virtual void setRowSetTypes(const int *indexFirst, const int *indexLast, const char *senseList, const double *rhsList, const double *rangeList)
Set the type of a set of rows.
virtual bool isProvenDualInfeasible() const =0
Is dual infeasibility proven?
void setColumnType(int iColumn, char type)
Set column type.
Error Class thrown by an exception.
Definition: CoinError.hpp:42
virtual bool isIterationLimitReached() const =0
Iteration limit reached?
virtual const double * getRowActivity() const =0
Get a pointer to array[getNumRows()] of row activity levels.
virtual std::vector< double * > getDualRays(int maxNumRays, bool fullRay=false) const =0
Get as many dual rays as the solver can provide.
virtual int readMps(const char *filename, const char *extension="mps")
Read a problem in MPS format from the given filename.
Just a marker, so that OsiSolverInterface can allocate a static sized array to store parameters...
virtual CoinBigIndex getNumElements() const =0
Get the number of nonzero elements.
virtual void replaceMatrixOptional(const CoinPackedMatrix &)
Replace the constraint matrix.
virtual OsiSolverInterface * clone(bool copyData=true) const =0
Clone.
virtual void setRowLower(int elementIndex, double elementValue)=0
Set a single row lower bound.
OsiSolverInterface & operator=(const OsiSolverInterface &rhs)
Assignment operator.
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...
virtual void activateRowCutDebugger(const char *modelName)
Activate the row cut debugger.
ApplyCutsReturnCode(const ApplyCutsReturnCode &rhs)
Copy constructor.
virtual int getIterationCount() const =0
Get the number of iterations it took to solve the problem (whatever `iteration&#39; means to the solver)...
int getNumInconsistent() const
Number of logically inconsistent cuts.
virtual void deleteRowNames(int tgtStart, int len)
Delete len row names starting at index tgtStart.
virtual void replaceMatrix(const CoinPackedMatrix &)
Replace the constraint matrix.
bool defaultHandler() const
Return true if default handler.
void deleteObjects()
Delete all object information.
int getNumIneffective() const
Number of redundant or ineffective cuts.
virtual void getReducedGradient(double *columnReducedCosts, double *duals, const double *c) const
Calculate duals and reduced costs for the given objective coefficients.
int getNumInfeasible() const
Number of cuts that cause obvious infeasibility.
virtual bool isIntegerNonBinary(int colIndex) const
Return true if the variable is general integer.
virtual const char * getRowSense() const =0
Get a pointer to an array[getNumRows()] of row constraint senses.
virtual void setColLower(int elementIndex, double elementValue)=0
Set a single column lower bound.
int infeasible_
Counter for infeasible cuts.
virtual void getBInvRow(int row, double *z) const
Get a row of the basis inverse.
void setNumberObjects(int number)
Set the number of objects.
This class allows for a more structured use of algorithmic tweaking to an OsiSolverInterface.
Definition: OsiAuxInfo.hpp:21
OsiNameVec rowNames_
Row names.
virtual void setObjCoeff(int elementIndex, double elementValue)=0
Set an objective function coefficient.
Solver Result Class.
NON Abstract Base Class for interfacing with cut generators or branching code or .
virtual void setColSetBounds(const int *indexFirst, const int *indexLast, const double *boundList)
Set the upper and lower bounds of a set of columns.
virtual const double * getRowPrice() const =0
Get pointer to array[getNumRows()] of dual variable values.
OsiAuxInfo * getAuxiliaryInfo() const
Get pointer to auxiliary info object.
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.
virtual const OsiNameVec & getColNames()
Return a pointer to a vector of column names.
virtual const char * getColType(bool refresh=false) const
Return an array[getNumCols()] of column types.
virtual const CoinPackedMatrix * getMatrixByCol() const =0
Get a pointer to a column-wise copy of the matrix.
virtual int getNumIntegers() const
Get the number of integer variables.
void addObjects(int numberObjects, OsiObject **objects)
Add in object information.
virtual void setRowPrice(const double *rowprice)=0
Set dual solution variable values.
virtual void resolve()=0
Resolve an LP relaxation after problem modification.
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
Column Cut Class.
Definition: OsiColCut.hpp:23
CoinMessageHandler * messageHandler() const
Return a pointer to the current message handler.
This is a simple minded model which is stored in a format which makes it easier to construct and modi...
Definition: CoinModel.hpp:181
bool hintParam_[OsiLastHintParam]
Array of hint parameters.
virtual void assignProblem(CoinPackedMatrix *&matrix, double *&collb, double *&colub, double *&obj, double *&rowlb, double *&rowub)=0
Load in a problem by assuming ownership of the arguments.
Clp Solver Interface.
virtual bool isProvenPrimalInfeasible() const =0
Is primal infeasibility proven?
void findIntegers(bool justCount)
Identify integer variables and create corresponding objects.
void setLanguage(CoinMessages::Language language)
CoinMessages messages()
Return the current set of messages.
virtual const OsiNameVec & getRowNames()
Return a pointer to a vector of row names.
virtual bool getIntParam(OsiIntParam key, int &value) const
Get an integer parameter.
virtual void unmarkHotStart()
Delete the hot start snapshot.
virtual int findIntegersAndSOS(bool justCount)
Identify integer variables and SOS and create corresponding objects.
virtual void solveFromHotStart()
Optimize starting from the hot start snapshot.
virtual void setRowUpper(int elementIndex, double elementValue)=0
Set a single row upper bound.
int applied_
Counter for applied cuts.
int numberObjects_
Total number of objects.
virtual void setRowNames(OsiNameVec &srcNames, int srcStart, int len, int tgtStart)
Set multiple row names.
virtual void setColUpper(int elementIndex, double elementValue)=0
Set a single column upper bound.
virtual void enableSimplexInterface(bool doingPrimal)
Enables normal operation of subsequent functions.
virtual void branchAndBound()=0
Invoke solver&#39;s built-in enumeration algorithm.
virtual std::string getRowName(int rowIndex, unsigned maxLen=static_cast< unsigned >(std::string::npos)) const
Return the name of the row.
virtual void getBInvCol(int col, double *vec) const
Get a column of the basis inverse.
virtual void setRowName(int ndx, std::string name)
Set a row name.
void setApplicationData(void *appData)
Set application data.
virtual bool setIntParam(OsiIntParam key, int value)
Set an integer parameter.
virtual void applyRowCuts(int numberCuts, const OsiRowCut *cuts)
Apply a collection of row cuts which are all effective.
Base class for message handling.
OsiObject ** objects() const
Get the array of objects.
virtual bool isInteger(int colIndex) const
Return true if the variable is integer.
const OsiObject * object(int which) const
Get the specified object.
virtual void restoreBaseModel(int numberRows)
Reduce the constraint system to the specified number of constraints.
virtual int getNumCols() const =0
Get the number of columns.
void setAuxiliaryInfo(OsiAuxInfo *auxiliaryInfo)
Create a clone of an Auxiliary Information object.
virtual void addCol(const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj)=0
Add a column (primal variable) to the problem.
virtual bool setStrParam(OsiStrParam key, const std::string &value)
Set a string parameter.
Abstract Base Class for describing an interface to a solver.
virtual bool getHintParam(OsiHintParam key, bool &yesNo, OsiHintStrength &strength, void *&otherInformation) const
Get a hint parameter (all information)
virtual void setRowBounds(int elementIndex, double lower, double upper)
Set a single row lower and upper bound.
virtual void setRowType(int index, char sense, double rightHandSide, double range)=0
Set the type of a single row.
Abstract base class for various sparse vectors.
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 t...
virtual CoinPackedMatrix * getMutableMatrixByCol() const
Get a pointer to a mutable column-wise copy of the matrix.
virtual bool setDblParam(OsiDblParam key, double value)
Set a double parameter.
virtual std::vector< double * > getPrimalRays(int maxNumRays) const =0
Get as many primal rays as the solver can provide.
int extInconsistent_
Counter for model-inconsistent cuts.
virtual void writeLp(const char *filename, const char *extension="lp", double epsilon=1e-5, int numberAcross=10, int decimals=9, double objSense=0.0, bool useRowNames=true) const
Write the problem into an Lp file of the given filename with the specified extension.
virtual void deleteCols(const int num, const int *colIndices)=0
Remove a set of columns (primal variables) from the problem.
int ineffective_
Counter for ineffective cuts.
virtual bool isContinuous(int colIndex) const =0
Return true if the variable is continuous.
virtual void loadProblem(const CoinPackedMatrix &matrix, const double *collb, const double *colub, const double *obj, const double *rowlb, const double *rowub)=0
Load in a problem by copying the arguments.
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.
double getIntegerTolerance() const
Return the integrality tolerance of the underlying solver.
virtual int pivot(int colIn, int colOut, int outStatus)
Perform a pivot by substituting a colIn for colOut in the basis.
void statistics(double &minimumNegative, double &maximumNegative, double &minimumPositive, double &maximumPositive, int type=3) const
Get some statistics about model - min/max always computed type 0-&gt;4 , larger gives more information 0...
friend void OsiSolverInterfaceCommonUnitTest(const OsiSolverInterface *emptySi, const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the OsiSolverInterface class.
const char * columnType(bool refresh=false) const
Return an array[getNumCols()] of column types.
double dblParam_[OsiLastDblParam]
Array of double parameters.
virtual void setObjName(std::string name)
Set the name of the objective function.
virtual CoinWarmStart * getWarmStart() const =0
Get warm start information.
virtual const double * getRightHandSide() const =0
Get a pointer to an array[getNumRows()] of row right-hand sides.
This is a first attempt at a message handler.
CoinMessageHandler * handler_
Message handler.
virtual const double * getColLower() const =0
Get a pointer to an array[getNumCols()] of column lower bounds.
virtual void setColBounds(int elementIndex, double lower, double upper)
Set a single column lower and upper bound.
virtual bool isPrimalObjectiveLimitReached() const
Is the given primal objective limit reached?
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.
std::vector< double > strictColSolution_
Column solution satisfying lower and upper column bounds.
virtual void getBasisStatus(int *cstat, int *rstat) const
Retrieve status information for column and row variables.
int getNumInconsistentWrtIntegerModel() const
Number of cuts inconsistent with the current model.
virtual std::string dfltRowColName(char rc, int ndx, unsigned digits=7) const
Generate a standard name of the form Rnnnnnnn or Cnnnnnnn.
virtual int getNumRows() const =0
Get the number of rows.
virtual int readGMPL(const char *filename, const char *dataname=NULL)
Read a problem in GMPL format from the given filenames.
virtual const double * getStrictColSolution()
Get a pointer to an array[getNumCols()] of primal variable values guaranteed to be between the column...
OsiSolverInterface()
Default Constructor.
MPS IO Interface.
Definition: CoinMpsIO.hpp:401
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...
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.
virtual bool isBinary(int colIndex) const
Return true if the variable is binary.
virtual double getInfinity() const =0
Get the solver&#39;s value for infinity.
int numberObjects() const
Get the number of objects.
virtual int canDoSimplexInterface() const
Return the simplex implementation level.
virtual void setColName(int ndx, std::string name)
Set a column name.
OsiAuxInfo * appDataEtc_
Pointer to user-defined data structure - and more if user wants.
virtual bool getHintParam(OsiHintParam key, bool &yesNo, OsiHintStrength &strength) const
Get a hint parameter (sense and strength only)
And this means throw an exception if not possible.
CoinMessages messages_
Messages.
virtual void getBInvARow(int row, double *z, double *slack=NULL) const
Get a row of the tableau.
virtual void enableFactorization() const
Prepare the solver for the use of tableau access methods.
virtual void getBasics(int *index) const
Get indices of basic variables.
virtual std::string getColName(int colIndex, unsigned maxLen=static_cast< unsigned >(std::string::npos)) const
Return the name of the column.
OsiObject * modifiableObject(int which) const
Get the specified object.
virtual bool setHintParam(OsiHintParam key, bool yesNo=true, OsiHintStrength strength=OsiHintTry, void *=NULL)
Set a hint parameter.
void incrementInfeasible()
Increment infeasible cut counter.
virtual double getObjValue() const =0
Get the objective function value.
Row Cut Class.
Definition: OsiRowCut.hpp:29
std::vector< std::string > OsiNameVec
Data type for name vectors.
virtual bool basisIsAvailable() const
Check if an optimal basis is available.
virtual void saveBaseModel()
Save a copy of the base model.
virtual bool isProvenOptimal() const =0
Is optimality proven?
Primal feasibility tolerance.
virtual bool isAbandoned() const =0
Are there numerical difficulties?
void deleteBranchingInfo(int numberDeleted, const int *which)
Deletes branching information before columns deleted.
CoinMessages * messagesPointer()
Return a pointer to the current set of messages.
int intParam_[OsiLastIntParam]
Array of integer parameters.
virtual void initialSolve()=0
Solve initial LP relaxation.
Copyright (C) 2000 – 2003, International Business Machines Corporation and others.
virtual ApplyCutsReturnCode applyCuts(const OsiCuts &cs, double effectivenessLb=0.0)
Apply a collection of cuts.
std::string strParam_[OsiLastStrParam]
Array of string parameters.
Sparse Matrix Base Class.
void copyParameters(OsiSolverInterface &rhs)
Copy all parameters in this section from one solver to another.
double forceFeasible()
Use current solution to set bounds so current integer feasible solution will stay feasible...
virtual void setObjCoeffSet(const int *indexFirst, const int *indexLast, const double *coeffList)
Set a set of objective function coefficients.
ApplyCutsReturnCode & operator=(const ApplyCutsReturnCode &rhs)
Assignment operator.
virtual void setRowSetBounds(const int *indexFirst, const int *indexLast, const double *boundList)
Set the bounds on a set of rows.
virtual int readLp(const char *filename, const double epsilon=1e-5)
Read file in LP format from file with name filename.
virtual void disableSimplexInterface()
Undo whatever setting changes the above method had to make.
virtual const double * getColSolution() const =0
Get a pointer to an array[getNumCols()] of primal variable values.
This means it is only a hint.
CoinWarmStart * ws_
Warm start information used for hot starts when the default hot start implementation is used...
virtual ~OsiSolverInterface()
Destructor.
Language
Supported languages.
virtual double getObjSense() const =0
Get the objective function sense.
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/ra...
virtual bool isFreeBinary(int colIndex) const
Return true if the variable is binary and not fixed.
int CoinBigIndex
virtual CoinWarmStart * getPointerToWarmStart(bool &mustDelete)
Get warm start information.
virtual void writeMps(const char *filename, const char *extension="mps", double objSense=0.0) const =0
Write the problem in MPS format to the specified file.
bool defaultHandler_
Flag to say if the currrent handler is the default handler.
virtual int loadFromCoinModel(CoinModel &modelObject, bool keepSolution=false)
Load a model from a CoinModel object.
virtual bool getStrParam(OsiStrParam key, std::string &value) const
Get a string parameter.
virtual void setInteger(int index)=0
Set the index-th variable to be an integer variable.
virtual void setColNames(OsiNameVec &srcNames, int srcStart, int len, int tgtStart)
Set multiple column names.
void * getApplicationData() const
Get application data.
virtual void getBInvACol(int col, double *vec) const
Get a column of the tableau.
std::string objName_
Objective name.
void incrementInternallyInconsistent()
Increment logically inconsistent cut counter.
virtual void deleteColNames(int tgtStart, int len)
Delete len column names starting at index tgtStart.
virtual void setContinuous(int index)=0
Set the index-th variable to be a continuous variable.
void incrementExternallyInconsistent()
Increment model-inconsistent counter.
virtual void setObjective(const double *array)
Set the objective coefficients for all columns.
virtual void passInMessageHandler(CoinMessageHandler *handler)
Pass in a message handler.
virtual int setBasisStatus(const int *cstat, const int *rstat)
Set the status of column and row variables and update the basis factorization and solution...
int getNumApplied() const
Number of cuts applied.
virtual void deleteRows(const int num, const int *rowIndices)=0
Delete a set of rows (constraints) from the problem.
virtual void markHotStart()
Create a hot start snapshot of the optimization process.
Validate cuts against a known solution.
void incrementApplied()
Increment applied cut counter.
virtual void addRow(const CoinPackedVectorBase &vec, const double rowlb, const double rowub)=0
Add a row (constraint) to the problem.
std::vector< int > OsiVectorInt
Vector of int.
char * columnType_
Column type 0 - continuous 1 - binary (may get fixed later) 2 - general integer (may get fixed later)...
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...
friend void OsiSolverInterfaceMpsUnitTest(const std::vector< OsiSolverInterface * > &vecSiP, const std::string &mpsDir)
A function that tests that a lot of problems given in MPS files (mostly the NETLIB problems) solve pr...
int differentModel(OsiSolverInterface &other, bool ignoreNames=true)
Check two models against each other.
Internal class for obtaining status from the applyCuts method.
virtual void reset()
Reset the solver interface.
void newLanguage(CoinMessages::Language language)
Set language.
virtual const double * getObjCoefficients() const =0
Get a pointer to an array[getNumCols()] of objective function coefficients.
virtual bool getDblParam(OsiDblParam key, double &value) const
Get a double parameter.
virtual const CoinPackedMatrix * getMatrixByRow() const =0
Get a pointer to a row-wise copy of the matrix.
virtual bool setWarmStart(const CoinWarmStart *warmstart)=0
Set warm start information.
virtual void disableFactorization() const
Undo the effects of enableFactorization.
int intInconsistent_
Counter for logically inconsistent cuts.
virtual CoinPackedMatrix * getMutableMatrixByRow() const
Get a pointer to a mutable row-wise copy of the matrix.
virtual bool isDualObjectiveLimitReached() const
Is the given dual objective limit reached?
Solver Branch Class.
Class to read and write Lp files.
Definition: CoinLpIO.hpp:105
Sparse Vector.
virtual const double * getRowUpper() const =0
Get a pointer to an array[getNumRows()] of row upper bounds.
virtual const double * getReducedCost() const =0
Get a pointer to an array[getNumCols()] of reduced costs.
virtual const double * getRowLower() const =0
Get a pointer to an array[getNumRows()] of row lower bounds.
virtual int reducedCostFix(double gap, bool justInteger=true)
Fix variables at bound based on reduced cost.
Abstract base class for `objects&#39;.
virtual const double * getRowRange() const =0
Get a pointer to an array[getNumRows()] of row ranges.
OsiObject ** object_
Integer and ... information (integer info normally at beginning)
virtual void applyRowCut(const OsiRowCut &rc)=0
Apply a row cut (append to the constraint matrix).
OsiHintStrength hintStrength_[OsiLastHintParam]
Array of hint strengths.
virtual CoinWarmStart * getEmptyWarmStart() const =0
Get an empty warm start object.
OsiNameVec colNames_
Column names.
virtual bool getHintParam(OsiHintParam key, bool &yesNo) const
Get a hint parameter (sense only)
In many cases it is natural to build a model by adding one row at a time.
Definition: CoinBuild.hpp:25
int numberIntegers_
Number of integers.
Abstract base class for warm start information.
void setInitialData()
Set OsiSolverInterface object state for default constructor.
const OsiRowCutDebugger * getRowCutDebugger() const
Get the row cut debugger provided the solution known to the debugger is within the feasible region he...
void incrementIneffective()
Increment ineffective cut counter.
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.
void setRowColNames(const CoinMpsIO &mps)
Set row and column names from a CoinMpsIO object.
Class to hold and manipulate an array of massaged messages.
OsiRowCutDebugger * getRowCutDebuggerAlways() const
Get the row cut debugger object.
Gurobi Solver Interface.
OsiRowCutDebugger * rowCutDebugger_
Pointer to row cut debugger object.
virtual void setObjSense(double s)=0
Set the objective function sense.
Very simple class for containing data on set.
Definition: CoinMpsIO.hpp:269
bool optimalBasisIsAvailable() const
Synonym for basisIsAvailable.
virtual const double * getColUpper() const =0
Get a pointer to an array[getNumCols()] of column upper bounds.