Clp  1.17.8
OsiClpSolverInterface.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 OsiClpSolverInterface_H
7 #define OsiClpSolverInterface_H
8 
9 #include <string>
10 #include <cfloat>
11 #include <map>
12 
13 #include "ClpSimplex.hpp"
14 #include "ClpLinearObjective.hpp"
15 #include "CoinPackedMatrix.hpp"
16 #include "OsiSolverInterface.hpp"
17 #include "CoinWarmStartBasis.hpp"
18 #include "ClpEventHandler.hpp"
19 #include "ClpNode.hpp"
20 #include "CoinIndexedVector.hpp"
21 #include "CoinFinite.hpp"
22 
23 class OsiRowCut;
24 class OsiClpUserSolver;
26 class CoinSet;
27 static const double OsiClpInfinity = COIN_DBL_MAX;
28 
29 //#############################################################################
30 
37 class OsiClpSolverInterface : virtual public OsiSolverInterface {
38  friend void OsiClpSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir);
39 
40 public:
41  //---------------------------------------------------------------------------
44  virtual void initialSolve();
46 
48  virtual void resolve();
49 
51  virtual void resolveGub(int needed);
52 
54  virtual void branchAndBound();
55 
63  void crossover(int options, int basis);
65 
81  virtual int canDoSimplexInterface() const;
82 
91  virtual void enableFactorization() const;
92 
94  virtual void disableFactorization() const;
95 
100  virtual bool basisIsAvailable() const;
101 
117  virtual void getBasisStatus(int *cstat, int *rstat) const;
118 
129  virtual int setBasisStatus(const int *cstat, const int *rstat);
130 
132  virtual void getReducedGradient(double *columnReducedCosts,
133  double *duals,
134  const double *c) const;
135 
137  virtual void getBInvARow(int row, double *z, double *slack = NULL) const;
138 
143  virtual void getBInvARow(int row, CoinIndexedVector *z, CoinIndexedVector *slack = NULL,
144  bool keepScaled = false) const;
145 
147  virtual void getBInvRow(int row, double *z) const;
148 
150  virtual void getBInvACol(int col, double *vec) const;
151 
153  virtual void getBInvACol(int col, CoinIndexedVector *vec) const;
154 
159  virtual void getBInvACol(CoinIndexedVector *vec) const;
160 
162  virtual void getBInvCol(int col, double *vec) const;
163 
168  virtual void getBasics(int *index) const;
169 
176  virtual void enableSimplexInterface(bool doingPrimal);
177 
179  virtual void disableSimplexInterface();
180 
188  virtual int pivot(int colIn, int colOut, int outStatus);
189 
201  virtual int primalPivotResult(int colIn, int sign,
202  int &colOut, int &outStatus,
203  double &t, CoinPackedVector *dx);
204 
211  virtual int dualPivotResult(int &colIn, int &sign,
212  int colOut, int outStatus,
213  double &t, CoinPackedVector *dx);
214 
216  //---------------------------------------------------------------------------
232  // Set an integer parameter
233  bool setIntParam(OsiIntParam key, int value);
234  // Set an double parameter
235  bool setDblParam(OsiDblParam key, double value);
236  // Set a string parameter
237  bool setStrParam(OsiStrParam key, const std::string &value);
238  // Get an integer parameter
239  bool getIntParam(OsiIntParam key, int &value) const;
240  // Get an double parameter
241  bool getDblParam(OsiDblParam key, double &value) const;
242  // Get a string parameter
243  bool getStrParam(OsiStrParam key, std::string &value) const;
244  // Set a hint parameter - overrides OsiSolverInterface
245  virtual bool setHintParam(OsiHintParam key, bool yesNo = true,
246  OsiHintStrength strength = OsiHintTry,
247  void *otherInformation = NULL);
249 
250  //---------------------------------------------------------------------------
252 
253  virtual bool isAbandoned() const;
256  virtual bool isProvenOptimal() const;
258  virtual bool isProvenPrimalInfeasible() const;
260  virtual bool isProvenDualInfeasible() const;
262  virtual bool isPrimalObjectiveLimitReached() const;
264  virtual bool isDualObjectiveLimitReached() const;
266  virtual bool isIterationLimitReached() const;
268 
269  //---------------------------------------------------------------------------
272 
280  virtual CoinWarmStart *getEmptyWarmStart() const;
281 
283  virtual CoinWarmStart *getWarmStart() const;
285  inline CoinWarmStartBasis *getPointerToWarmStart()
286  {
287  return &basis_;
288  }
290  inline const CoinWarmStartBasis *getConstPointerToWarmStart() const
291  {
292  return &basis_;
293  }
296  virtual bool setWarmStart(const CoinWarmStart *warmstart);
306  virtual CoinWarmStart *getPointerToWarmStart(bool &mustDelete);
307 
309  void setColumnStatus(int iColumn, ClpSimplex::Status status);
310 
312 
313  //---------------------------------------------------------------------------
320  virtual void markHotStart();
323  virtual void solveFromHotStart();
325  virtual void unmarkHotStart();
334  int startFastDual(int options);
336  void stopFastDual();
338  void setStuff(double tolerance, double increment);
340  OsiRowCut *smallModelCut(const double *originalLower, const double *originalUpper,
341  int numberRowsAtContinuous, const int *whichGenerator,
342  int typeCut = 0);
346  OsiRowCut *modelCut(const double *originalLower, const double *originalUpper,
347  int numberRowsAtContinuous, const int *whichGenerator,
348  int typeCut = 0);
350 
351  //---------------------------------------------------------------------------
366  virtual int getNumCols() const
368  {
369  return modelPtr_->numberColumns();
370  }
371 
373  virtual int getNumRows() const
374  {
375  return modelPtr_->numberRows();
376  }
377 
379  virtual CoinBigIndex getNumElements() const
380  {
381  CoinBigIndex retVal = 0;
382  const CoinPackedMatrix *matrix = modelPtr_->matrix();
383  if (matrix != NULL)
384  retVal = matrix->getNumElements();
385  return retVal;
386  }
387 
390  virtual std::string getRowName(int rowIndex,
391  unsigned maxLen = static_cast< unsigned >(std::string::npos)) const;
392 
395  virtual std::string getColName(int colIndex,
396  unsigned maxLen = static_cast< unsigned >(std::string::npos)) const;
397 
399  virtual const double *getColLower() const { return modelPtr_->columnLower(); }
400 
402  virtual const double *getColUpper() const { return modelPtr_->columnUpper(); }
403 
413  virtual const char *getRowSense() const;
414 
423  virtual const double *getRightHandSide() const;
424 
433  virtual const double *getRowRange() const;
434 
436  virtual const double *getRowLower() const { return modelPtr_->rowLower(); }
437 
439  virtual const double *getRowUpper() const { return modelPtr_->rowUpper(); }
440 
442  virtual const double *getObjCoefficients() const
443  {
444  if (fakeMinInSimplex_)
445  return linearObjective_;
446  else
447  return modelPtr_->objective();
448  }
449 
451  virtual double getObjSense() const
452  {
454  }
455 
457  virtual bool isContinuous(int colNumber) const;
459  virtual bool isBinary(int colIndex) const;
460 
465  virtual bool isInteger(int colIndex) const;
466 
468  virtual bool isIntegerNonBinary(int colIndex) const;
469 
471  virtual bool isFreeBinary(int colIndex) const;
477  virtual const char *getColType(bool refresh = false) const;
478 
484  bool isOptionalInteger(int colIndex) const;
486  void setOptionalInteger(int index);
488  inline bool isHeuristicInteger(int colIndex) const
489  {
490  return (integerInformation_ && integerInformation_[colIndex] == 1);
491  }
493  inline int integerType(int colIndex) const
494  {
495  return integerInformation_ ? integerInformation_[colIndex] : 0;
496  }
498  inline void setIntegerType(int colIndex, int value)
499  {
500  integerInformation_[colIndex] = static_cast< char >(value);
501  }
503  virtual const CoinPackedMatrix *getMatrixByRow() const;
504 
506  virtual const CoinPackedMatrix *getMatrixByCol() const;
507 
509  virtual CoinPackedMatrix *getMutableMatrixByCol() const;
510 
512  virtual double getInfinity() const { return OsiClpInfinity; }
514 
517  virtual const double *getColSolution() const;
519 
521  virtual const double *getRowPrice() const;
522 
524  virtual const double *getReducedCost() const;
525 
528  virtual const double *getRowActivity() const;
529 
531  virtual double getObjValue() const;
532 
535  virtual int getIterationCount() const
536  {
537  return modelPtr_->numberIterations();
538  }
539 
557  virtual std::vector< double * > getDualRays(int maxNumRays,
558  bool fullRay = false) const;
570  virtual std::vector< double * > getPrimalRays(int maxNumRays) const;
571 
573 
574 
575  //---------------------------------------------------------------------------
576 
579  //-------------------------------------------------------------------------
583  virtual void setObjCoeff(int elementIndex, double elementValue);
584 
587  virtual void setColLower(int elementIndex, double elementValue);
588 
591  virtual void setColUpper(int elementIndex, double elementValue);
592 
594  virtual void setColBounds(int elementIndex,
595  double lower, double upper);
596 
605  virtual void setColSetBounds(const int *indexFirst,
606  const int *indexLast,
607  const double *boundList);
608 
611  virtual void setRowLower(int elementIndex, double elementValue);
612 
615  virtual void setRowUpper(int elementIndex, double elementValue);
616 
618  virtual void setRowBounds(int elementIndex,
619  double lower, double upper);
620 
622  virtual void setRowType(int index, char sense, double rightHandSide,
623  double range);
624 
633  virtual void setRowSetBounds(const int *indexFirst,
634  const int *indexLast,
635  const double *boundList);
636 
647  virtual void setRowSetTypes(const int *indexFirst,
648  const int *indexLast,
649  const char *senseList,
650  const double *rhsList,
651  const double *rangeList);
656  virtual void setObjective(const double *array);
657 
662  virtual void setColLower(const double *array);
663 
668  virtual void setColUpper(const double *array);
669 
670  // using OsiSolverInterface::setRowName ;
672  // virtual void setRowName(int rowIndex, std::string & name) ;
673  virtual void setRowName(int rowIndex, std::string name);
674 
675  // using OsiSolverInterface::setColName ;
677  // virtual void setColName(int colIndex, std::string & name) ;
678  virtual void setColName(int colIndex, std::string name);
679 
681 
682  //-------------------------------------------------------------------------
686  virtual void setContinuous(int index);
688  virtual void setInteger(int index);
691  virtual void setContinuous(const int *indices, int len);
694  virtual void setInteger(const int *indices, int len);
696  inline int numberSOS() const
697  {
698  return numberSOS_;
699  }
701  inline const CoinSet *setInfo() const
702  {
703  return setInfo_;
704  }
706  void replaceSetInfo(int numberSOS, CoinSet *setInfo);
716  virtual int findIntegersAndSOS(bool justCount);
718 
719  //-------------------------------------------------------------------------
721  virtual void setObjSense(double s)
722  {
723  modelPtr_->setOptimizationDirection(s < 0 ? -1 : 1);
724  }
725 
736  virtual void setColSolution(const double *colsol);
737 
748  virtual void setRowPrice(const double *rowprice);
749 
750  //-------------------------------------------------------------------------
755 
756  //using OsiSolverInterface::addCol ;
758  virtual void addCol(const CoinPackedVectorBase &vec,
759  const double collb, const double colub,
760  const double obj);
763  virtual void addCol(const CoinPackedVectorBase &vec,
764  const double collb, const double colub,
765  const double obj, std::string name);
767  virtual void addCol(int numberElements, const int *rows, const double *elements,
768  const double collb, const double colub,
769  const double obj);
772  virtual void addCol(int numberElements,
773  const int *rows, const double *elements,
774  const double collb, const double colub,
775  const double obj, std::string name);
777  virtual void addCols(const int numcols,
778  const CoinPackedVectorBase *const *cols,
779  const double *collb, const double *colub,
780  const double *obj);
782  virtual void addCols(const int numcols,
783  const CoinBigIndex *columnStarts, const int *rows, const double *elements,
784  const double *collb, const double *colub,
785  const double *obj);
787  virtual void deleteCols(const int num, const int *colIndices);
788 
790  virtual void addRow(const CoinPackedVectorBase &vec,
791  const double rowlb, const double rowub);
798  virtual void addRow(const CoinPackedVectorBase &vec,
799  const double rowlb, const double rowub,
800  std::string name);
801  virtual void addRow(const CoinPackedVectorBase &vec,
802  const char rowsen, const double rowrhs,
803  const double rowrng);
805  virtual void addRow(int numberElements, const int *columns, const double *element,
806  const double rowlb, const double rowub);
809  virtual void addRow(const CoinPackedVectorBase &vec,
810  const char rowsen, const double rowrhs,
811  const double rowrng, std::string name);
813  virtual void addRows(const int numrows,
814  const CoinPackedVectorBase *const *rows,
815  const double *rowlb, const double *rowub);
817  virtual void addRows(const int numrows,
818  const CoinPackedVectorBase *const *rows,
819  const char *rowsen, const double *rowrhs,
820  const double *rowrng);
821 
823  virtual void addRows(const int numrows,
824  const CoinBigIndex *rowStarts, const int *columns, const double *element,
825  const double *rowlb, const double *rowub);
827  void modifyCoefficient(int row, int column, double newElement,
828  bool keepZero = false)
829  {
830  modelPtr_->modifyCoefficient(row, column, newElement, keepZero);
831  }
832 
834  virtual void deleteRows(const int num, const int *rowIndices);
837  virtual void saveBaseModel();
841  virtual void restoreBaseModel(int numberRows);
842 
843  //-----------------------------------------------------------------------
847  virtual void applyRowCuts(int numberCuts, const OsiRowCut *cuts);
852  virtual void applyRowCuts(int numberCuts, const OsiRowCut **cuts);
875  virtual ApplyCutsReturnCode applyCuts(const OsiCuts &cs,
876  double effectivenessLb = 0.0);
877 
879 
880 
881  //---------------------------------------------------------------------------
882 
883 public:
897  virtual void loadProblem(const CoinPackedMatrix &matrix,
898  const double *collb, const double *colub,
899  const double *obj,
900  const double *rowlb, const double *rowub);
901 
909  virtual void assignProblem(CoinPackedMatrix *&matrix,
910  double *&collb, double *&colub, double *&obj,
911  double *&rowlb, double *&rowub);
912 
925  virtual void loadProblem(const CoinPackedMatrix &matrix,
926  const double *collb, const double *colub,
927  const double *obj,
928  const char *rowsen, const double *rowrhs,
929  const double *rowrng);
930 
938  virtual void assignProblem(CoinPackedMatrix *&matrix,
939  double *&collb, double *&colub, double *&obj,
940  char *&rowsen, double *&rowrhs,
941  double *&rowrng);
942 
945  virtual void loadProblem(const ClpMatrixBase &matrix,
946  const double *collb, const double *colub,
947  const double *obj,
948  const double *rowlb, const double *rowub);
949 
952  virtual void loadProblem(const int numcols, const int numrows,
953  const CoinBigIndex *start, const int *index,
954  const double *value,
955  const double *collb, const double *colub,
956  const double *obj,
957  const double *rowlb, const double *rowub);
958 
961  virtual void loadProblem(const int numcols, const int numrows,
962  const CoinBigIndex *start, const int *index,
963  const double *value,
964  const double *collb, const double *colub,
965  const double *obj,
966  const char *rowsen, const double *rowrhs,
967  const double *rowrng);
969  virtual int loadFromCoinModel(CoinModel &modelObject, bool keepSolution = false);
970 
973  virtual int readMps(const char *filename,
974  const char *extension = "mps");
977  int readMps(const char *filename, bool keepNames, bool allowErrors);
979  virtual int readMps(const char *filename, const char *extension,
980  int &numberSets, CoinSet **&sets);
981 
986  virtual void writeMps(const char *filename,
987  const char *extension = "mps",
988  double objSense = 0.0) const;
997  virtual int writeMpsNative(const char *filename,
998  const char **rowNames, const char **columnNames,
999  int formatType = 0, int numberAcross = 2,
1000  double objSense = 0.0) const;
1002  virtual int readLp(const char *filename, const double epsilon = 1e-5);
1008  virtual void writeLp(const char *filename,
1009  const char *extension = "lp",
1010  double epsilon = 1e-5,
1011  int numberAcross = 10,
1012  int decimals = 5,
1013  double objSense = 0.0,
1014  bool useRowNames = true) const;
1019  virtual void writeLp(FILE *fp,
1020  double epsilon = 1e-5,
1021  int numberAcross = 10,
1022  int decimals = 5,
1023  double objSense = 0.0,
1024  bool useRowNames = true) const;
1030  virtual void replaceMatrixOptional(const CoinPackedMatrix &matrix);
1032  virtual void replaceMatrix(const CoinPackedMatrix &matrix);
1034 
1045  virtual void passInMessageHandler(CoinMessageHandler *handler);
1047  void newLanguage(CoinMessages::Language language);
1048  void setLanguage(CoinMessages::Language language)
1049  {
1050  newLanguage(language);
1051  }
1053  void setLogLevel(int value);
1055  void generateCpp(FILE *fp);
1057  //---------------------------------------------------------------------------
1058 
1061  ClpSimplex *getModelPtr() const;
1065  {
1066  ClpSimplex *model = modelPtr_;
1067  modelPtr_ = newModel;
1068  return model;
1069  }
1071  inline unsigned int specialOptions() const
1072  {
1073  return specialOptions_;
1074  }
1075  void setSpecialOptions(unsigned int value);
1077  inline int lastAlgorithm() const
1078  {
1079  return lastAlgorithm_;
1080  }
1082  inline void setLastAlgorithm(int value)
1083  {
1084  lastAlgorithm_ = value;
1085  }
1087  inline int cleanupScaling() const
1088  {
1089  return cleanupScaling_;
1090  }
1103  inline void setCleanupScaling(int value)
1104  {
1105  cleanupScaling_ = value;
1106  }
1109  inline double smallestElementInCut() const
1110  {
1111  return smallestElementInCut_;
1112  }
1115  inline void setSmallestElementInCut(double value)
1116  {
1117  smallestElementInCut_ = value;
1118  }
1125  inline double smallestChangeInCut() const
1126  {
1127  return smallestChangeInCut_;
1128  }
1135  inline void setSmallestChangeInCut(double value)
1136  {
1137  smallestChangeInCut_ = value;
1138  }
1140  inline void setSolveOptions(const ClpSolve &options)
1141  {
1142  solveOptions_ = options;
1143  }
1147  virtual int tightenBounds(int lightweight = 0);
1149  int infeasibleOtherWay(char *whichWay);
1151  virtual CoinBigIndex getSizeL() const;
1153  virtual CoinBigIndex getSizeU() const;
1156  {
1157  return disasterHandler_;
1158  }
1163  {
1164  return fakeObjective_;
1165  }
1169  void setFakeObjective(double *fakeObjective);
1189  void setupForRepeatedUse(int senseOfAdventure = 0, int printOut = 0);
1191  virtual void synchronizeModel();
1196  void setSpecialOptionsMutable(unsigned int value) const;
1197 
1199 
1200  //---------------------------------------------------------------------------
1201 
1206 
1208  virtual OsiSolverInterface *clone(bool copyData = true) const;
1209 
1212 
1214  OsiClpSolverInterface(ClpSimplex *rhs, bool reallyOwn = false);
1215 
1217  void releaseClp();
1218 
1221 
1223  virtual ~OsiClpSolverInterface();
1224 
1226  virtual void reset();
1228 
1229  //---------------------------------------------------------------------------
1230 
1231 protected:
1233 
1234 
1235  virtual void applyRowCut(const OsiRowCut &rc);
1236 
1238  virtual void applyColCut(const OsiColCut &cc);
1240 
1241  //---------------------------------------------------------------------------
1242 
1243 protected:
1246  void gutsOfDestructor();
1248 
1250  void freeCachedResults() const;
1251 
1253  void freeCachedResults0() const;
1254 
1256  void freeCachedResults1() const;
1257 
1259  void extractSenseRhsRange() const;
1260 
1262  void fillParamMaps();
1271  CoinWarmStartBasis getBasis(ClpSimplex *model) const;
1280  void setBasis(const CoinWarmStartBasis &basis, ClpSimplex *model);
1282  void crunch();
1284  void redoScaleFactors(int numberRows, const CoinBigIndex *starts,
1285  const int *indices, const double *elements);
1286 
1287 public:
1290  void setBasis(const CoinWarmStartBasis &basis);
1292  inline void setBasis()
1293  {
1295  }
1297  CoinWarmStartDiff *getBasisDiff(const unsigned char *statusArray) const;
1299  CoinWarmStartBasis *getBasis(const unsigned char *statusArray) const;
1301  void deleteScaleFactors();
1303  inline const double *upRange() const
1304  {
1305  return rowActivity_;
1306  }
1307  inline const double *downRange() const
1308  {
1309  return columnActivity_;
1310  }
1312  inline void passInRanges(int *array)
1313  {
1314  whichRange_ = array;
1315  }
1317  void setSOSData(int numberSOS, const char *type,
1318  const int *start, const int *indices, const double *weights = NULL);
1320  void computeLargestAway();
1322  inline double largestAway() const
1323  {
1324  return largestAway_;
1325  }
1327  inline void setLargestAway(double value)
1328  {
1329  largestAway_ = value;
1330  }
1332  void lexSolve();
1335  {
1336  return continuousModel_;
1337  }
1339  inline void setContinuousModel(ClpSimplex *model)
1340  {
1341  continuousModel_ = model;
1342  }
1344 
1345 protected:
1348  mutable ClpSimplex *modelPtr_;
1351 
1353  mutable char *rowsense_;
1355 
1357  mutable double *rhs_;
1358 
1362  mutable double *rowrange_;
1363 
1366  mutable CoinWarmStartBasis *ws_;
1369  mutable double *rowActivity_;
1370  mutable double *columnActivity_;
1376  CoinSet *setInfo_;
1393  CoinWarmStartBasis basis_;
1396 
1407  mutable int lastAlgorithm_;
1408 
1411 
1413  mutable CoinPackedMatrix *matrixByRow_;
1414 
1416  CoinPackedMatrix *matrixByRowAtContinuous_;
1417 
1420 
1426 
1427  //std::map<OsiIntParam, ClpIntParam> intParamMap_;
1428  //std::map<OsiDblParam, ClpDblParam> dblParamMap_;
1429  //std::map<OsiStrParam, ClpStrParam> strParamMap_;
1430 
1432  mutable bool fakeMinInSimplex_;
1439  mutable double *linearObjective_;
1440 
1486  mutable unsigned int specialOptions_;
1498  CoinDoubleArrayWithLength rowScale_;
1500  CoinDoubleArrayWithLength columnScale_;
1502 };
1503 
1505 public:
1509  virtual void intoSimplex();
1512  virtual bool check() const;
1514  virtual void saveInfo();
1516  virtual int typeOfDisaster();
1518 
1525  virtual ~OsiClpDisasterHandler();
1526  // Copy
1528  // Assignment
1531  virtual ClpDisasterHandler *clone() const;
1532 
1534 
1539  void setOsiModel(OsiClpSolverInterface *model);
1542  {
1543  return osiModel_;
1544  }
1546  inline void setWhereFrom(int value)
1547  {
1548  whereFrom_ = value;
1549  }
1551  inline int whereFrom() const
1552  {
1553  return whereFrom_;
1554  }
1556  inline void setPhase(int value)
1557  {
1558  phase_ = value;
1559  }
1561  inline int phase() const
1562  {
1563  return phase_;
1564  }
1566  bool inTrouble() const;
1567 
1569 
1570 protected:
1591  int phase_;
1595 };
1596 // So unit test can find out if NDEBUG set
1597 bool OsiClpHasNDEBUG();
1598 //#############################################################################
1600 void OsiClpSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir);
1601 #endif
1602 
1603 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
1604 */
ClpModel::columnLower
double * columnLower() const
Column Lower.
Definition: ClpModel.hpp:755
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:106
ClpFactorization
This just implements CoinFactorization when an ClpMatrixBase object is passed.
Definition: ClpFactorization.hpp:34
OsiClpSolverInterface::setDblParam
bool setDblParam(OsiDblParam key, double value)
OsiClpSolverInterface::findIntegersAndSOS
virtual int findIntegersAndSOS(bool justCount)
Identify integer variables and SOS and create corresponding objects.
OsiClpSolverInterface::ws_
CoinWarmStartBasis * ws_
A pointer to the warmstart information to be used in the hotstarts.
Definition: OsiClpSolverInterface.hpp:1366
OsiClpSolverInterface::applyRowCuts
virtual void applyRowCuts(int numberCuts, const OsiRowCut *cuts)
Apply a collection of row cuts which are all effective.
OsiClpSolverInterface::assignProblem
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...
OsiClpSolverInterface::addCol
virtual void addCol(const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj)
OsiClpSolverInterface::getRowActivity
virtual const double * getRowActivity() const
Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vecto...
OsiClpSolverInterface::setInfo_
CoinSet * setInfo_
SOS set info.
Definition: OsiClpSolverInterface.hpp:1376
OsiClpSolverInterface::setColSetBounds
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...
OsiClpSolverInterface::matrixByRow_
CoinPackedMatrix * matrixByRow_
Pointer to row-wise copy of problem matrix coefficients.
Definition: OsiClpSolverInterface.hpp:1413
OsiClpDisasterHandler::whereFrom
int whereFrom() const
Get where from.
Definition: OsiClpSolverInterface.hpp:1551
OsiClpSolverInterface::itlimOrig_
int itlimOrig_
The original iteration limit before hotstarts started.
Definition: OsiClpSolverInterface.hpp:1395
OsiClpSolverInterface::OsiClpSolverInterface
OsiClpSolverInterface()
Default Constructor.
OsiClpSolverInterface::getColName
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 t...
OsiClpDisasterHandler::phase_
int phase_
phase 0 initial 1 trying continuing with back in and maybe different perturb 2 trying continuing with...
Definition: OsiClpSolverInterface.hpp:1591
OsiClpDisasterHandler::setOsiModel
void setOsiModel(OsiClpSolverInterface *model)
set model.
OsiClpSolverInterface::smallModel_
ClpSimplex * smallModel_
Alternate model (hot starts) - but also could be permanent and used for crunch.
Definition: OsiClpSolverInterface.hpp:1378
OsiClpSolverInterface::specialOptions
unsigned int specialOptions() const
Get special options.
Definition: OsiClpSolverInterface.hpp:1071
OsiClpSolverInterface::modelPtr_
ClpSimplex * modelPtr_
Clp model represented by this class instance.
Definition: OsiClpSolverInterface.hpp:1349
ClpSolve
This is a very simple class to guide algorithms.
Definition: ClpSolve.hpp:20
OsiClpSolverInterface::setRowSetTypes
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()...
OsiClpSolverInterface::getColSolution
virtual const double * getColSolution() const
Get pointer to array[getNumCols()] of primal solution vector.
OsiClpSolverInterface::OsiClpSolverInterfaceUnitTest
friend void OsiClpSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the OsiClpSolverInterface class.
OsiClpSolverInterface::baseModel_
ClpSimplex * baseModel_
Copy of model when option 131072 set.
Definition: OsiClpSolverInterface.hpp:1488
OsiClpDisasterHandler::typeOfDisaster
virtual int typeOfDisaster()
Type of disaster 0 can fix, 1 abort.
OsiClpSolverInterface::setCleanupScaling
void setCleanupScaling(int value)
Set Scaling option When scaling is on it is possible that the scaled problem is feasible but the unsc...
Definition: OsiClpSolverInterface.hpp:1103
OsiClpSolverInterface::applyCuts
virtual ApplyCutsReturnCode applyCuts(const OsiCuts &cs, double effectivenessLb=0.0)
Apply a collection of cuts.
OsiClpSolverInterface
Clp Solver Interface.
Definition: OsiClpSolverInterface.hpp:37
OsiClpSolverInterface::passInDisasterHandler
void passInDisasterHandler(OsiClpDisasterHandler *handler)
Pass in disaster handler.
OsiClpSolverInterface::getBasis
CoinWarmStartBasis getBasis(ClpSimplex *model) const
Warm start.
OsiClpSolverInterface::releaseClp
void releaseClp()
Releases so won't error.
OsiClpSolverInterface::largestAway_
double largestAway_
Largest amount continuous away from bound.
Definition: OsiClpSolverInterface.hpp:1389
OsiClpSolverInterface::numberSOS_
int numberSOS_
Number of SOS sets.
Definition: OsiClpSolverInterface.hpp:1374
OsiClpSolverInterface::basisIsAvailable
virtual bool basisIsAvailable() const
Returns true if a basis is available AND problem is optimal.
OsiClpSolverInterface::setLanguage
void setLanguage(CoinMessages::Language language)
Definition: OsiClpSolverInterface.hpp:1048
OsiClpSolverInterface::replaceMatrixOptional
virtual void replaceMatrixOptional(const CoinPackedMatrix &matrix)
I (JJF) am getting annoyed because I can't just replace a matrix.
ClpModel::rowLower
double * rowLower() const
Row lower.
Definition: ClpModel.hpp:540
OsiClpSolverInterface::smallModelCut
OsiRowCut * smallModelCut(const double *originalLower, const double *originalUpper, int numberRowsAtContinuous, const int *whichGenerator, int typeCut=0)
Return a conflict analysis cut from small model.
OsiClpSolverInterface::setFakeObjective
void setFakeObjective(ClpLinearObjective *fakeObjective)
Set fake objective (and take ownership)
OsiClpSolverInterface::loadProblem
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...
OsiClpSolverInterface::getBasics
virtual void getBasics(int *index) const
Get basic indices (order of indices corresponds to the order of elements in a vector retured by getBI...
OsiClpInfinity
static const double OsiClpInfinity
Definition: OsiClpSolverInterface.hpp:27
OsiClpSolverInterface::getConstPointerToWarmStart
const CoinWarmStartBasis * getConstPointerToWarmStart() const
Get warmstarting information.
Definition: OsiClpSolverInterface.hpp:290
OsiClpDisasterHandler
Definition: OsiClpSolverInterface.hpp:1504
OsiClpSolverInterface::getReducedGradient
virtual void getReducedGradient(double *columnReducedCosts, double *duals, const double *c) const
Get the reduced gradient for the cost vector c.
OsiClpSolverInterface::getBasisStatus
virtual void getBasisStatus(int *cstat, int *rstat) const
The following two methods may be replaced by the methods of OsiSolverInterface using OsiWarmStartBasi...
OsiClpSolverInterface::getObjCoefficients
virtual const double * getObjCoefficients() const
Get pointer to array[getNumCols()] of objective function coefficients.
Definition: OsiClpSolverInterface.hpp:442
OsiClpSolverInterface::downRange
const double * downRange() const
Definition: OsiClpSolverInterface.hpp:1307
OsiClpSolverInterface::getRightHandSide
virtual const double * getRightHandSide() const
Get pointer to array[getNumRows()] of rows right-hand sides.
OsiClpSolverInterface::setContinuous
virtual void setContinuous(int index)
Set the index-th variable to be a continuous variable.
ClpDataSave
This is a tiny class where data can be saved round calls.
Definition: ClpModel.hpp:1402
OsiClpSolverInterface::unmarkHotStart
virtual void unmarkHotStart()
Delete the snapshot.
OsiClpSolverInterface::addCols
virtual void addCols(const int numcols, const CoinPackedVectorBase *const *cols, const double *collb, const double *colub, const double *obj)
OsiClpSolverInterface::freeCachedResults1
void freeCachedResults1() const
Deletes all mutable stuff for matrix etc.
OsiClpSolverInterface::solveOptions_
ClpSolve solveOptions_
Options for initialSolve.
Definition: OsiClpSolverInterface.hpp:1444
OsiClpDisasterHandler::setWhereFrom
void setWhereFrom(int value)
Set where from.
Definition: OsiClpSolverInterface.hpp:1546
OsiClpSolverInterface::cleanupScaling
int cleanupScaling() const
Get scaling action option.
Definition: OsiClpSolverInterface.hpp:1087
OsiClpSolverInterface::isHeuristicInteger
bool isHeuristicInteger(int colIndex) const
Return true only if integer and not optional.
Definition: OsiClpSolverInterface.hpp:488
OsiClpSolverInterface::matrixByRowAtContinuous_
CoinPackedMatrix * matrixByRowAtContinuous_
Pointer to row-wise copy of continuous problem matrix coefficients.
Definition: OsiClpSolverInterface.hpp:1416
OsiClpSolverInterface::saveBaseModel
virtual void saveBaseModel()
If solver wants it can save a copy of "base" (continuous) model here.
OsiClpSolverInterface::columnActivity_
double * columnActivity_
Definition: OsiClpSolverInterface.hpp:1370
OsiClpSolverInterface::setObjective
virtual void setObjective(const double *array)
Set the objective coefficients for all columns array [getNumCols()] is an array of values for the obj...
OsiClpSolverInterface::getRowSense
virtual const char * getRowSense() const
Get pointer to array[getNumRows()] of row constraint senses.
OsiClpSolverInterface::disasterHandler
const OsiClpDisasterHandler * disasterHandler() const
Get disaster handler.
Definition: OsiClpSolverInterface.hpp:1155
OsiClpSolverInterface::setLogLevel
void setLogLevel(int value)
Set log level (will also set underlying solver's log level)
OsiClpSolverInterface::isAbandoned
virtual bool isAbandoned() const
Are there a numerical difficulties?
OsiClpSolverInterface::setStrParam
bool setStrParam(OsiStrParam key, const std::string &value)
OsiClpSolverInterface::fillParamMaps
void fillParamMaps()
OsiClpSolverInterface::tightenBounds
virtual int tightenBounds(int lightweight=0)
Tighten bounds - lightweight or very lightweight 0 - normal, 1 lightweight but just integers,...
OsiClpSolverInterface::isDualObjectiveLimitReached
virtual bool isDualObjectiveLimitReached() const
Is the given dual objective limit reached?
OsiClpSolverInterface::smallestChangeInCut
double smallestChangeInCut() const
Get smallest change in cut.
Definition: OsiClpSolverInterface.hpp:1125
OsiClpSolverInterface::deleteScaleFactors
void deleteScaleFactors()
Delete all scale factor stuff and reset option.
OsiClpSolverInterface::getPrimalRays
virtual std::vector< double * > getPrimalRays(int maxNumRays) const
Get as many primal rays as the solver can provide.
OsiClpSolverInterface::isIterationLimitReached
virtual bool isIterationLimitReached() const
Iteration limit reached?
OsiClpSolverInterface::notOwned_
bool notOwned_
To say if destructor should delete underlying model.
Definition: OsiClpSolverInterface.hpp:1410
OsiClpDisasterHandler::setPhase
void setPhase(int value)
Set phase.
Definition: OsiClpSolverInterface.hpp:1556
ClpModel::matrix
CoinPackedMatrix * matrix() const
Matrix (if not ClpPackedmatrix be careful about memory leak.
Definition: ClpModel.hpp:773
OsiClpSolverInterface::writeMps
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.
OsiClpSolverInterface::setStuff
void setStuff(double tolerance, double increment)
Sets integer tolerance and increment.
OsiClpSolverInterface::getModelPtr
ClpSimplex * getModelPtr() const
Get pointer to Clp model.
OsiClpSolverInterface::setRowType
virtual void setRowType(int index, char sense, double rightHandSide, double range)
Set the type of a single row
OsiClpSolverInterface::getSizeL
virtual CoinBigIndex getSizeL() const
Return number of entries in L part of current factorization.
OsiClpSolverInterface::getBasisDiff
CoinWarmStartDiff * getBasisDiff(const unsigned char *statusArray) const
Warm start difference from basis_ to statusArray.
OsiClpSolverInterface::rowActivity_
double * rowActivity_
also save row and column information for hot starts only used in hotstarts so can be casual
Definition: OsiClpSolverInterface.hpp:1369
OsiClpSolverInterface::restoreBaseModel
virtual void restoreBaseModel(int numberRows)
Strip off rows to get to this number of rows.
OsiClpSolverInterface::getColUpper
virtual const double * getColUpper() const
Get pointer to array[getNumCols()] of column upper bounds.
Definition: OsiClpSolverInterface.hpp:402
OsiClpSolverInterface::passInMessageHandler
virtual void passInMessageHandler(CoinMessageHandler *handler)
Pass in a message handler.
OsiClpSolverInterface::operator=
OsiClpSolverInterface & operator=(const OsiClpSolverInterface &rhs)
Assignment operator.
OsiClpSolverInterface::setRowPrice
virtual void setRowPrice(const double *rowprice)
Set dual solution vector.
OsiClpSolverInterface::setWarmStart
virtual bool setWarmStart(const CoinWarmStart *warmstart)
Set warmstarting information.
OsiClpSolverInterface::setupForRepeatedUse
void setupForRepeatedUse(int senseOfAdventure=0, int printOut=0)
Set up solver for repeated use by Osi interface.
OsiClpSolverInterface::setRowName
virtual void setRowName(int rowIndex, std::string name)
Set name of row.
OsiClpSolverInterface::getBInvARow
virtual void getBInvARow(int row, double *z, double *slack=NULL) const
Get a row of the tableau (slack part in slack if not NULL)
OsiClpSolverInterface::isProvenDualInfeasible
virtual bool isProvenDualInfeasible() const
Is dual infeasiblity proven?
OsiClpSolverInterface::extractSenseRhsRange
void extractSenseRhsRange() const
A method that fills up the rowsense_, rhs_ and rowrange_ arrays.
OsiClpSolverInterface::enableFactorization
virtual void enableFactorization() const
Enables simplex mode 1 (tableau access)
OsiClpSolverInterface::writeLp
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.
OsiClpSolverInterface::modifyCoefficient
void modifyCoefficient(int row, int column, double newElement, bool keepZero=false)
Definition: OsiClpSolverInterface.hpp:827
OsiClpSolverInterface::cleanupScaling_
int cleanupScaling_
Scaling option When scaling is on it is possible that the scaled problem is feasible but the unscaled...
Definition: OsiClpSolverInterface.hpp:1457
OsiClpSolverInterface::pivot
virtual int pivot(int colIn, int colOut, int outStatus)
Perform a pivot by substituting a colIn for colOut in the basis.
OsiClpSolverInterface::getBInvACol
virtual void getBInvACol(int col, double *vec) const
Get a column of the tableau.
OsiClpSolverInterface::setColLower
virtual void setColLower(int elementIndex, double elementValue)
Set a single column lower bound Use -DBL_MAX for -infinity.
OsiClpSolverInterface::lastAlgorithm
int lastAlgorithm() const
Last algorithm used , 1 = primal, 2 = dual other unknown.
Definition: OsiClpSolverInterface.hpp:1077
OsiClpSolverInterface::isProvenPrimalInfeasible
virtual bool isProvenPrimalInfeasible() const
Is primal infeasiblity proven?
OsiClpDisasterHandler::check
virtual bool check() const
Checks if disaster.
OsiClpSolverInterface::integerInformation_
char * integerInformation_
Pointer to integer information.
Definition: OsiClpSolverInterface.hpp:1419
OsiClpSolverInterface::generateCpp
void generateCpp(FILE *fp)
Create C++ lines to get to current state.
OsiClpSolverInterfaceUnitTest
void OsiClpSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the OsiClpSolverInterface class.
OsiClpSolverInterface::specialOptions_
unsigned int specialOptions_
Special options 0x80000000 off 0 simple stuff for branch and bound 1 try and keep work regions as muc...
Definition: OsiClpSolverInterface.hpp:1486
OsiClpSolverInterface::setRowBounds
virtual void setRowBounds(int elementIndex, double lower, double upper)
Set a single row lower and upper bound.
OsiClpSolverInterface::getRowRange
virtual const double * getRowRange() const
Get pointer to array[getNumRows()] of row ranges.
OsiClpSolverInterface::freeCachedResults0
void freeCachedResults0() const
Deletes all mutable stuff for row ranges etc.
OsiClpSolverInterface::clone
virtual OsiSolverInterface * clone(bool copyData=true) const
Clone.
OsiClpDisasterHandler::osiModel_
OsiClpSolverInterface * osiModel_
Pointer to model.
Definition: OsiClpSolverInterface.hpp:1575
OsiClpSolverInterface::disasterHandler_
OsiClpDisasterHandler * disasterHandler_
Possible disaster handler.
Definition: OsiClpSolverInterface.hpp:1494
ClpModel::rowUpper
double * rowUpper() const
Row upper.
Definition: ClpModel.hpp:549
OsiClpSolverInterface::isContinuous
virtual bool isContinuous(int colNumber) const
Return true if column is continuous.
ClpDisasterHandler
Base class for Clp disaster handling.
Definition: ClpEventHandler.hpp:138
OsiClpSolverInterface::freeCachedResults
void freeCachedResults() const
Deletes all mutable stuff.
OsiClpSolverInterface::isInteger
virtual bool isInteger(int colIndex) const
Return true if column is integer.
OsiClpSolverInterface::setObjSense
virtual void setObjSense(double s)
Set objective function sense (1 for min (default), -1 for max,)
Definition: OsiClpSolverInterface.hpp:721
ClpLinearObjective
Linear Objective Class.
Definition: ClpLinearObjective.hpp:17
OsiClpSolverInterface::largestAway
double largestAway() const
Get largest amount continuous away from bound.
Definition: OsiClpSolverInterface.hpp:1322
OsiClpSolverInterface::rhs_
double * rhs_
Pointer to dense vector of row right-hand side values.
Definition: OsiClpSolverInterface.hpp:1357
OsiClpSolverInterface::setBasis
void setBasis()
Just puts current basis_ into ClpSimplex model.
Definition: OsiClpSolverInterface.hpp:1292
OsiClpSolverInterface::setSpecialOptionsMutable
void setSpecialOptionsMutable(unsigned int value) const
Set special options in underlying clp solver.
OsiClpSolverInterface::getIntParam
bool getIntParam(OsiIntParam key, int &value) const
OsiClpSolverInterface::columnScale_
CoinDoubleArrayWithLength columnScale_
Column scale factors (has inverse at end)
Definition: OsiClpSolverInterface.hpp:1500
OsiClpSolverInterface::loadFromCoinModel
virtual int loadFromCoinModel(CoinModel &modelObject, bool keepSolution=false)
This loads a model from a coinModel object - returns number of errors.
OsiClpSolverInterface::redoScaleFactors
void redoScaleFactors(int numberRows, const CoinBigIndex *starts, const int *indices, const double *elements)
Extend scale factors.
ClpModel::optimizationDirection
double optimizationDirection() const
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore.
Definition: ClpModel.hpp:490
OsiClpSolverInterface::basis_
CoinWarmStartBasis basis_
Warmstart information to be used in resolves.
Definition: OsiClpSolverInterface.hpp:1393
ClpModel::modifyCoefficient
void modifyCoefficient(int row, int column, double newElement, bool keepZero=false)
Modify one element of a matrix.
Definition: ClpModel.hpp:234
OsiClpHasNDEBUG
bool OsiClpHasNDEBUG()
OsiClpSolverInterface::setColName
virtual void setColName(int colIndex, std::string name)
Set name of column.
OsiClpSolverInterface::getRowName
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 ...
OsiClpSolverInterface::resolveGub
virtual void resolveGub(int needed)
Resolve an LP relaxation after problem modification (try GUB)
ClpMatrixBase
Abstract base class for Clp Matrices.
Definition: ClpMatrixBase.hpp:38
OsiClpSolverInterface::setHintParam
virtual bool setHintParam(OsiHintParam key, bool yesNo=true, OsiHintStrength strength=OsiHintTry, void *otherInformation=NULL)
OsiClpDisasterHandler::intoSimplex
virtual void intoSimplex()
Into simplex.
OsiClpSolverInterface::setSpecialOptions
void setSpecialOptions(unsigned int value)
OsiClpSolverInterface::solveFromHotStart
virtual void solveFromHotStart()
Optimize starting from the hotstart.
OsiClpSolverInterface::replaceSetInfo
void replaceSetInfo(int numberSOS, CoinSet *setInfo)
Replace setInfo (takes over ownership)
ClpSimplex.hpp
OsiClpSolverInterface::getColType
virtual const char * getColType(bool refresh=false) const
Return array of column length 0 - continuous 1 - binary (may get fixed later) 2 - general integer (ma...
OsiClpSolverInterface::lexSolve
void lexSolve()
Sort of lexicographic resolve.
OsiClpSolverInterface::addRow
virtual void addRow(const CoinPackedVectorBase &vec, const double rowlb, const double rowub)
OsiClpDisasterHandler::inTrouble_
bool inTrouble_
Are we in trouble.
Definition: OsiClpSolverInterface.hpp:1593
OsiClpSolverInterface::isOptionalInteger
bool isOptionalInteger(int colIndex) const
Return true if column is integer but does not have to be declared as such.
ClpNodeStuff
Definition: ClpNode.hpp:188
OsiClpSolverInterface::getRowPrice
virtual const double * getRowPrice() const
Get pointer to array[getNumRows()] of dual prices.
OsiClpSolverInterface::getMatrixByCol
virtual const CoinPackedMatrix * getMatrixByCol() const
Get pointer to column-wise copy of matrix.
OsiClpSolverInterface::getWarmStart
virtual CoinWarmStart * getWarmStart() const
Get warmstarting information.
OsiClpDisasterHandler::phase
int phase() const
Get phase.
Definition: OsiClpSolverInterface.hpp:1561
OsiClpDisasterHandler::osiModel
OsiClpSolverInterface * osiModel() const
Get model.
Definition: OsiClpSolverInterface.hpp:1541
OsiClpSolverInterface::setIntegerType
void setIntegerType(int colIndex, int value)
Set integer type (0,1,2=optional,3=sc,4=scint)
Definition: OsiClpSolverInterface.hpp:498
OsiClpSolverInterface::setObjCoeff
virtual void setObjCoeff(int elementIndex, double elementValue)
Set an objective function coefficient.
OsiClpSolverInterface::setSmallestChangeInCut
void setSmallestChangeInCut(double value)
Set smallest change in cut.
Definition: OsiClpSolverInterface.hpp:1135
OsiClpSolverInterface::dualPivotResult
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...
OsiClpSolverInterface::upRange
const double * upRange() const
If doing fast hot start then ranges are computed.
Definition: OsiClpSolverInterface.hpp:1303
OsiClpSolverInterface::setColSolution
virtual void setColSolution(const double *colsol)
Set the primal solution column values.
ClpEventHandler.hpp
OsiClpDisasterHandler::OsiClpDisasterHandler
OsiClpDisasterHandler(OsiClpSolverInterface *model=NULL)
Default constructor.
OsiClpSolverInterface::fakeMinInSimplex_
bool fakeMinInSimplex_
Faking min to get proper dual solution signs in simplex API.
Definition: OsiClpSolverInterface.hpp:1432
OsiClpSolverInterface::setRowSetBounds
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...
OsiClpSolverInterface::integerType
int integerType(int colIndex) const
Return integer type (0,1,2=optional,3=sc,4=scint)
Definition: OsiClpSolverInterface.hpp:493
OsiClpSolverInterface::getRowLower
virtual const double * getRowLower() const
Get pointer to array[getNumRows()] of row lower bounds.
Definition: OsiClpSolverInterface.hpp:436
ClpLinearObjective.hpp
OsiClpSolverInterface::deleteCols
virtual void deleteCols(const int num, const int *colIndices)
OsiClpSolverInterface::isProvenOptimal
virtual bool isProvenOptimal() const
Is optimality proven?
OsiClpSolverInterface::readMps
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...
OsiClpSolverInterface::getMatrixByRow
virtual const CoinPackedMatrix * getMatrixByRow() const
Get pointer to row-wise copy of matrix.
OsiClpSolverInterface::rowScale_
CoinDoubleArrayWithLength rowScale_
Row scale factors (has inverse at end)
Definition: OsiClpSolverInterface.hpp:1498
OsiClpSolverInterface::lastAlgorithm_
int lastAlgorithm_
Last algorithm used.
Definition: OsiClpSolverInterface.hpp:1407
OsiClpSolverInterface::stopFastDual
void stopFastDual()
Stop fast dual.
OsiClpSolverInterface::deleteRows
virtual void deleteRows(const int num, const int *rowIndices)
OsiClpSolverInterface::resolve
virtual void resolve()
Resolve an LP relaxation after problem modification.
OsiClpSolverInterface::readLp
virtual int readLp(const char *filename, const double epsilon=1e-5)
Read file in LP format (with names)
OsiClpSolverInterface::setSmallestElementInCut
void setSmallestElementInCut(double value)
Set smallest allowed element in cut.
Definition: OsiClpSolverInterface.hpp:1115
OsiClpSolverInterface::setColumnStatus
void setColumnStatus(int iColumn, ClpSimplex::Status status)
Set column status in ClpSimplex and warmStart.
OsiClpSolverInterface::reset
virtual void reset()
Resets as if default constructor.
ClpModel::setOptimizationDirection
void setOptimizationDirection(double value)
OsiClpSolverInterface::getIterationCount
virtual int getIterationCount() const
Get how many iterations it took to solve the problem (whatever "iteration" mean to the solver.
Definition: OsiClpSolverInterface.hpp:535
OsiClpDisasterHandler::saveInfo
virtual void saveInfo()
saves information for next attempt
OsiClpSolverInterface::setSolveOptions
void setSolveOptions(const ClpSolve &options)
Pass in initial solve options.
Definition: OsiClpSolverInterface.hpp:1140
OsiClpSolverInterface::linearObjective_
double * linearObjective_
Linear objective.
Definition: OsiClpSolverInterface.hpp:1439
OsiClpSolverInterface::setSOSData
void setSOSData(int numberSOS, const char *type, const int *start, const int *indices, const double *weights=NULL)
Pass in sos stuff from AMPl.
ClpModel::numberIterations
int numberIterations() const
Number of iterations.
Definition: ClpModel.hpp:378
OsiClpSolverInterface::disableFactorization
virtual void disableFactorization() const
Undo any setting changes made by enableFactorization.
OsiClpSolverInterface::setRowUpper
virtual void setRowUpper(int elementIndex, double elementValue)
Set a single row upper bound Use DBL_MAX for infinity.
OsiClpSolverInterface::isIntegerNonBinary
virtual bool isIntegerNonBinary(int colIndex) const
Return true if variable is general integer.
OsiClpDisasterHandler::inTrouble
bool inTrouble() const
are we in trouble
ClpModel::objective
double * objective() const
Objective.
Definition: ClpModel.hpp:718
OsiClpSolverInterface::setLargestAway
void setLargestAway(double value)
Set largest amount continuous away from bound.
Definition: OsiClpSolverInterface.hpp:1327
OsiClpSolverInterface::getContinuousModel
ClpSimplex * getContinuousModel() const
Get continuous model.
Definition: OsiClpSolverInterface.hpp:1334
OsiClpSolverInterface::newLanguage
void newLanguage(CoinMessages::Language language)
Set language.
OsiClpSolverInterface::branchAndBound
virtual void branchAndBound()
Invoke solver's built-in enumeration algorithm.
OsiClpSolverInterface::synchronizeModel
virtual void synchronizeModel()
Synchronize model (really if no cuts in tree)
OsiClpSolverInterface::disableSimplexInterface
virtual void disableSimplexInterface()
Undo setting changes made by enableSimplexInterface.
OsiClpSolverInterface::getDualRays
virtual std::vector< double * > getDualRays(int maxNumRays, bool fullRay=false) const
Get as many dual rays as the solver can provide.
OsiClpSolverInterface::getMutableMatrixByCol
virtual CoinPackedMatrix * getMutableMatrixByCol() const
Get pointer to mutable column-wise copy of matrix.
OsiClpSolverInterface::isBinary
virtual bool isBinary(int colIndex) const
Return true if variable is binary.
OsiClpSolverInterface::getSizeU
virtual CoinBigIndex getSizeU() const
Return number of entries in U part of current factorization.
OsiClpSolverInterface::isFreeBinary
virtual bool isFreeBinary(int colIndex) const
Return true if variable is binary and not fixed at either bound.
OsiClpSolverInterface::modelCut
OsiRowCut * 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 pro...
OsiClpDisasterHandler::~OsiClpDisasterHandler
virtual ~OsiClpDisasterHandler()
Destructor.
OsiClpSolverInterface::applyRowCut
virtual void applyRowCut(const OsiRowCut &rc)
Apply a row cut (append to constraint matrix).
OsiClpSolverInterface::getStrParam
bool getStrParam(OsiStrParam key, std::string &value) const
OsiSolverInterface
#define OsiSolverInterface
Definition: Idiot.hpp:14
ClpModel::columnUpper
double * columnUpper() const
Column Upper.
Definition: ClpModel.hpp:764
OsiClpSolverInterface::passInRanges
void passInRanges(int *array)
Pass in range array.
Definition: OsiClpSolverInterface.hpp:1312
OsiClpDisasterHandler::whereFrom_
int whereFrom_
Where from 0 dual (resolve) 1 crunch 2 primal (resolve) 4 dual (initialSolve) 6 primal (initialSolve)
Definition: OsiClpSolverInterface.hpp:1583
OsiClpSolverInterface::setColUpper
virtual void setColUpper(int elementIndex, double elementValue)
Set a single column upper bound Use DBL_MAX for infinity.
OsiClpSolverInterface::setInfo
const CoinSet * setInfo() const
SOS set info.
Definition: OsiClpSolverInterface.hpp:701
OsiClpSolverInterface::getReducedCost
virtual const double * getReducedCost() const
Get a pointer to array[getNumCols()] of reduced costs.
OsiClpSolverInterface::primalPivotResult
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,...
OsiClpSolverInterface::initialSolve
virtual void initialSolve()
Solve initial LP relaxation.
ClpModel::numberColumns
int numberColumns() const
Definition: ClpModel.hpp:332
OsiClpSolverInterface::fakeObjective
ClpLinearObjective * fakeObjective() const
Get fake objective.
Definition: OsiClpSolverInterface.hpp:1162
OsiClpSolverInterface::startFastDual
int startFastDual(int options)
Start faster dual - returns negative if problems 1 if infeasible, Options to pass to solver 1 - creat...
OsiClpSolverInterface::setIntParam
bool setIntParam(OsiIntParam key, int value)
OsiClpSolverInterface::setRowLower
virtual void setRowLower(int elementIndex, double elementValue)
Set a single row lower bound Use -DBL_MAX for -infinity.
ClpNode.hpp
OsiClpSolverInterface::computeLargestAway
void computeLargestAway()
Compute largest amount any at continuous away from bound.
OsiClpSolverInterface::swapModelPtr
ClpSimplex * swapModelPtr(ClpSimplex *newModel)
Set pointer to Clp model and return old.
Definition: OsiClpSolverInterface.hpp:1064
OsiClpSolverInterface::fakeObjective_
ClpLinearObjective * fakeObjective_
Fake objective.
Definition: OsiClpSolverInterface.hpp:1496
OsiClpSolverInterface::setOptionalInteger
void setOptionalInteger(int index)
Set the index-th variable to be an optional integer variable.
OsiClpSolverInterface::getNumRows
virtual int getNumRows() const
Get number of rows.
Definition: OsiClpSolverInterface.hpp:373
OsiClpSolverInterface::smallestElementInCut_
double smallestElementInCut_
Smallest allowed element in cut.
Definition: OsiClpSolverInterface.hpp:1383
OsiClpSolverInterface::getRowUpper
virtual const double * getRowUpper() const
Get pointer to array[getNumRows()] of row upper bounds.
Definition: OsiClpSolverInterface.hpp:439
OsiClpSolverInterface::getBInvCol
virtual void getBInvCol(int col, double *vec) const
Get a column of the basis inverse.
OsiClpSolverInterface::getBInvRow
virtual void getBInvRow(int row, double *z) const
Get a row of the basis inverse.
OsiClpSolverInterface::getDblParam
bool getDblParam(OsiDblParam key, double &value) const
OsiClpSolverInterface::isPrimalObjectiveLimitReached
virtual bool isPrimalObjectiveLimitReached() const
Is the given primal objective limit reached?
OsiClpSolverInterface::saveData_
ClpDataSave saveData_
To save data in OsiSimplex stuff.
Definition: OsiClpSolverInterface.hpp:1442
OsiClpSolverInterface::stuff_
ClpNodeStuff stuff_
Stuff for fast dual.
Definition: OsiClpSolverInterface.hpp:1372
OsiClpSolverInterface::applyColCut
virtual void applyColCut(const OsiColCut &cc)
Apply a column cut (adjust one or more bounds).
OsiClpSolverInterface::setInteger
virtual void setInteger(int index)
Set the index-th variable to be an integer variable.
OsiClpSolverInterface::whichRange_
int * whichRange_
Pointer to variables for which we want range information The number is in [0] memory is not owned by ...
Definition: OsiClpSolverInterface.hpp:1425
OsiClpDisasterHandler::operator=
OsiClpDisasterHandler & operator=(const OsiClpDisasterHandler &)
OsiClpSolverInterface::getInfinity
virtual double getInfinity() const
Get solver's value for infinity.
Definition: OsiClpSolverInterface.hpp:512
OsiClpSolverInterface::setContinuousModel
void setContinuousModel(ClpSimplex *model)
Set continuous model.
Definition: OsiClpSolverInterface.hpp:1339
OsiClpSolverInterface::numberSOS
int numberSOS() const
Number of SOS sets.
Definition: OsiClpSolverInterface.hpp:696
OsiClpSolverInterface::infeasibleOtherWay
int infeasibleOtherWay(char *whichWay)
See if any integer variables make infeasible other way.
OsiClpSolverInterface::lastNumberRows_
int lastNumberRows_
Number of rows when last "scaled".
Definition: OsiClpSolverInterface.hpp:1490
OsiClpDisasterHandler::clone
virtual ClpDisasterHandler * clone() const
Clone.
OsiClpSolverInterface::~OsiClpSolverInterface
virtual ~OsiClpSolverInterface()
Destructor.
OsiClpSolverInterface::getColLower
virtual const double * getColLower() const
Get pointer to array[getNumCols()] of column lower bounds.
Definition: OsiClpSolverInterface.hpp:399
OsiClpSolverInterface::continuousModel_
ClpSimplex * continuousModel_
Continuous model.
Definition: OsiClpSolverInterface.hpp:1492
OsiClpSolverInterface::getEmptyWarmStart
virtual CoinWarmStart * getEmptyWarmStart() const
Get an empty warm start object.
OsiClpSolverInterface::enableSimplexInterface
virtual void enableSimplexInterface(bool doingPrimal)
Enables simplex mode 2 (individual pivot control)
OsiClpSolverInterface::gutsOfDestructor
void gutsOfDestructor()
The real work of a copy constructor (used by copy and assignment)
OsiClpSolverInterface::rowsense_
char * rowsense_
Pointer to dense vector of row sense indicators.
Definition: OsiClpSolverInterface.hpp:1354
OsiClpSolverInterface::getNumCols
virtual int getNumCols() const
Get number of columns.
Definition: OsiClpSolverInterface.hpp:367
OsiClpSolverInterface::setBasisStatus
virtual int setBasisStatus(const int *cstat, const int *rstat)
Set the status of structural/artificial variables and factorize, update solution etc.
OsiClpSolverInterface::getObjValue
virtual double getObjValue() const
Get objective function value.
ClpModel::numberRows
int numberRows() const
Number of rows.
Definition: ClpModel.hpp:319
OsiClpSolverInterface::setLastAlgorithm
void setLastAlgorithm(int value)
Set last algorithm used , 1 = primal, 2 = dual other unknown.
Definition: OsiClpSolverInterface.hpp:1082
OsiClpSolverInterface::writeMpsNative
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.
OsiClpSolverInterface::addRows
virtual void addRows(const int numrows, const CoinPackedVectorBase *const *rows, const double *rowlb, const double *rowub)
OsiClpSolverInterface::crunch
void crunch()
Crunch down problem a bit.
OsiClpSolverInterface::smallestElementInCut
double smallestElementInCut() const
Get smallest allowed element in cut.
Definition: OsiClpSolverInterface.hpp:1109
OsiClpSolverInterface::canDoSimplexInterface
virtual int canDoSimplexInterface() const
Simplex API capability.
OsiClpSolverInterface::getNumElements
virtual CoinBigIndex getNumElements() const
Get number of nonzero elements.
Definition: OsiClpSolverInterface.hpp:379
OsiClpSolverInterface::crossover
void crossover(int options, int basis)
Solve when primal column and dual row solutions are near-optimal options - 0 no presolve (use primal ...
OsiClpSolverInterface::getObjSense
virtual double getObjSense() const
Get objective function sense (1 for min (default), -1 for max)
Definition: OsiClpSolverInterface.hpp:451
OsiClpSolverInterface::smallestChangeInCut_
double smallestChangeInCut_
Smallest change in cut.
Definition: OsiClpSolverInterface.hpp:1387
OsiClpSolverInterface::markHotStart
virtual void markHotStart()
Create a hotstart point of the optimization process.
OsiClpSolverInterface::spareArrays_
char * spareArrays_
Arrays for hot starts.
Definition: OsiClpSolverInterface.hpp:1391
OsiClpSolverInterface::factorization_
ClpFactorization * factorization_
factorization for hot starts
Definition: OsiClpSolverInterface.hpp:1380
ClpSimplex::Status
Status
enums for status of various sorts.
Definition: ClpSimplex.hpp:114
OsiClpSolverInterface::rowrange_
double * rowrange_
Pointer to dense vector of slack upper bounds for range constraints (undefined for non-range rows)
Definition: OsiClpSolverInterface.hpp:1362
OsiClpSolverInterface::setColBounds
virtual void setColBounds(int elementIndex, double lower, double upper)
Set a single column lower and upper bound.
OsiClpSolverInterface::getPointerToWarmStart
CoinWarmStartBasis * getPointerToWarmStart()
Get warmstarting information.
Definition: OsiClpSolverInterface.hpp:285
OsiClpSolverInterface::replaceMatrix
virtual void replaceMatrix(const CoinPackedMatrix &matrix)
And if it does matter (not used at present)