- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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
7 #ifndef OsiClpSolverInterface_H
8 #define OsiClpSolverInterface_H
9
10 #include <string>
11 #include <cfloat>
12 #include <map>
13
14 #include "ClpSimplex.hpp"
15 #include "ClpLinearObjective.hpp"
16 #include "CoinPackedMatrix.hpp"
17 #include "OsiSolverInterface.hpp"
18 #include "CoinWarmStartBasis.hpp"
19 #include "ClpEventHandler.hpp"
20 #include "ClpNode.hpp"
21 #include "CoinIndexedVector.hpp"
22 #include "CoinFinite.hpp"
23
24 class OsiRowCut;
25 class OsiClpUserSolver;
26 class OsiClpDisasterHandler;
27 class CoinSet;
28 static const double OsiClpInfinity = COIN_DBL_MAX;
29
30 //#############################################################################
31
38 class OsiClpSolverInterface :
39 virtual public OsiSolverInterface {
40 friend void OsiClpSolverInterfaceUnitTest(const std::string & mpsDir, const std::string & netlibDir);
41
42 public:
43 //---------------------------------------------------------------------------
46 virtual void initialSolve();
48
50 virtual void resolve();
51
53 virtual void resolveGub(int needed);
54
56 virtual void branchAndBound();
57
65 void crossover(int options,int basis);
67
83 virtual int canDoSimplexInterface() const;
84
93 virtual void enableFactorization() const;
94
96 virtual void disableFactorization() const;
97
102 virtual bool basisIsAvailable() const;
103
119 virtual void getBasisStatus(int* cstat, int* rstat) const;
120
131 virtual int setBasisStatus(const int* cstat, const int* rstat);
132
134 virtual void getReducedGradient(double* columnReducedCosts,
135 double * duals,
136 const double * c) const ;
137
139 virtual void getBInvARow(int row, double* z, double * slack=NULL) const;
140
145 virtual void getBInvARow(int row, CoinIndexedVector * z, CoinIndexedVector * slack=NULL,
146 bool keepScaled=false) const;
147
149 virtual void getBInvRow(int row, double* z) const;
150
152 virtual void getBInvACol(int col, double* vec) const ;
153
155 virtual void getBInvACol(int col, CoinIndexedVector * vec) const ;
156
161 virtual void getBInvACol(CoinIndexedVector * vec) const ;
162
164 virtual void getBInvCol(int col, double* vec) const ;
165
170 virtual void getBasics(int* index) const;
171
178 virtual void enableSimplexInterface(bool doingPrimal);
180 void copyEnabledSuff(OsiClpSolverInterface & rhs);
181
183 virtual void disableSimplexInterface();
185 void copyEnabledStuff(ClpSimplex & rhs);
186
194 virtual int pivot(int colIn, int colOut, int outStatus);
195
207 virtual int primalPivotResult(int colIn, int sign,
208 int& colOut, int& outStatus,
209 double& t, CoinPackedVector* dx);
210
217 virtual int dualPivotResult(int& colIn, int& sign,
218 int colOut, int outStatus,
219 double& t, CoinPackedVector* dx);
220
221
223 //---------------------------------------------------------------------------
239 // Set an integer parameter
240 bool setIntParam(OsiIntParam key, int value);
241 // Set an double parameter
242 bool setDblParam(OsiDblParam key, double value);
243 // Set a string parameter
244 bool setStrParam(OsiStrParam key, const std::string & value);
245 // Get an integer parameter
246 bool getIntParam(OsiIntParam key, int& value) const;
247 // Get an double parameter
248 bool getDblParam(OsiDblParam key, double& value) const;
249 // Get a string parameter
250 bool getStrParam(OsiStrParam key, std::string& value) const;
251 // Set a hint parameter - overrides OsiSolverInterface
252 virtual bool setHintParam(OsiHintParam key, bool yesNo=true,
253 OsiHintStrength strength=OsiHintTry,
254 void * otherInformation=NULL);
256
257 //---------------------------------------------------------------------------
259
260 virtual bool isAbandoned() const;
263 virtual bool isProvenOptimal() const;
265 virtual bool isProvenPrimalInfeasible() const;
267 virtual bool isProvenDualInfeasible() const;
269 virtual bool isPrimalObjectiveLimitReached() const;
271 virtual bool isDualObjectiveLimitReached() const;
273 virtual bool isIterationLimitReached() const;
275
276 //---------------------------------------------------------------------------
279
287 virtual CoinWarmStart *getEmptyWarmStart () const;
288
290 virtual CoinWarmStart* getWarmStart() const;
292 inline CoinWarmStartBasis* getPointerToWarmStart()
293 { return &basis_;}
295 inline const CoinWarmStartBasis* getConstPointerToWarmStart() const
296 { return &basis_;}
299 virtual bool setWarmStart(const CoinWarmStart* warmstart);
309 virtual CoinWarmStart* getPointerToWarmStart(bool & mustDelete) ;
310
312 void setColumnStatus(int iColumn, ClpSimplex::Status status);
313
315
316 //---------------------------------------------------------------------------
323 virtual void markHotStart();
326 virtual void solveFromHotStart();
328 virtual void unmarkHotStart();
337 int startFastDual(int options);
339 void stopFastDual();
341 void setStuff(double tolerance,double increment);
343 OsiRowCut * smallModelCut(const double * originalLower, const double * originalUpper,
344 int numberRowsAtContinuous,const int * whichGenerator,
345 int typeCut=0);
349 OsiRowCut * modelCut(const double * originalLower, const double * originalUpper,
350 int numberRowsAtContinuous,const int * whichGenerator,
351 int typeCut=0);
353
354 //---------------------------------------------------------------------------
369 virtual int getNumCols() const {
371 return modelPtr_->numberColumns(); }
372
374 virtual int getNumRows() const {
375 return modelPtr_->numberRows(); }
376
378 virtual int getNumElements() const {
379 int retVal = 0;
380 const CoinPackedMatrix * matrix =modelPtr_->matrix();
381 if ( matrix != NULL ) retVal=matrix->getNumElements();
382 return retVal; }
383
386 virtual std::string getRowName(int rowIndex,
387 unsigned maxLen = static_cast<unsigned>(std::string::npos)) const;
388
391 virtual std::string getColName(int colIndex,
392 unsigned maxLen = static_cast<unsigned>(std::string::npos)) const;
393
394
396 virtual const double * getColLower() const { return modelPtr_->columnLower(); }
397
399 virtual const double * getColUpper() const { return modelPtr_->columnUpper(); }
400
410 virtual const char * getRowSense() const;
411
420 virtual const double * getRightHandSide() const ;
421
430 virtual const double * getRowRange() const ;
431
433 virtual const double * getRowLower() const { return modelPtr_->rowLower(); }
434
436 virtual const double * getRowUpper() const { return modelPtr_->rowUpper(); }
437
439 virtual const double * getObjCoefficients() const
440 { if (fakeMinInSimplex_)
441 return linearObjective_ ;
442 else
443 return modelPtr_->objective(); }
444
446 virtual double getObjSense() const
447 { return ((fakeMinInSimplex_)?-modelPtr_->optimizationDirection():
448 modelPtr_->optimizationDirection()); }
449
451 virtual bool isContinuous(int colNumber) const;
453 virtual bool isBinary(int colIndex) const;
454
459 virtual bool isInteger(int colIndex) const;
460
462 virtual bool isIntegerNonBinary(int colIndex) const;
463
465 virtual bool isFreeBinary(int colIndex) const;
471 virtual const char * getColType(bool refresh=false) const;
472
478 bool isOptionalInteger(int colIndex) const;
480 void setOptionalInteger(int index);
481
483 virtual const CoinPackedMatrix * getMatrixByRow() const;
484
486 virtual const CoinPackedMatrix * getMatrixByCol() const;
487
489 virtual CoinPackedMatrix * getMutableMatrixByCol() const;
490
492 virtual double getInfinity() const { return OsiClpInfinity; }
494
497 virtual const double * getColSolution() const;
499
501 virtual const double * getRowPrice() const;
502
504 virtual const double * getReducedCost() const;
505
508 virtual const double * getRowActivity() const;
509
511 virtual double getObjValue() const;
512
515 virtual int getIterationCount() const
516 { return modelPtr_->numberIterations(); }
517
535 virtual std::vector<double*> getDualRays(int maxNumRays,
536 bool fullRay = false) const;
548 virtual std::vector<double*> getPrimalRays(int maxNumRays) const;
549
551
552
553 //---------------------------------------------------------------------------
554
557 //-------------------------------------------------------------------------
561 virtual void setObjCoeff( int elementIndex, double elementValue );
562
565 virtual void setColLower( int elementIndex, double elementValue );
566
569 virtual void setColUpper( int elementIndex, double elementValue );
570
572 virtual void setColBounds( int elementIndex,
573 double lower, double upper );
574
583 virtual void setColSetBounds(const int* indexFirst,
584 const int* indexLast,
585 const double* boundList);
586
589 virtual void setRowLower( int elementIndex, double elementValue );
590
593 virtual void setRowUpper( int elementIndex, double elementValue ) ;
594
596 virtual void setRowBounds( int elementIndex,
597 double lower, double upper ) ;
598
600 virtual void setRowType(int index, char sense, double rightHandSide,
601 double range);
602
611 virtual void setRowSetBounds(const int* indexFirst,
612 const int* indexLast,
613 const double* boundList);
614
625 virtual void setRowSetTypes(const int* indexFirst,
626 const int* indexLast,
627 const char* senseList,
628 const double* rhsList,
629 const double* rangeList);
634 virtual void setObjective(const double * array);
635
640 virtual void setColLower(const double * array);
641
646 virtual void setColUpper(const double * array);
647
648 // using OsiSolverInterface::setRowName ;
650 // virtual void setRowName(int rowIndex, std::string & name) ;
651 virtual void setRowName(int rowIndex, std::string name) ;
652
653 // using OsiSolverInterface::setColName ;
655 // virtual void setColName(int colIndex, std::string & name) ;
656 virtual void setColName(int colIndex, std::string name) ;
657
659
660 //-------------------------------------------------------------------------
664 virtual void setContinuous(int index);
666 virtual void setInteger(int index);
669 virtual void setContinuous(const int* indices, int len);
672 virtual void setInteger(const int* indices, int len);
674 inline int numberSOS() const
675 { return numberSOS_;}
677 inline const CoinSet * setInfo() const
678 { return setInfo_;}
688 virtual int findIntegersAndSOS(bool justCount);
690
691 //-------------------------------------------------------------------------
693 virtual void setObjSense(double s )
694 { modelPtr_->setOptimizationDirection( s < 0 ? -1 : 1); }
695
706 virtual void setColSolution(const double * colsol);
707
718 virtual void setRowPrice(const double * rowprice);
719
720 //-------------------------------------------------------------------------
725
726 //using OsiSolverInterface::addCol ;
728 virtual void addCol(const CoinPackedVectorBase& vec,
729 const double collb, const double colub,
730 const double obj);
733 virtual void addCol(const CoinPackedVectorBase& vec,
734 const double collb, const double colub,
735 const double obj, std::string name) ;
737 virtual void addCol(int numberElements, const int * rows, const double * elements,
738 const double collb, const double colub,
739 const double obj) ;
742 virtual void addCol(int numberElements,
743 const int* rows, const double* elements,
744 const double collb, const double colub,
745 const double obj, std::string name) ;
747 virtual void addCols(const int numcols,
748 const CoinPackedVectorBase * const * cols,
749 const double* collb, const double* colub,
750 const double* obj);
752 virtual void addCols(const int numcols,
753 const int * columnStarts, const int * rows, const double * elements,
754 const double* collb, const double* colub,
755 const double* obj);
757 virtual void deleteCols(const int num, const int * colIndices);
758
760 virtual void addRow(const CoinPackedVectorBase& vec,
761 const double rowlb, const double rowub);
768 virtual void addRow(const CoinPackedVectorBase& vec,
769 const double rowlb, const double rowub,
770 std::string name) ;
771 virtual void addRow(const CoinPackedVectorBase& vec,
772 const char rowsen, const double rowrhs,
773 const double rowrng);
775 virtual void addRow(int numberElements, const int * columns, const double * element,
776 const double rowlb, const double rowub) ;
779 virtual void addRow(const CoinPackedVectorBase& vec,
780 const char rowsen, const double rowrhs,
781 const double rowrng, std::string name) ;
783 virtual void addRows(const int numrows,
784 const CoinPackedVectorBase * const * rows,
785 const double* rowlb, const double* rowub);
787 virtual void addRows(const int numrows,
788 const CoinPackedVectorBase * const * rows,
789 const char* rowsen, const double* rowrhs,
790 const double* rowrng);
791
793 virtual void addRows(const int numrows,
794 const int * rowStarts, const int * columns, const double * element,
795 const double* rowlb, const double* rowub);
797 void modifyCoefficient(int row, int column, double newElement,
798 bool keepZero=false)
799 {modelPtr_->modifyCoefficient(row,column,newElement, keepZero);}
800
802 virtual void deleteRows(const int num, const int * rowIndices);
805 virtual void saveBaseModel() ;
809 virtual void restoreBaseModel(int numberRows);
810
811 //-----------------------------------------------------------------------
815 virtual void applyRowCuts(int numberCuts, const OsiRowCut * cuts);
820 virtual void applyRowCuts(int numberCuts, const OsiRowCut ** cuts);
843 virtual ApplyCutsReturnCode applyCuts(const OsiCuts & cs,
844 double effectivenessLb = 0.0);
845
847
848
849 //---------------------------------------------------------------------------
850
851 public:
852
866 virtual void loadProblem(const CoinPackedMatrix& matrix,
867 const double* collb, const double* colub,
868 const double* obj,
869 const double* rowlb, const double* rowub);
870
878 virtual void assignProblem(CoinPackedMatrix*& matrix,
879 double*& collb, double*& colub, double*& obj,
880 double*& rowlb, double*& rowub);
881
894 virtual void loadProblem(const CoinPackedMatrix& matrix,
895 const double* collb, const double* colub,
896 const double* obj,
897 const char* rowsen, const double* rowrhs,
898 const double* rowrng);
899
907 virtual void assignProblem(CoinPackedMatrix*& matrix,
908 double*& collb, double*& colub, double*& obj,
909 char*& rowsen, double*& rowrhs,
910 double*& rowrng);
911
914 virtual void loadProblem(const ClpMatrixBase& matrix,
915 const double* collb, const double* colub,
916 const double* obj,
917 const double* rowlb, const double* rowub) ;
918
921 virtual void loadProblem(const int numcols, const int numrows,
922 const CoinBigIndex * start, const int* index,
923 const double* value,
924 const double* collb, const double* colub,
925 const double* obj,
926 const double* rowlb, const double* rowub);
927
930 virtual void loadProblem(const int numcols, const int numrows,
931 const CoinBigIndex * start, const int* index,
932 const double* value,
933 const double* collb, const double* colub,
934 const double* obj,
935 const char* rowsen, const double* rowrhs,
936 const double* rowrng);
938 virtual int loadFromCoinModel ( CoinModel & modelObject, bool keepSolution=false);
939
940 using OsiSolverInterface::readMps ;
943 virtual int readMps(const char *filename,
944 const char *extension = "mps") ;
947 int readMps(const char *filename,bool keepNames,bool allowErrors);
949 virtual int readMps (const char *filename, const char*extension,
950 int & numberSets, CoinSet ** & sets);
951
956 virtual void writeMps(const char *filename,
957 const char *extension = "mps",
958 double objSense=0.0) const;
967 virtual int writeMpsNative(const char *filename,
968 const char ** rowNames, const char ** columnNames,
969 int formatType=0,int numberAcross=2,
970 double objSense=0.0) const ;
972 virtual int readLp(const char *filename, const double epsilon = 1e-5);
978 virtual void writeLp(const char *filename,
979 const char *extension = "lp",
980 double epsilon = 1e-5,
981 int numberAcross = 10,
982 int decimals = 5,
983 double objSense = 0.0,
984 bool useRowNames = true) const;
989 virtual void writeLp(FILE *fp,
990 double epsilon = 1e-5,
991 int numberAcross = 10,
992 int decimals = 5,
993 double objSense = 0.0,
994 bool useRowNames = true) const;
1000 virtual void replaceMatrixOptional(const CoinPackedMatrix & matrix);
1002 virtual void replaceMatrix(const CoinPackedMatrix & matrix) ;
1004
1015 virtual void passInMessageHandler(CoinMessageHandler * handler);
1017 void newLanguage(CoinMessages::Language language);
1018 void setLanguage(CoinMessages::Language language)
1019 {newLanguage(language);}
1021 void setLogLevel(int value);
1023 void generateCpp( FILE * fp);
1025 //---------------------------------------------------------------------------
1026
1029 ClpSimplex * getModelPtr() const ;
1032 inline ClpSimplex * swapModelPtr(ClpSimplex * newModel)
1033 { ClpSimplex * model = modelPtr_; modelPtr_=newModel;return model;}
1035 inline unsigned int specialOptions() const
1036 { return specialOptions_;}
1037 void setSpecialOptions(unsigned int value);
1039 inline int lastAlgorithm() const
1040 { return lastAlgorithm_;}
1042 inline void setLastAlgorithm(int value)
1043 { lastAlgorithm_ = value;}
1045 inline int cleanupScaling() const
1046 { return cleanupScaling_;}
1059 inline void setCleanupScaling(int value)
1060 { cleanupScaling_=value;}
1063 inline double smallestElementInCut() const
1064 { return smallestElementInCut_;}
1067 inline void setSmallestElementInCut(double value)
1068 { smallestElementInCut_=value;}
1075 inline double smallestChangeInCut() const
1076 { return smallestChangeInCut_;}
1083 inline void setSmallestChangeInCut(double value)
1084 { smallestChangeInCut_=value;}
1086 inline void setSolveOptions(const ClpSolve & options)
1087 { solveOptions_ = options;}
1091 virtual int tightenBounds(int lightweight=0);
1093 int infeasibleOtherWay(char * whichWay);
1095 virtual CoinBigIndex getSizeL() const;
1097 virtual CoinBigIndex getSizeU() const;
1099 const OsiClpDisasterHandler * disasterHandler() const
1100 { return disasterHandler_;}
1102 void passInDisasterHandler(OsiClpDisasterHandler * handler);
1104 ClpLinearObjective * fakeObjective() const
1105 { return fakeObjective_;}
1107 void setFakeObjective(ClpLinearObjective * fakeObjective);
1109 void setFakeObjective(double * fakeObjective);
1129 void setupForRepeatedUse(int senseOfAdventure=0, int printOut=0);
1131 virtual void synchronizeModel();
1136 void setSpecialOptionsMutable(unsigned int value) const;
1137
1139
1140 //---------------------------------------------------------------------------
1141
1144 OsiClpSolverInterface ();
1146
1148 virtual OsiSolverInterface * clone(bool copyData = true) const;
1149
1151 OsiClpSolverInterface (const OsiClpSolverInterface &);
1152
1154 OsiClpSolverInterface (ClpSimplex * rhs, bool reallyOwn=false);
1155
1157 void releaseClp();
1158
1160 OsiClpSolverInterface & operator=(const OsiClpSolverInterface& rhs);
1161
1163 virtual ~OsiClpSolverInterface ();
1164
1166 virtual void reset();
1168
1169 //---------------------------------------------------------------------------
1170
1171 protected:
1173
1174
1175 virtual void applyRowCut(const OsiRowCut& rc);
1176
1178 virtual void applyColCut(const OsiColCut& cc);
1180
1181 //---------------------------------------------------------------------------
1182
1183 protected:
1186 void gutsOfDestructor();
1188
1190 void freeCachedResults() const;
1191
1193 void freeCachedResults0() const;
1194
1196 void freeCachedResults1() const;
1197
1199 void extractSenseRhsRange() const;
1200
1202 void fillParamMaps();
1211 CoinWarmStartBasis getBasis(ClpSimplex * model) const;
1220 void setBasis( const CoinWarmStartBasis & basis, ClpSimplex * model);
1222 void crunch();
1224 void redoScaleFactors(int numberRows,const CoinBigIndex * starts,
1225 const int * indices, const double * elements);
1226 public:
1229 void setBasis( const CoinWarmStartBasis & basis);
1231 inline void setBasis( )
1232 { setBasis(basis_,modelPtr_);}
1234 CoinWarmStartDiff * getBasisDiff(const unsigned char * statusArray) const ;
1236 CoinWarmStartBasis * getBasis(const unsigned char * statusArray) const ;
1238 void deleteScaleFactors();
1240 inline const double * upRange() const
1241 { return rowActivity_;}
1242 inline const double * downRange() const
1243 { return columnActivity_;}
1245 inline void passInRanges(int * array)
1246 { whichRange_=array;}
1248 void setSOSData(int numberSOS,const char * type,
1249 const int * start,const int * indices, const double * weights=NULL);
1251 void computeLargestAway();
1253 inline double largestAway() const
1254 { return largestAway_;}
1256 inline void setLargestAway(double value)
1257 { largestAway_ = value;}
1259 void lexSolve();
1261
1262 protected:
1265 mutable ClpSimplex * modelPtr_;
1268
1270 mutable char *rowsense_;
1272
1274 mutable double *rhs_;
1275
1279 mutable double *rowrange_;
1280
1283 mutable CoinWarmStartBasis* ws_;
1286 mutable double * rowActivity_;
1287 mutable double * columnActivity_;
1289 ClpNodeStuff stuff_;
1291 int numberSOS_;
1293 CoinSet * setInfo_;
1295 ClpSimplex * smallModel_;
1297 ClpFactorization * factorization_;
1300 double smallestElementInCut_;
1304 double smallestChangeInCut_;
1306 double largestAway_;
1308 char * spareArrays_;
1310 CoinWarmStartBasis basis_;
1312 int itlimOrig_;
1313
1324 mutable int lastAlgorithm_;
1325
1327 bool notOwned_;
1328
1330 mutable CoinPackedMatrix *matrixByRow_;
1331
1333 CoinPackedMatrix *matrixByRowAtContinuous_;
1334
1336 char * integerInformation_;
1337
1342 int * whichRange_;
1343
1344 //std::map<OsiIntParam, ClpIntParam> intParamMap_;
1345 //std::map<OsiDblParam, ClpDblParam> dblParamMap_;
1346 //std::map<OsiStrParam, ClpStrParam> strParamMap_;
1347
1349 mutable bool fakeMinInSimplex_ ;
1356 mutable double *linearObjective_;
1357
1359 mutable ClpDataSave saveData_;
1361 ClpSolve solveOptions_;
1374 int cleanupScaling_;
1402 mutable unsigned int specialOptions_;
1404 ClpSimplex * baseModel_;
1406 int lastNumberRows_;
1408 ClpSimplex * continuousModel_;
1410 OsiClpDisasterHandler * disasterHandler_ ;
1412 ClpLinearObjective * fakeObjective_;
1414 CoinDoubleArrayWithLength rowScale_;
1416 CoinDoubleArrayWithLength columnScale_;
1418 };
1419
1420 class OsiClpDisasterHandler : public ClpDisasterHandler {
1421 public:
1425 virtual void intoSimplex();
1428 virtual bool check() const ;
1430 virtual void saveInfo();
1432 virtual int typeOfDisaster();
1434
1435
1440 OsiClpDisasterHandler(OsiClpSolverInterface * model = NULL);
1442 virtual ~OsiClpDisasterHandler();
1443 // Copy
1444 OsiClpDisasterHandler(const OsiClpDisasterHandler&);
1445 // Assignment
1446 OsiClpDisasterHandler& operator=(const OsiClpDisasterHandler&);
1448 virtual ClpDisasterHandler * clone() const;
1449
1451
1456 void setOsiModel(OsiClpSolverInterface * model);
1458 inline OsiClpSolverInterface * osiModel() const
1459 { return osiModel_;}
1461 inline void setWhereFrom(int value)
1462 { whereFrom_=value;}
1464 inline int whereFrom() const
1465 { return whereFrom_;}
1467 inline void setPhase(int value)
1468 { phase_=value;}
1470 inline int phase() const
1471 { return phase_;}
1473 bool inTrouble() const;
1474
1476
1477
1478 protected:
1482 OsiClpSolverInterface * osiModel_;
1491 int whereFrom_;
1499 int phase_;
1501 bool inTrouble_;
1503 };
1504 // So unit test can find out if NDEBUG set
1505 bool OsiClpHasNDEBUG();
1506 //#############################################################################
1508 void OsiClpSolverInterfaceUnitTest(const std::string & mpsDir, const std::string & netlibDir);
1509 #endif
OsiClpSolverInterface::cleanupScaling
int cleanupScaling() const
Get scaling action option.
Definition: OsiClpSolverInterface.hpp:1045
OsiClpSolverInterface::saveBaseModel
virtual void saveBaseModel()
If solver wants it can save a copy of &quot;base&quot; (continuous) model here.
OsiClpDisasterHandler::setOsiModel
void setOsiModel(OsiClpSolverInterface *model)
set model.
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:105
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::setRowUpper
virtual void setRowUpper(int elementIndex, double elementValue)
Set a single row upper bound Use DBL_MAX for infinity.
OsiHintStrength
OsiHintStrength
Definition: OsiSolverParameters.hpp:131
OsiClpSolverInterface::setRowPrice
virtual void setRowPrice(const double *rowprice)
Set dual solution vector.
CoinPackedMatrix.hpp
OsiClpSolverInterface::getReducedGradient
virtual void getReducedGradient(double *columnReducedCosts, double *duals, const double *c) const
Get the reduced gradient for the cost vector c.
ClpEventHandler.hpp
OsiClpSolverInterface::lastNumberRows_
int lastNumberRows_
Number of rows when last &quot;scaled&quot;.
Definition: OsiClpSolverInterface.hpp:1406
OsiClpSolverInterface::modifyCoefficient
void modifyCoefficient(int row, int column, double newElement, bool keepZero=false)
Add a named column (primal variable) to the problem.
Definition: OsiClpSolverInterface.hpp:797
OsiClpSolverInterface::disableFactorization
virtual void disableFactorization() const
Undo any setting changes made by enableFactorization.
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::redoScaleFactors
void redoScaleFactors(int numberRows, const CoinBigIndex *starts, const int *indices, const double *elements)
Extend scale factors.
OsiClpSolverInterface::getSizeU
virtual CoinBigIndex getSizeU() const
Return number of entries in U part of current factorization.
OsiClpSolverInterface::newLanguage
void newLanguage(CoinMessages::Language language)
Set language.
OsiIntParam
OsiIntParam
Definition: OsiSolverParameters.hpp:8
OsiClpSolverInterface::setLogLevel
void setLogLevel(int value)
Set log level (will also set underlying solver&#39;s log level)
CoinModel
This is a simple minded model which is stored in a format which makes it easier to construct and modi...
Definition: CoinModel.hpp:161
OsiClpSolverInterface::getRowActivity
virtual const double * getRowActivity() const
Get pointer to array[getNumRows()] of row activity levels (constraint matrix times the solution vecto...
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::applyColCut
virtual void applyColCut(const OsiColCut &cc)
Apply a column cut (adjust one or more bounds).
OsiClpSolverInterface::lexSolve
void lexSolve()
Sort of lexicographic resolve.
OsiClpSolverInterface::getNumCols
virtual int getNumCols() const
Get number of columns.
Definition: OsiClpSolverInterface.hpp:370
ClpSolve
This is a very simple class to guide algorithms.
Definition: ClpSolve.hpp:20
ClpModel::numberIterations
int numberIterations() const
Number of iterations.
Definition: ClpModel.hpp:363
CoinMessageHandler
Base class for message handling.
Definition: CoinMessageHandler.hpp:327
OsiClpSolverInterface::setHintParam
virtual bool setHintParam(OsiHintParam key, bool yesNo=true, OsiHintStrength strength=OsiHintTry, void *otherInformation=NULL)
Set a hint parameter.
OsiClpSolverInterface::setLargestAway
void setLargestAway(double value)
Set largest amount continuous away from bound.
Definition: OsiClpSolverInterface.hpp:1256
OsiColCut
Column Cut Class.
Definition: OsiColCut.hpp:23
ClpDataSave
This is a tiny class where data can be saved round calls.
Definition: ClpModel.hpp:1269
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::downRange
const double * downRange() const
Sets up working basis as a copy of input and puts in as basis.
Definition: OsiClpSolverInterface.hpp:1242
OsiClpSolverInterface::numberSOS_
int numberSOS_
Number of SOS sets.
Definition: OsiClpSolverInterface.hpp:1291
OsiClpSolverInterface::tightenBounds
virtual int tightenBounds(int lightweight=0)
Tighten bounds - lightweight or very lightweight 0 - normal, 1 lightweight but just integers...
OsiClpSolverInterface::rowActivity_
double * rowActivity_
also save row and column information for hot starts only used in hotstarts so can be casual ...
Definition: OsiClpSolverInterface.hpp:1286
OsiRowCut
Row Cut Class.
Definition: OsiRowCut.hpp:29
ClpLinearObjective
Linear Objective Class.
Definition: ClpLinearObjective.hpp:17
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 ...
ClpModel::rowUpper
double * rowUpper() const
Row upper.
Definition: ClpModel.hpp:503
OsiClpSolverInterface::columnActivity_
double * columnActivity_
Pointer to dense vector of row sense indicators.
Definition: OsiClpSolverInterface.hpp:1287
OsiClpSolverInterface::getReducedCost
virtual const double * getReducedCost() const
Get a pointer to array[getNumCols()] of reduced costs.
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::addRows
virtual void addRows(const int numrows, const CoinPackedVectorBase *const *rows, const double *rowlb, const double *rowub)
Add a named column (primal variable) to the problem.
OsiClpSolverInterface::fakeObjective_
ClpLinearObjective * fakeObjective_
Fake objective.
Definition: OsiClpSolverInterface.hpp:1412
OsiClpSolverInterface::setWarmStart
virtual bool setWarmStart(const CoinWarmStart *warmstart)
Set warmstarting information.
OsiClpSolverInterface::releaseClp
void releaseClp()
Releases so won&#39;t error.
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.
OsiClpSolverInterface::setSmallestElementInCut
void setSmallestElementInCut(double value)
Set smallest allowed element in cut.
Definition: OsiClpSolverInterface.hpp:1067
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::enableFactorization
virtual void enableFactorization() const
Enables simplex mode 1 (tableau access)
OsiClpSolverInterface::passInMessageHandler
virtual void passInMessageHandler(CoinMessageHandler *handler)
Pass in a message handler.
ClpModel::matrix
CoinPackedMatrix * matrix() const
Matrix (if not ClpPackedmatrix be careful about memory leak.
Definition: ClpModel.hpp:697
CoinWarmStartDiff
Abstract base class for warm start `diff&#39; objects.
Definition: CoinWarmStart.hpp:48
OsiClpSolverInterface::freeCachedResults
void freeCachedResults() const
Deletes all mutable stuff.
OsiClpSolverInterface::setSpecialOptions
void setSpecialOptions(unsigned int value)
Get pointer to Clp model.
OsiClpSolverInterface::lastAlgorithm
int lastAlgorithm() const
Last algorithm used , 1 = primal, 2 = dual other unknown.
Definition: OsiClpSolverInterface.hpp:1039
CoinFinite.hpp
OsiClpSolverInterface::getColLower
virtual const double * getColLower() const
Get pointer to array[getNumCols()] of column lower bounds.
Definition: OsiClpSolverInterface.hpp:396
OsiClpSolverInterface::notOwned_
bool notOwned_
To say if destructor should delete underlying model.
Definition: OsiClpSolverInterface.hpp:1327
OsiClpSolverInterface::matrixByRowAtContinuous_
CoinPackedMatrix * matrixByRowAtContinuous_
Pointer to row-wise copy of continuous problem matrix coefficients.
Definition: OsiClpSolverInterface.hpp:1333
OsiClpSolverInterface::continuousModel_
ClpSimplex * continuousModel_
Continuous model.
Definition: OsiClpSolverInterface.hpp:1408
OsiClpSolverInterface::isPrimalObjectiveLimitReached
virtual bool isPrimalObjectiveLimitReached() const
Is the given primal objective limit reached?
OsiClpSolverInterface::setObjSense
virtual void setObjSense(double s)
Set objective function sense (1 for min (default), -1 for max,)
Definition: OsiClpSolverInterface.hpp:693
ClpModel::optimizationDirection
double optimizationDirection() const
Direction of optimization (1 - minimize, -1 - maximize, 0 - ignore.
Definition: ClpModel.hpp:457
CoinDoubleArrayWithLength
double * version
Definition: CoinIndexedVector.hpp:619
OsiClpSolverInterface::factorization_
ClpFactorization * factorization_
factorization for hot starts
Definition: OsiClpSolverInterface.hpp:1297
ClpSimplex.hpp
OsiClpSolverInterface::solveFromHotStart
virtual void solveFromHotStart()
Optimize starting from the hotstart.
OsiClpInfinity
static const double OsiClpInfinity
Definition: OsiClpSolverInterface.hpp:28
OsiClpSolverInterface::setLastAlgorithm
void setLastAlgorithm(int value)
Set last algorithm used , 1 = primal, 2 = dual other unknown.
Definition: OsiClpSolverInterface.hpp:1042
OsiClpSolverInterface::disasterHandler_
OsiClpDisasterHandler * disasterHandler_
Possible disaster handler.
Definition: OsiClpSolverInterface.hpp:1410
OsiClpSolverInterface::setRowLower
virtual void setRowLower(int elementIndex, double elementValue)
Set a single row lower bound Use -DBL_MAX for -infinity.
ClpModel::numberRows
int numberRows() const
Number of rows.
Definition: ClpModel.hpp:315
OsiClpSolverInterface::loadFromCoinModel
virtual int loadFromCoinModel(CoinModel &modelObject, bool keepSolution=false)
This loads a model from a coinModel object - returns number of errors.
OsiClpSolverInterface::getObjValue
virtual double getObjValue() const
Get objective function value.
OsiClpDisasterHandler::inTrouble_
bool inTrouble_
Are we in trouble.
Definition: OsiClpSolverInterface.hpp:1501
OsiClpSolverInterface::smallestChangeInCut
double smallestChangeInCut() const
Get smallest change in cut.
Definition: OsiClpSolverInterface.hpp:1075
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::markHotStart
virtual void markHotStart()
Create a hotstart point of the optimization process.
OsiClpSolverInterface::stopFastDual
void stopFastDual()
Stop fast dual.
OsiClpSolverInterface::operator=
OsiClpSolverInterface & operator=(const OsiClpSolverInterface &rhs)
Assignment operator.
OsiClpSolverInterface::modelPtr_
ClpSimplex * modelPtr_
Clp model represented by this class instance.
Definition: OsiClpSolverInterface.hpp:1266
OsiClpSolverInterface::fillParamMaps
void fillParamMaps()
Sets up working basis as a copy of input and puts in as basis.
OsiClpSolverInterface::getEmptyWarmStart
virtual CoinWarmStart * getEmptyWarmStart() const
Get an empty warm start object.
OsiClpDisasterHandler::check
virtual bool check() const
Checks if disaster.
CoinPackedMatrix
Sparse Matrix Base Class.
Definition: CoinPackedMatrix.hpp:79
OsiClpSolverInterface::isFreeBinary
virtual bool isFreeBinary(int colIndex) const
Return true if variable is binary and not fixed at either bound.
OsiClpSolverInterface::resolve
virtual void resolve()
Resolve an LP relaxation after problem modification.
OsiClpSolverInterface::setFakeObjective
void setFakeObjective(ClpLinearObjective *fakeObjective)
Set fake objective (and take ownership)
OsiClpSolverInterface::getIterationCount
virtual int getIterationCount() const
Get how many iterations it took to solve the problem (whatever &quot;iteration&quot; mean to the solver...
Definition: OsiClpSolverInterface.hpp:515
OsiClpDisasterHandler::setPhase
void setPhase(int value)
Set phase.
Definition: OsiClpSolverInterface.hpp:1467
OsiClpSolverInterface::setColSolution
virtual void setColSolution(const double *colsol)
Set the primal solution column values.
OsiClpSolverInterface::setRowBounds
virtual void setRowBounds(int elementIndex, double lower, double upper)
Set a single row lower and upper bound.
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:1342
OsiClpSolverInterface::disableSimplexInterface
virtual void disableSimplexInterface()
Undo setting changes made by enableSimplexInterface.
OsiClpSolverInterface::setRowName
virtual void setRowName(int rowIndex, std::string name)
Set name of row.
OsiClpSolverInterface::setInfo_
CoinSet * setInfo_
SOS set info.
Definition: OsiClpSolverInterface.hpp:1293
OsiClpSolverInterface::getWarmStart
virtual CoinWarmStart * getWarmStart() const
Get warmstarting information.
OsiClpDisasterHandler::setWhereFrom
void setWhereFrom(int value)
Set where from.
Definition: OsiClpSolverInterface.hpp:1461
OsiClpSolverInterface::getNumElements
virtual int getNumElements() const
Get number of nonzero elements.
Definition: OsiClpSolverInterface.hpp:378
OsiClpSolverInterface::getNumRows
virtual int getNumRows() const
Get number of rows.
Definition: OsiClpSolverInterface.hpp:374
OsiCuts
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
OsiClpSolverInterface::smallestElementInCut_
double smallestElementInCut_
Smallest allowed element in cut.
Definition: OsiClpSolverInterface.hpp:1300
OsiClpSolverInterface::upRange
const double * upRange() const
If doing fast hot start then ranges are computed.
Definition: OsiClpSolverInterface.hpp:1240
OsiSolverInterface::readMps
virtual int readMps(const char *filename, const char *extension="mps")
Read a problem in MPS format from the given filename.
OsiClpSolverInterface::isIterationLimitReached
virtual bool isIterationLimitReached() const
Iteration limit reached?
OsiClpSolverInterface::getMatrixByCol
virtual const CoinPackedMatrix * getMatrixByCol() const
Get pointer to column-wise copy of matrix.
OsiClpSolverInterface::enableSimplexInterface
virtual void enableSimplexInterface(bool doingPrimal)
Enables simplex mode 2 (individual pivot control)
OsiClpSolverInterface::isProvenPrimalInfeasible
virtual bool isProvenPrimalInfeasible() const
Is primal infeasiblity proven?
OsiClpSolverInterface::initialSolve
virtual void initialSolve()
Solve initial LP relaxation.
OsiClpSolverInterface::saveData_
ClpDataSave saveData_
To save data in OsiSimplex stuff.
Definition: OsiClpSolverInterface.hpp:1359
ClpNode.hpp
OsiClpSolverInterface::findIntegersAndSOS
virtual int findIntegersAndSOS(bool justCount)
Identify integer variables and SOS and create corresponding objects.
OsiClpSolverInterface::lastAlgorithm_
int lastAlgorithm_
Last algorithm used.
Definition: OsiClpSolverInterface.hpp:1324
OsiClpSolverInterface::setColLower
virtual void setColLower(int elementIndex, double elementValue)
Set a single column lower bound Use -DBL_MAX for -infinity.
CoinPackedVectorBase
Abstract base class for various sparse vectors.
Definition: CoinPackedVectorBase.hpp:23
OsiClpSolverInterface::getModelPtr
ClpSimplex * getModelPtr() const
Get pointer to Clp model.
OsiClpDisasterHandler::whereFrom_
int whereFrom_
Where from 0 dual (resolve) 1 crunch 2 primal (resolve) 4 dual (initialSolve) 6 primal (initialSolve)...
Definition: OsiClpSolverInterface.hpp:1491
OsiClpSolverInterface::deleteRows
virtual void deleteRows(const int num, const int *rowIndices)
Add a named column (primal variable) to the problem.
OsiClpSolverInterface::isContinuous
virtual bool isContinuous(int colNumber) const
Return true if column is continuous.
OsiClpSolverInterface::disasterHandler
const OsiClpDisasterHandler * disasterHandler() const
Get disaster handler.
Definition: OsiClpSolverInterface.hpp:1099
OsiClpSolverInterface::crunch
void crunch()
Crunch down problem a bit.
OsiClpDisasterHandler
Definition: OsiClpSolverInterface.hpp:1420
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:1402
OsiClpSolverInterface::synchronizeModel
virtual void synchronizeModel()
Synchronize model (really if no cuts in tree)
ClpNodeStuff
Definition: ClpNode.hpp:176
OsiClpSolverInterface::deleteCols
virtual void deleteCols(const int num, const int *colIndices)
Add a named column (primal variable) to the problem.
OsiClpSolverInterface::~OsiClpSolverInterface
virtual ~OsiClpSolverInterface()
Destructor.
OsiClpSolverInterface::gutsOfDestructor
void gutsOfDestructor()
The real work of a copy constructor (used by copy and assignment)
OsiClpSolverInterface::copyEnabledSuff
void copyEnabledSuff(OsiClpSolverInterface &rhs)
Copy across enabled stuff from one solver to another.
OsiClpDisasterHandler::clone
virtual ClpDisasterHandler * clone() const
Clone.
OsiClpDisasterHandler::intoSimplex
virtual void intoSimplex()
Into simplex.
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:1374
OsiClpSolverInterface::rhs_
double * rhs_
Pointer to dense vector of row right-hand side values.
Definition: OsiClpSolverInterface.hpp:1274
OsiClpSolverInterface::setContinuous
virtual void setContinuous(int index)
Set the index-th variable to be a continuous variable.
OsiClpSolverInterface::setInteger
virtual void setInteger(int index)
Set the index-th variable to be an integer variable.
OsiClpSolverInterface::passInDisasterHandler
void passInDisasterHandler(OsiClpDisasterHandler *handler)
Pass in disaster handler.
OsiClpSolverInterface::getBInvACol
virtual void getBInvACol(int col, double *vec) const
Get a column of the tableau.
ClpSimplex::Status
Status
enums for status of various sorts.
Definition: ClpSimplex.hpp:78
OsiClpSolverInterface::fakeObjective
ClpLinearObjective * fakeObjective() const
Get fake objective.
Definition: OsiClpSolverInterface.hpp:1104
OsiClpSolverInterface::setColUpper
virtual void setColUpper(int elementIndex, double elementValue)
Set a single column upper bound Use DBL_MAX for infinity.
OsiClpSolverInterface::largestAway
double largestAway() const
Get largest amount continuous away from bound.
Definition: OsiClpSolverInterface.hpp:1253
OsiClpSolverInterface::getBasisDiff
CoinWarmStartDiff * getBasisDiff(const unsigned char *statusArray) const
Warm start difference from basis_ to statusArray.
OsiClpSolverInterface::isIntegerNonBinary
virtual bool isIntegerNonBinary(int colIndex) const
Return true if variable is general integer.
OsiClpSolverInterface::setSolveOptions
void setSolveOptions(const ClpSolve &options)
Pass in initial solve options.
Definition: OsiClpSolverInterface.hpp:1086
ClpModel::rowLower
double * rowLower() const
Row lower.
Definition: ClpModel.hpp:496
OsiClpSolverInterface::restoreBaseModel
virtual void restoreBaseModel(int numberRows)
Strip off rows to get to this number of rows.
OsiClpSolverInterface::rowScale_
CoinDoubleArrayWithLength rowScale_
Row scale factors (has inverse at end)
Definition: OsiClpSolverInterface.hpp:1414
OsiClpSolverInterface::setSpecialOptionsMutable
void setSpecialOptionsMutable(unsigned int value) const
Set special options in underlying clp solver.
ClpModel::numberColumns
int numberColumns() const
Number of rows.
Definition: ClpModel.hpp:325
OsiClpSolverInterface::getPointerToWarmStart
CoinWarmStartBasis * getPointerToWarmStart()
Get warmstarting information.
Definition: OsiClpSolverInterface.hpp:292
OsiClpSolverInterface::OsiClpSolverInterface
OsiClpSolverInterface()
Default Constructor.
OsiClpSolverInterface::getBasis
CoinWarmStartBasis getBasis(ClpSimplex *model) const
Warm start.
CoinSet
Very simple class for containing data on set.
Definition: CoinMpsIO.hpp:221
OsiClpSolverInterface::getRowLower
virtual const double * getRowLower() const
Get pointer to array[getNumRows()] of row lower bounds.
Definition: OsiClpSolverInterface.hpp:433
OsiStrParam
OsiStrParam
Definition: OsiSolverParameters.hpp:88
OsiClpSolverInterface::computeLargestAway
void computeLargestAway()
Compute largest amount any at continuous away from bound.
OsiClpSolverInterface::rowrange_
double * rowrange_
Pointer to dense vector of slack upper bounds for range constraints (undefined for non-range rows) ...
Definition: OsiClpSolverInterface.hpp:1279
CoinIndexedVector.hpp
ClpDisasterHandler
Base class for Clp disaster handling.
Definition: ClpEventHandler.hpp:134
OsiClpSolverInterface::setObjCoeff
virtual void setObjCoeff(int elementIndex, double elementValue)
Set an objective function coefficient.
OsiClpSolverInterface::getStrParam
bool getStrParam(OsiStrParam key, std::string &value) const
Get a string parameter.
OsiClpSolverInterface::integerInformation_
char * integerInformation_
Pointer to integer information.
Definition: OsiClpSolverInterface.hpp:1336
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::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::setColumnStatus
void setColumnStatus(int iColumn, ClpSimplex::Status status)
Set column status in ClpSimplex and warmStart.
OsiClpSolverInterface::setStrParam
bool setStrParam(OsiStrParam key, const std::string &value)
Set a string parameter.
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::applyCuts
virtual ApplyCutsReturnCode applyCuts(const OsiCuts &cs, double effectivenessLb=0.0)
Apply a collection of cuts.
OsiClpSolverInterface::getBInvRow
virtual void getBInvRow(int row, double *z) const
Get a row of the basis inverse.
CoinIndexedVector
Indexed Vector.
Definition: CoinIndexedVector.hpp:104
OsiClpSolverInterface::getRowSense
virtual const char * getRowSense() const
Get pointer to array[getNumRows()] of row constraint senses.
OsiClpSolverInterface::setLanguage
void setLanguage(CoinMessages::Language language)
Pass in a message handler.
Definition: OsiClpSolverInterface.hpp:1018
OsiClpSolverInterface
Clp Solver Interface.
Definition: OsiClpSolverInterface.hpp:38
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::freeCachedResults0
void freeCachedResults0() const
Deletes all mutable stuff for row ranges etc.
OsiClpSolverInterface::startFastDual
int startFastDual(int options)
Start faster dual - returns negative if problems 1 if infeasible, Options to pass to solver 1 - creat...
OsiClpSolverInterface::infeasibleOtherWay
int infeasibleOtherWay(char *whichWay)
See if any integer variables make infeasible other way.
OsiClpSolverInterface::setDblParam
bool setDblParam(OsiDblParam key, double value)
Set a double parameter.
OsiClpSolverInterface::getBInvCol
virtual void getBInvCol(int col, double *vec) const
Get a column of the basis inverse.
OsiClpDisasterHandler::osiModel
OsiClpSolverInterface * osiModel() const
Get model.
Definition: OsiClpSolverInterface.hpp:1458
OsiClpSolverInterface::addCols
virtual void addCols(const int numcols, const CoinPackedVectorBase *const *cols, const double *collb, const double *colub, const double *obj)
Add a named column (primal variable) to the problem.
OsiClpSolverInterface::getDualRays
virtual std::vector< double * > getDualRays(int maxNumRays, bool fullRay=false) const
Get as many dual rays as the solver can provide.
OsiClpSolverInterface::isAbandoned
virtual bool isAbandoned() const
Are there a numerical difficulties?
OsiSolverInterface.hpp
OsiClpSolverInterface::applyRowCut
virtual void applyRowCut(const OsiRowCut &rc)
Apply a row cut (append to constraint matrix).
ClpLinearObjective.hpp
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:62
OsiClpSolverInterface::getRowUpper
virtual const double * getRowUpper() const
Get pointer to array[getNumRows()] of row upper bounds.
Definition: OsiClpSolverInterface.hpp:436
CoinWarmStartBasis.hpp
OsiClpSolverInterface::getConstPointerToWarmStart
const CoinWarmStartBasis * getConstPointerToWarmStart() const
Get warmstarting information.
Definition: OsiClpSolverInterface.hpp:295
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:70
OsiClpSolverInterface::smallestChangeInCut_
double smallestChangeInCut_
Smallest change in cut.
Definition: OsiClpSolverInterface.hpp:1304
OsiClpSolverInterface::passInRanges
void passInRanges(int *array)
Pass in range array.
Definition: OsiClpSolverInterface.hpp:1245
OsiClpSolverInterface::getMatrixByRow
virtual const CoinPackedMatrix * getMatrixByRow() const
Get pointer to row-wise copy of matrix.
OsiClpSolverInterface::isDualObjectiveLimitReached
virtual bool isDualObjectiveLimitReached() const
Is the given dual objective limit reached?
OsiClpSolverInterface::addRow
virtual void addRow(const CoinPackedVectorBase &vec, const double rowlb, const double rowub)
Add a named column (primal variable) to the problem.
OsiClpSolverInterface::canDoSimplexInterface
virtual int canDoSimplexInterface() const
Simplex API capability.
COIN_DBL_MAX
const double COIN_DBL_MAX
Definition: CoinFinite.hpp:18
OsiClpSolverInterface::generateCpp
void generateCpp(FILE *fp)
Create C++ lines to get to current state.
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:1059
ClpMatrixBase
Abstract base class for Clp Matrices.
Definition: ClpMatrixBase.hpp:38
OsiClpSolverInterface::applyRowCuts
virtual void applyRowCuts(int numberCuts, const OsiRowCut *cuts)
Apply a collection of row cuts which are all effective.
OsiClpSolverInterface::swapModelPtr
ClpSimplex * swapModelPtr(ClpSimplex *newModel)
Set pointer to Clp model and return old.
Definition: OsiClpSolverInterface.hpp:1032
OsiClpSolverInterface::basis_
CoinWarmStartBasis basis_
Warmstart information to be used in resolves.
Definition: OsiClpSolverInterface.hpp:1310
OsiClpHasNDEBUG
bool OsiClpHasNDEBUG()
ClpModel::setOptimizationDirection
void setOptimizationDirection(double value)
Number of rows.
OsiClpSolverInterface::replaceMatrix
virtual void replaceMatrix(const CoinPackedMatrix &matrix)
And if it does matter (not used at present)
ClpModel::columnUpper
double * columnUpper() const
Column Upper.
Definition: ClpModel.hpp:690
OsiClpSolverInterface::setOptionalInteger
void setOptionalInteger(int index)
Set the index-th variable to be an optional integer variable.
OsiClpSolverInterface::ws_
CoinWarmStartBasis * ws_
A pointer to the warmstart information to be used in the hotstarts.
Definition: OsiClpSolverInterface.hpp:1283
OsiClpSolverInterface::getObjSense
virtual double getObjSense() const
Get objective function sense (1 for min (default), -1 for max)
Definition: OsiClpSolverInterface.hpp:446
OsiClpSolverInterface::setSmallestChangeInCut
void setSmallestChangeInCut(double value)
Set smallest change in cut.
Definition: OsiClpSolverInterface.hpp:1083
OsiClpDisasterHandler::phase
int phase() const
Get phase.
Definition: OsiClpSolverInterface.hpp:1470
OsiClpDisasterHandler::saveInfo
virtual void saveInfo()
saves information for next attempt
OsiClpSolverInterface::isOptionalInteger
bool isOptionalInteger(int colIndex) const
Return true if column is integer but does not have to be declared as such.
OsiClpSolverInterface::getRowRange
virtual const double * getRowRange() const
Get pointer to array[getNumRows()] of row ranges.
OsiClpSolverInterface::addCol
virtual void addCol(const CoinPackedVectorBase &vec, const double collb, const double colub, const double obj)
Add a named column (primal variable) to the problem.
OsiClpSolverInterface::numberSOS
int numberSOS() const
Number of SOS sets.
Definition: OsiClpSolverInterface.hpp:674
OsiClpSolverInterface::matrixByRow_
CoinPackedMatrix * matrixByRow_
Pointer to row-wise copy of problem matrix coefficients.
Definition: OsiClpSolverInterface.hpp:1330
OsiClpSolverInterface::setStuff
void setStuff(double tolerance, double increment)
Sets integer tolerance and increment.
OsiClpSolverInterface::spareArrays_
char * spareArrays_
Arrays for hot starts.
Definition: OsiClpSolverInterface.hpp:1308
CoinWarmStart
Abstract base class for warm start information.
Definition: CoinWarmStart.hpp:21
OsiClpSolverInterface::getColUpper
virtual const double * getColUpper() const
Get pointer to array[getNumCols()] of column upper bounds.
Definition: OsiClpSolverInterface.hpp:399
OsiClpSolverInterface::specialOptions
unsigned int specialOptions() const
Get special options.
Definition: OsiClpSolverInterface.hpp:1035
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...
OsiClpDisasterHandler::typeOfDisaster
virtual int typeOfDisaster()
Type of disaster 0 can fix, 1 abort.
OsiClpSolverInterface::smallModel_
ClpSimplex * smallModel_
Alternate model (hot starts) - but also could be permanent and used for crunch.
Definition: OsiClpSolverInterface.hpp:1295
OsiClpDisasterHandler::phase_
int phase_
phase 0 initial 1 trying continuing with back in and maybe different perturb 2 trying continuing with...
Definition: OsiClpSolverInterface.hpp:1499
CoinPackedVector
Sparse Vector.
Definition: CoinPackedVector.hpp:123
OsiClpSolverInterface::getSizeL
virtual CoinBigIndex getSizeL() const
Return number of entries in L part of current factorization.
OsiClpSolverInterface::getDblParam
bool getDblParam(OsiDblParam key, double &value) const
Get a double parameter.
OsiClpSolverInterface::isBinary
virtual bool isBinary(int colIndex) const
Return true if variable is binary.
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...
OsiClpSolverInterface::extractSenseRhsRange
void extractSenseRhsRange() const
A method that fills up the rowsense_, rhs_ and rowrange_ arrays.
OsiClpSolverInterfaceUnitTest
void OsiClpSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the OsiClpSolverInterface class.
OsiHintParam
OsiHintParam
Definition: OsiSolverParameters.hpp:107
OsiClpSolverInterface::fakeMinInSimplex_
bool fakeMinInSimplex_
Faking min to get proper dual solution signs in simplex API.
Definition: OsiClpSolverInterface.hpp:1349
OsiClpSolverInterface::getInfinity
virtual double getInfinity() const
Get solver&#39;s value for infinity.
Definition: OsiClpSolverInterface.hpp:492
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::getPrimalRays
virtual std::vector< double * > getPrimalRays(int maxNumRays) const
Get as many primal rays as the solver can provide.
OsiClpDisasterHandler::~OsiClpDisasterHandler
virtual ~OsiClpDisasterHandler()
Destructor.
OsiClpDisasterHandler::inTrouble
bool inTrouble() const
are we in trouble
OsiClpSolverInterface::setupForRepeatedUse
void setupForRepeatedUse(int senseOfAdventure=0, int printOut=0)
Set up solver for repeated use by Osi interface.
OsiClpSolverInterface::unmarkHotStart
virtual void unmarkHotStart()
Delete the snapshot.
OsiClpSolverInterface::isProvenDualInfeasible
virtual bool isProvenDualInfeasible() const
Is dual infeasiblity proven?
OsiClpDisasterHandler::OsiClpDisasterHandler
OsiClpDisasterHandler(OsiClpSolverInterface *model=NULL)
Default constructor.
OsiClpDisasterHandler::osiModel_
OsiClpSolverInterface * osiModel_
Pointer to model.
Definition: OsiClpSolverInterface.hpp:1483
OsiClpSolverInterface::replaceMatrixOptional
virtual void replaceMatrixOptional(const CoinPackedMatrix &matrix)
I (JJF) am getting annoyed because I can&#39;t just replace a matrix.
OsiClpSolverInterface::setIntParam
bool setIntParam(OsiIntParam key, int value)
Set an integer parameter.
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...
OsiClpSolverInterface::pivot
virtual int pivot(int colIn, int colOut, int outStatus)
Perform a pivot by substituting a colIn for colOut in the basis.
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...
ClpModel::modifyCoefficient
void modifyCoefficient(int row, int column, double newElement, bool keepZero=false)
Modify one element of a matrix.
Definition: ClpModel.hpp:231
OsiClpSolverInterface::freeCachedResults1
void freeCachedResults1() const
Deletes all mutable stuff for matrix etc.
OsiDblParam
OsiDblParam
Definition: OsiSolverParameters.hpp:52
OsiClpSolverInterface::baseModel_
ClpSimplex * baseModel_
Copy of model when option 131072 set.
Definition: OsiClpSolverInterface.hpp:1404
OsiClpSolverInterface::deleteScaleFactors
void deleteScaleFactors()
Delete all scale factor stuff and reset option.
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::largestAway_
double largestAway_
Largest amount continuous away from bound.
Definition: OsiClpSolverInterface.hpp:1306
OsiClpSolverInterface::getMutableMatrixByCol
virtual CoinPackedMatrix * getMutableMatrixByCol() const
Get pointer to mutable column-wise copy of matrix.
ClpModel::objective
double * objective() const
Objective.
Definition: ClpModel.hpp:651
OsiClpSolverInterface::clone
virtual OsiSolverInterface * clone(bool copyData=true) const
Clone.
OsiClpSolverInterface::isInteger
virtual bool isInteger(int colIndex) const
Return true if column is integer.
OsiClpSolverInterface::columnScale_
CoinDoubleArrayWithLength columnScale_
Column scale factors (has inverse at end)
Definition: OsiClpSolverInterface.hpp:1416
OsiClpSolverInterface::OsiClpSolverInterfaceUnitTest
friend void OsiClpSolverInterfaceUnitTest(const std::string &mpsDir, const std::string &netlibDir)
A function that tests the methods in the OsiClpSolverInterface class.
OsiClpSolverInterface::linearObjective_
double * linearObjective_
Linear objective.
Definition: OsiClpSolverInterface.hpp:1356
OsiClpSolverInterface::setInfo
const CoinSet * setInfo() const
SOS set info.
Definition: OsiClpSolverInterface.hpp:677
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::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::setBasisStatus
virtual int setBasisStatus(const int *cstat, const int *rstat)
Set the status of structural/artificial variables and factorize, update solution etc.
OsiClpSolverInterface::rowsense_
char * rowsense_
Pointer to dense vector of row sense indicators.
Definition: OsiClpSolverInterface.hpp:1271
OsiClpSolverInterface::getIntParam
bool getIntParam(OsiIntParam key, int &value) const
Get an integer parameter.
OsiHintTry
This means it is only a hint.
Definition: OsiSolverParameters.hpp:135
OsiClpSolverInterface::basisIsAvailable
virtual bool basisIsAvailable() const
Returns true if a basis is available AND problem is optimal.
OsiClpSolverInterface::getRightHandSide
virtual const double * getRightHandSide() const
Get pointer to array[getNumRows()] of rows right-hand sides.
OsiClpDisasterHandler::whereFrom
int whereFrom() const
Get where from.
Definition: OsiClpSolverInterface.hpp:1464
OsiClpSolverInterface::solveOptions_
ClpSolve solveOptions_
Options for initialSolve.
Definition: OsiClpSolverInterface.hpp:1361
OsiClpSolverInterface::copyEnabledStuff
void copyEnabledStuff(ClpSimplex &rhs)
Copy across enabled stuff from one solver to another.
CoinPackedMatrix::getNumElements
CoinBigIndex getNumElements() const
Number of entries in the packed matrix.
Definition: CoinPackedMatrix.hpp:107
OsiClpSolverInterface::setBasis
void setBasis()
Just puts current basis_ into ClpSimplex model.
Definition: OsiClpSolverInterface.hpp:1231
OsiClpSolverInterface::reset
virtual void reset()
Resets as if default constructor.
OsiClpSolverInterface::setRowType
virtual void setRowType(int index, char sense, double rightHandSide, double range)
Set the type of a single row
OsiClpSolverInterface::readLp
virtual int readLp(const char *filename, const double epsilon=1e-5)
Read file in LP format (with names)
CoinMessages::Language
Language
Supported languages.
Definition: CoinMessageHandler.hpp:136
OsiClpSolverInterface::isProvenOptimal
virtual bool isProvenOptimal() const
Is optimality proven?
OsiClpSolverInterface::branchAndBound
virtual void branchAndBound()
Invoke solver&#39;s built-in enumeration algorithm.
OsiClpSolverInterface::getRowPrice
virtual const double * getRowPrice() const
Get pointer to array[getNumRows()] of dual prices.
OsiClpSolverInterface::stuff_
ClpNodeStuff stuff_
Stuff for fast dual.
Definition: OsiClpSolverInterface.hpp:1289
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.
CoinWarmStartBasis
The default COIN simplex (basis-oriented) warm start class.
Definition: CoinWarmStartBasis.hpp:40
OsiClpSolverInterface::smallestElementInCut
double smallestElementInCut() const
Get smallest allowed element in cut.
Definition: OsiClpSolverInterface.hpp:1063
OsiClpSolverInterface::itlimOrig_
int itlimOrig_
The original iteration limit before hotstarts started.
Definition: OsiClpSolverInterface.hpp:1312
OsiClpDisasterHandler::operator=
OsiClpDisasterHandler & operator=(const OsiClpDisasterHandler &)
Default constructor.
ClpFactorization
This just implements CoinFactorization when an ClpMatrixBase object is passed.
Definition: ClpFactorization.hpp:35
OsiClpSolverInterface::getColSolution
virtual const double * getColSolution() const
Get pointer to array[getNumCols()] of primal solution vector.
OsiClpSolverInterface::getObjCoefficients
virtual const double * getObjCoefficients() const
Get pointer to array[getNumCols()] of objective function coefficients.
Definition: OsiClpSolverInterface.hpp:439
OsiClpSolverInterface::setColName
virtual void setColName(int colIndex, std::string name)
Set name of column.
OsiClpSolverInterface::resolveGub
virtual void resolveGub(int needed)
Resolve an LP relaxation after problem modification (try GUB)
ClpModel::columnLower
double * columnLower() const
Column Lower.
Definition: ClpModel.hpp:683
OsiClpSolverInterface::setColBounds
virtual void setColBounds(int elementIndex, double lower, double upper)
Set a single column lower and upper bound.