Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbcModel.hpp
Go to the documentation of this file.
1 /* $Id: CbcModel.hpp 2206 2015-07-07 20:44:40Z stefan $ */
2 // Copyright (C) 2002, 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 CbcModel_H
7 #define CbcModel_H
8 #include <string>
9 #include <vector>
10 #include "CoinMessageHandler.hpp"
11 #include "OsiSolverInterface.hpp"
12 #include "OsiBranchingObject.hpp"
13 #include "OsiCuts.hpp"
14 #include "CoinWarmStartBasis.hpp"
15 #include "CbcCompareBase.hpp"
16 #include "CbcCountRowCut.hpp"
17 #include "CbcMessage.hpp"
18 #include "CbcEventHandler.hpp"
19 #include "ClpDualRowPivot.hpp"
20 
21 
22 class CbcCutGenerator;
23 class CbcBaseModel;
24 class OsiRowCut;
25 class OsiBabSolver;
26 class OsiRowCutDebugger;
27 class CglCutGenerator;
28 class CglStored;
29 class CbcCutModifier;
30 class CglTreeProbingInfo;
31 class CbcHeuristic;
32 class OsiObject;
33 class CbcThread;
34 class CbcTree;
35 class CbcStrategy;
36 class CbcSymmetry;
37 class CbcFeasibilityBase;
38 class CbcStatistics;
39 class CbcFullNodeInfo;
40 class CbcEventHandler ;
41 class CglPreProcess;
43 class ClpNodeStuff;
44 
45 // #define CBC_CHECK_BASIS 1
46 
47 //#############################################################################
48 
101 class CbcModel {
102 
103 public:
104 
105  enum CbcIntParam {
129  };
130 
131  enum CbcDblParam {
195  };
196 
197  //---------------------------------------------------------------------------
198 
199 public:
201 
202 
206  void initialSolve();
207 
218  void branchAndBound(int doStatistics = 0);
219 private:
220 
228  bool solveWithCuts(OsiCuts & cuts, int numberTries, CbcNode * node);
236  int serialCuts(OsiCuts & cuts, CbcNode * node, OsiCuts & slackCuts, int lastNumberCuts);
244  int parallelCuts(CbcBaseModel * master, OsiCuts & cuts, CbcNode * node, OsiCuts & slackCuts, int lastNumberCuts);
251  CbcNode ** solveOneNode(int whichSolver, CbcNode * node,
252  int & numberNodesOutput, int & status) ;
254  void resizeWhichGenerator(int numberNow, int numberAfter);
255 public:
256 #ifdef CBC_KEEP_DEPRECATED
257  // See if anyone is using these any more!!
262  CbcModel * cleanModel(const double * lower, const double * upper);
279  int subBranchAndBound(CbcModel * model2,
280  CbcModel * presolvedModel,
281  int maximumNodes);
297  int subBranchAndBound(const double * lower, const double * upper,
298  int maximumNodes);
299 
306  OsiSolverInterface * strengthenedModel();
316  CglPreProcess * preProcess( int makeEquality = 0, int numberPasses = 5,
317  int tuning = 5);
320  void postProcess(CglPreProcess * process);
321 #endif
322  void addUpdateInformation(const CbcObjectUpdateData & data);
330  int doOneNode(CbcModel * baseModel, CbcNode * & node, CbcNode * & newNode);
331 
332 public:
346  int resolve(CbcNodeInfo * parent, int whereFrom,
347  double * saveSolution = NULL,
348  double * saveLower = NULL,
349  double * saveUpper = NULL);
351  void makeGlobalCuts(int numberRows, const int * which);
353  int makeGlobalCut(const OsiRowCut * cut);
355  int makeGlobalCut(const OsiRowCut & cut);
357  void makeGlobalCut(const OsiColCut * cut);
359  void makeGlobalCut(const OsiColCut & cut);
361  void makePartialCut(const OsiRowCut * cut, const OsiSolverInterface * solver=NULL);
363  void makeGlobalCuts();
365  inline const int * whichGenerator() const
366  { return whichGenerator_;}
368 
371 
383  CbcModel * findCliques(bool makeEquality, int atLeastThisMany,
384  int lessThanThis, int defaultValue = 1000);
385 
394  CbcModel * integerPresolve(bool weak = false);
395 
400  bool integerPresolveThisModel(OsiSolverInterface * originalSolver, bool weak = false);
401 
402 
404  void originalModel(CbcModel * presolvedModel, bool weak);
405 
426  bool tightenVubs(int type, bool allowMultipleBinary = false,
427  double useCutoff = 1.0e50);
428 
434  bool tightenVubs(int numberVubs, const int * which,
435  double useCutoff = 1.0e50);
439  void analyzeObjective();
440 
444  void AddIntegers();
448  void saveModel(OsiSolverInterface * saveSolver, double * checkCutoffForRestart, bool * feasible);
452  void flipModel();
453 
455 
461 
463  inline int numberObjects() const {
464  return numberObjects_;
465  }
467  inline void setNumberObjects(int number) {
468  numberObjects_ = number;
469  }
470 
472  inline OsiObject ** objects() const {
473  return object_;
474  }
475 
477  const inline OsiObject * object(int which) const {
478  return object_[which];
479  }
481  inline OsiObject * modifiableObject(int which) const {
482  return object_[which];
483  }
484 
485  void setOptionalInteger(int index);
486 
488  void deleteObjects(bool findIntegers = true);
489 
495 
501 
503  void synchronizeModel() ;
504 
514  void findIntegers(bool startAgain, int type = 0);
515 
516 #ifdef SWITCH_VARIABLES
517  int findSwitching();
520  int fixAssociated(OsiSolverInterface * solver,int cleanBasis);
522  int checkAssociated(const OsiSolverInterface * solver,
523  const double * solution, int printLevel);
524 #endif
525 
526 
527  //---------------------------------------------------------------------------
528 
538  inline bool setIntParam(CbcIntParam key, int value) {
540  intParam_[key] = value;
541  return true;
542  }
544  inline bool setDblParam(CbcDblParam key, double value) {
545  dblParam_[key] = value;
546  return true;
547  }
549  inline int getIntParam(CbcIntParam key) const {
550  return intParam_[key];
551  }
553  inline double getDblParam(CbcDblParam key) const {
554  return dblParam_[key];
555  }
561  void setCutoff(double value) ;
562 
564  inline double getCutoff() const { //double value ;
565  //solver_->getDblParam(OsiDualObjectiveLimit,value) ;
566  //assert( dblParam_[CbcCurrentCutoff]== value * solver_->getObjSense());
567  return dblParam_[CbcCurrentCutoff];
568  }
569 
571  inline bool setMaximumNodes( int value) {
572  return setIntParam(CbcMaxNumNode, value);
573  }
574 
576  inline int getMaximumNodes() const {
577  return getIntParam(CbcMaxNumNode);
578  }
579 
584  inline bool setMaximumSolutions( int value) {
585  return setIntParam(CbcMaxNumSol, value);
586  }
591  inline int getMaximumSolutions() const {
592  return getIntParam(CbcMaxNumSol);
593  }
595  inline bool setPrintingMode( int value) {
596  return setIntParam(CbcPrinting, value);
597  }
598 
600  inline int getPrintingMode() const {
601  return getIntParam(CbcPrinting);
602  }
603 
608  inline bool setMaximumSeconds( double value) {
609  return setDblParam(CbcMaximumSeconds, value);
610  }
615  inline double getMaximumSeconds() const {
617  }
619  double getCurrentSeconds() const ;
620 
622  bool maximumSecondsReached() const ;
623 
627  inline bool setIntegerTolerance( double value) {
628  return setDblParam(CbcIntegerTolerance, value);
629  }
633  inline double getIntegerTolerance() const {
635  }
636 
641  inline bool setInfeasibilityWeight( double value) {
642  return setDblParam(CbcInfeasibilityWeight, value);
643  }
648  inline double getInfeasibilityWeight() const {
650  }
651 
655  inline bool setAllowableGap( double value) {
656  return setDblParam(CbcAllowableGap, value);
657  }
661  inline double getAllowableGap() const {
663  }
664 
668  inline bool setAllowableFractionGap( double value) {
669  return setDblParam(CbcAllowableFractionGap, value);
670  }
674  inline double getAllowableFractionGap() const {
676  }
680  inline bool setAllowablePercentageGap( double value) {
681  return setDblParam(CbcAllowableFractionGap, value*0.01);
682  }
686  inline double getAllowablePercentageGap() const {
687  return 100.0*getDblParam(CbcAllowableFractionGap);
688  }
692  inline bool setHeuristicGap( double value) {
693  return setDblParam(CbcHeuristicGap, value);
694  }
698  inline double getHeuristicGap() const {
700  }
701 
705  inline bool setHeuristicFractionGap( double value) {
706  return setDblParam(CbcHeuristicFractionGap, value);
707  }
711  inline double getHeuristicFractionGap() const {
713  }
718  inline bool setCutoffIncrement( double value) {
719  return setDblParam(CbcCutoffIncrement, value);
720  }
725  inline double getCutoffIncrement() const {
727  }
729  bool canStopOnGap() const;
730 
735  void setHotstartSolution(const double * solution, const int * priorities = NULL) ;
736 
738  inline void setMinimumDrop(double value) {
739  minimumDrop_ = value;
740  }
742  inline double getMinimumDrop() const {
743  return minimumDrop_;
744  }
745 
748  inline void setMaximumCutPassesAtRoot(int value) {
749  maximumCutPassesAtRoot_ = value;
750  }
752  inline int getMaximumCutPassesAtRoot() const {
754  }
755 
758  inline void setMaximumCutPasses(int value) {
759  maximumCutPasses_ = value;
760  }
762  inline int getMaximumCutPasses() const {
763  return maximumCutPasses_;
764  }
767  inline int getCurrentPassNumber() const {
768  return currentPassNumber_;
769  }
772  inline void setCurrentPassNumber(int value) {
773  currentPassNumber_ = value;
774  }
775 
781  void setNumberStrong(int number);
785  inline int numberStrong() const {
786  return numberStrong_;
787  }
790  inline void setPreferredWay(int value) {
791  preferredWay_ = value;
792  }
794  inline int getPreferredWay() const {
795  return preferredWay_;
796  }
798  inline int whenCuts() const {
799  return whenCuts_;
800  }
802  inline void setWhenCuts(int value) {
803  whenCuts_ = value;
804  }
810  bool doCutsNow(int allowForTopOfTree) const;
811 
817  void setNumberBeforeTrust(int number);
820  inline int numberBeforeTrust() const {
821  return numberBeforeTrust_;
822  }
828  void setNumberPenalties(int number);
831  inline int numberPenalties() const {
832  return numberPenalties_;
833  }
835  inline const CbcFullNodeInfo * topOfTree() const
836  { return topOfTree_;}
838  inline void setNumberAnalyzeIterations(int number) {
839  numberAnalyzeIterations_ = number;
840  }
841  inline int numberAnalyzeIterations() const {
843  }
846  inline double penaltyScaleFactor() const {
847  return penaltyScaleFactor_;
848  }
851  void setPenaltyScaleFactor(double value);
859  void inline setProblemType(int number) {
860  problemType_ = number;
861  }
862  inline int problemType() const {
863  return problemType_;
864  }
866  inline int currentDepth() const {
867  return currentDepth_;
868  }
869 
871  void setHowOftenGlobalScan(int number);
873  inline int howOftenGlobalScan() const {
874  return howOftenGlobalScan_;
875  }
877  inline int * originalColumns() const {
878  return originalColumns_;
879  }
881  void setOriginalColumns(const int * originalColumns,
882  int numberGood=COIN_INT_MAX) ;
884  OsiRowCut * conflictCut(const OsiSolverInterface * solver, bool & localCuts);
885 
893  inline void setPrintFrequency(int number) {
894  printFrequency_ = number;
895  }
897  inline int printFrequency() const {
898  return printFrequency_;
899  }
901 
902  //---------------------------------------------------------------------------
904 
905  bool isAbandoned() const;
908  bool isProvenOptimal() const;
910  bool isProvenInfeasible() const;
912  bool isContinuousUnbounded() const;
914  bool isProvenDualInfeasible() const;
916  bool isNodeLimitReached() const;
918  bool isSecondsLimitReached() const;
920  bool isSolutionLimitReached() const;
922  inline int getIterationCount() const {
923  return numberIterations_;
924  }
926  inline void incrementIterationCount(int value) {
927  numberIterations_ += value;
928  }
930  inline int getNodeCount() const {
931  return numberNodes_;
932  }
934  inline void incrementNodeCount(int value) {
935  numberNodes_ += value;
936  }
938  inline int getExtraNodeCount() const {
939  return numberExtraNodes_;
940  }
942  inline int getFathomCount() const {
943  return numberFathoms_;
944  }
954  inline int status() const {
955  return status_;
956  }
957  inline void setProblemStatus(int value) {
958  status_ = value;
959  }
972  inline int secondaryStatus() const {
973  return secondaryStatus_;
974  }
975  inline void setSecondaryStatus(int value) {
976  secondaryStatus_ = value;
977  }
979  bool isInitialSolveAbandoned() const ;
981  bool isInitialSolveProvenOptimal() const ;
986 
988 
989  //---------------------------------------------------------------------------
1002  inline int numberRowsAtContinuous() const {
1004  return numberRowsAtContinuous_;
1005  }
1006 
1008  inline int getNumCols() const {
1009  return solver_->getNumCols();
1010  }
1011 
1013  inline int getNumRows() const {
1014  return solver_->getNumRows();
1015  }
1016 
1018  inline CoinBigIndex getNumElements() const {
1019  return solver_->getNumElements();
1020  }
1021 
1023  inline int numberIntegers() const {
1024  return numberIntegers_;
1025  }
1026  // Integer variables
1027  inline const int * integerVariable() const {
1028  return integerVariable_;
1029  }
1031  inline char integerType(int i) const {
1032  assert (integerInfo_);
1033  assert (integerInfo_[i] == 0 || integerInfo_[i] == 1);
1034  return integerInfo_[i];
1035  }
1037  inline const char * integerType() const {
1038  return integerInfo_;
1039  }
1040 
1042  inline const double * getColLower() const {
1043  return solver_->getColLower();
1044  }
1045 
1047  inline const double * getColUpper() const {
1048  return solver_->getColUpper();
1049  }
1050 
1060  inline const char * getRowSense() const {
1061  return solver_->getRowSense();
1062  }
1063 
1072  inline const double * getRightHandSide() const {
1073  return solver_->getRightHandSide();
1074  }
1075 
1084  inline const double * getRowRange() const {
1085  return solver_->getRowRange();
1086  }
1087 
1089  inline const double * getRowLower() const {
1090  return solver_->getRowLower();
1091  }
1092 
1094  inline const double * getRowUpper() const {
1095  return solver_->getRowUpper();
1096  }
1097 
1099  inline const double * getObjCoefficients() const {
1100  return solver_->getObjCoefficients();
1101  }
1102 
1104  inline double getObjSense() const {
1105  //assert (dblParam_[CbcOptimizationDirection]== solver_->getObjSense());
1107  }
1108 
1110  inline bool isContinuous(int colIndex) const {
1111  return solver_->isContinuous(colIndex);
1112  }
1113 
1115  inline bool isBinary(int colIndex) const {
1116  return solver_->isBinary(colIndex);
1117  }
1118 
1123  inline bool isInteger(int colIndex) const {
1124  return solver_->isInteger(colIndex);
1125  }
1126 
1128  inline bool isIntegerNonBinary(int colIndex) const {
1129  return solver_->isIntegerNonBinary(colIndex);
1130  }
1131 
1133  inline bool isFreeBinary(int colIndex) const {
1134  return solver_->isFreeBinary(colIndex) ;
1135  }
1136 
1138  inline const CoinPackedMatrix * getMatrixByRow() const {
1139  return solver_->getMatrixByRow();
1140  }
1141 
1143  inline const CoinPackedMatrix * getMatrixByCol() const {
1144  return solver_->getMatrixByCol();
1145  }
1146 
1148  inline double getInfinity() const {
1149  return solver_->getInfinity();
1150  }
1152  inline const double * getCbcColLower() const {
1153  return cbcColLower_;
1154  }
1156  inline const double * getCbcColUpper() const {
1157  return cbcColUpper_;
1158  }
1160  inline const double * getCbcRowLower() const {
1161  return cbcRowLower_;
1162  }
1164  inline const double * getCbcRowUpper() const {
1165  return cbcRowUpper_;
1166  }
1168  inline const double * getCbcColSolution() const {
1169  return cbcColSolution_;
1170  }
1172  inline const double * getCbcRowPrice() const {
1173  return cbcRowPrice_;
1174  }
1176  inline const double * getCbcReducedCost() const {
1177  return cbcReducedCost_;
1178  }
1180  inline const double * getCbcRowActivity() const {
1181  return cbcRowActivity_;
1182  }
1184 
1185 
1188  inline double * continuousSolution() const {
1190  return continuousSolution_;
1191  }
1196  inline int * usedInSolution() const {
1197  return usedInSolution_;
1198  }
1200  void incrementUsed(const double * solution);
1202  void setBestSolution(CBC_Message how,
1203  double & objectiveValue, const double *solution,
1204  int fixVariables = 0);
1206  void setBestObjectiveValue( double objectiveValue);
1209  double objValue,
1210  const double * solution);
1211 
1219  virtual double checkSolution(double cutoff, double * solution,
1220  int fixVariables, double originalObjValue);
1227  bool feasibleSolution(int & numberIntegerInfeasibilities,
1228  int & numberObjectInfeasibilities) const;
1229 
1235  inline double * currentSolution() const {
1236  return currentSolution_;
1237  }
1241  inline const double * testSolution() const {
1242  return testSolution_;
1243  }
1244  inline void setTestSolution(const double * solution) {
1245  testSolution_ = solution;
1246  }
1248  void reserveCurrentSolution(const double * solution = NULL);
1249 
1251  inline const double * getColSolution() const {
1252  return solver_->getColSolution();
1253  }
1254 
1256  inline const double * getRowPrice() const {
1257  return solver_->getRowPrice();
1258  }
1259 
1261  inline const double * getReducedCost() const {
1262  return solver_->getReducedCost();
1263  }
1264 
1266  inline const double * getRowActivity() const {
1267  return solver_->getRowActivity();
1268  }
1269 
1271  inline double getCurrentObjValue() const {
1273  }
1275  inline double getCurrentMinimizationObjValue() const {
1277  }
1278 
1280  inline double getMinimizationObjValue() const {
1281  return bestObjective_;
1282  }
1284  inline void setMinimizationObjValue(double value) {
1285  bestObjective_ = value;
1286  }
1287 
1289  inline double getObjValue() const {
1290  return bestObjective_ * solver_->getObjSense() ;
1291  }
1297  double getBestPossibleObjValue() const;
1299  inline void setObjValue(double value) {
1300  bestObjective_ = value * solver_->getObjSense() ;
1301  }
1303  inline double getSolverObjValue() const {
1304  return solver_->getObjValue() * solver_->getObjSense() ;
1305  }
1306 
1313  inline double * bestSolution() const {
1314  return bestSolution_;
1315  }
1322  void setBestSolution(const double * solution, int numberColumns,
1323  double objectiveValue, bool check = false);
1324 
1326  inline int getSolutionCount() const {
1327  return numberSolutions_;
1328  }
1329 
1331  inline void setSolutionCount(int value) {
1332  numberSolutions_ = value;
1333  }
1335  int numberSavedSolutions() const;
1337  inline int maximumSavedSolutions() const {
1338  return maximumSavedSolutions_;
1339  }
1341  void setMaximumSavedSolutions(int value);
1343  const double * savedSolution(int which) const;
1345  double savedSolutionObjective(int which) const;
1347  void deleteSavedSolution(int which);
1348 
1357  inline int phase() const {
1358  return phase_;
1359  }
1360 
1362  inline int getNumberHeuristicSolutions() const {
1364  }
1366  inline void setNumberHeuristicSolutions(int value) {
1367  numberHeuristicSolutions_ = value;
1368  }
1369 
1371  inline void setObjSense(double s) {
1373  solver_->setObjSense(s);
1374  }
1375 
1377  inline double getContinuousObjective() const {
1379  }
1380  inline void setContinuousObjective(double value) {
1382  }
1384  inline int getContinuousInfeasibilities() const {
1386  }
1387  inline void setContinuousInfeasibilities(int value) {
1389  }
1391  inline double rootObjectiveAfterCuts() const {
1392  return continuousObjective_;
1393  }
1395  inline double sumChangeObjective() const {
1396  return sumChangeObjective1_;
1397  }
1400  inline int numberGlobalViolations() const {
1401  return numberGlobalViolations_;
1402  }
1405  }
1407  inline bool resolveAfterTakeOffCuts() const {
1408  return resolveAfterTakeOffCuts_;
1409  }
1410  inline void setResolveAfterTakeOffCuts(bool yesNo) {
1411  resolveAfterTakeOffCuts_ = yesNo;
1412  }
1414  inline int maximumRows() const {
1415  return maximumRows_;
1416  }
1419  return workingBasis_;
1420  }
1422  inline int getStopNumberIterations() const {
1423  return stopNumberIterations_;
1424  }
1426  inline void setStopNumberIterations(int value) {
1427  stopNumberIterations_ = value;
1428  }
1430  inline CbcModel * heuristicModel() const
1431  { return heuristicModel_;}
1433  inline void setHeuristicModel(CbcModel * model)
1434  { heuristicModel_ = model;}
1436 
1439  // Comparison functions (which may be overridden by inheritance)
1440  inline CbcCompareBase * nodeComparison() const {
1441  return nodeCompare_;
1442  }
1443  void setNodeComparison(CbcCompareBase * compare);
1444  void setNodeComparison(CbcCompareBase & compare);
1446 
1449  // Feasibility functions (which may be overridden by inheritance)
1451  return problemFeasibility_;
1452  }
1453  void setProblemFeasibility(CbcFeasibilityBase * feasibility);
1454  void setProblemFeasibility(CbcFeasibilityBase & feasibility);
1456 
1459  inline CbcTree * tree() const {
1461  return tree_;
1462  }
1464  void passInTreeHandler(CbcTree & tree);
1468  void passInSubTreeModel(CbcModel & model);
1473  CbcModel * subTreeModel(OsiSolverInterface * solver = NULL) const;
1475  inline int numberStoppedSubTrees() const {
1476  return numberStoppedSubTrees_;
1477  }
1479  inline void incrementSubTreeStopped() {
1481  }
1487  inline int typePresolve() const {
1488  return presolve_;
1489  }
1490  inline void setTypePresolve(int value) {
1491  presolve_ = value;
1492  }
1493 
1495 
1501 
1504  return branchingMethod_;
1505  }
1507  inline void setBranchingMethod(CbcBranchDecision * method) {
1508  delete branchingMethod_;
1509  branchingMethod_ = method->clone();
1510  }
1515  inline void setBranchingMethod(CbcBranchDecision & method) {
1516  delete branchingMethod_;
1517  branchingMethod_ = method.clone();
1518  }
1520  inline CbcCutModifier * cutModifier() const {
1521  return cutModifier_;
1522  }
1524  void setCutModifier(CbcCutModifier * modifier);
1529  void setCutModifier(CbcCutModifier & modifier);
1531 
1534 
1541  inline int stateOfSearch() const {
1542  return stateOfSearch_;
1543  }
1544  inline void setStateOfSearch(int state) {
1545  stateOfSearch_ = state;
1546  }
1548  inline int searchStrategy() const {
1549  return searchStrategy_;
1550  }
1552  inline void setSearchStrategy(int value) {
1553  searchStrategy_ = value;
1554  }
1556  inline int strongStrategy() const {
1557  return strongStrategy_;
1558  }
1560  inline void setStrongStrategy(int value) {
1561  strongStrategy_ = value;
1562  }
1563 
1565  inline int numberCutGenerators() const {
1566  return numberCutGenerators_;
1567  }
1569  inline CbcCutGenerator ** cutGenerators() const {
1570  return generator_;
1571  }
1573  inline CbcCutGenerator * cutGenerator(int i) const {
1574  return generator_[i];
1575  }
1577  inline CbcCutGenerator * virginCutGenerator(int i) const {
1578  return virginGenerator_[i];
1579  }
1588  void addCutGenerator(CglCutGenerator * generator,
1589  int howOften = 1, const char * name = NULL,
1590  bool normal = true, bool atSolution = false,
1591  bool infeasible = false, int howOftenInSub = -100,
1592  int whatDepth = -1, int whatDepthInSub = -1);
1594 
1599 
1601  inline CbcStrategy * strategy() const {
1602  return strategy_;
1603  }
1608  strategy_ = strategy;
1609  }
1611  inline CbcModel * parentModel() const {
1612  return parentModel_;
1613  }
1617  }
1619 
1620 
1627  void addHeuristic(CbcHeuristic * generator, const char *name = NULL,
1628  int before = -1);
1630  inline CbcHeuristic * heuristic(int i) const {
1631  return heuristic_[i];
1632  }
1634  inline int numberHeuristics() const {
1635  return numberHeuristics_;
1636  }
1638  inline void setNumberHeuristics(int value) {
1639  numberHeuristics_ = value;
1640  }
1642  inline CbcHeuristic * lastHeuristic() const {
1643  return lastHeuristic_;
1644  }
1646  inline void setLastHeuristic(CbcHeuristic * last) {
1647  lastHeuristic_ = last;
1648  }
1649 
1668  void passInPriorities(const int * priorities, bool ifNotSimpleIntegers);
1669 
1671  inline int priority(int sequence) const {
1672  return object_[sequence]->priority();
1673  }
1674 
1679  void passInEventHandler(const CbcEventHandler *eventHandler) ;
1680 
1683  return (eventHandler_) ;
1684  }
1685 
1687 
1697  void setApplicationData (void * appData);
1698 
1700  void * getApplicationData() const;
1715  inline const OsiBabSolver * solverCharacteristics() const {
1716  return solverCharacteristics_;
1717  }
1719 
1720  //---------------------------------------------------------------------------
1721 
1724  void passInMessageHandler(CoinMessageHandler * handler);
1727  void newLanguage(CoinMessages::Language language);
1728  inline void setLanguage(CoinMessages::Language language) {
1729  newLanguage(language);
1730  }
1733  return handler_;
1734  }
1736  inline CoinMessages & messages() {
1737  return messages_;
1738  }
1741  return &messages_;
1742  }
1744  void setLogLevel(int value);
1746  inline int logLevel() const {
1747  return handler_->logLevel();
1748  }
1754  inline void setDefaultHandler(bool yesNo) {
1755  defaultHandler_ = yesNo;
1756  }
1758  inline bool defaultHandler() const {
1759  return defaultHandler_;
1760  }
1762  //---------------------------------------------------------------------------
1764 
1765 
1793  inline void setSpecialOptions(int value) {
1794  specialOptions_ = value;
1795  }
1797  inline int specialOptions() const {
1798  return specialOptions_;
1799  }
1801  inline void setRandomSeed(int value) {
1802  randomSeed_ = value;
1803  }
1805  inline int getRandomSeed() const {
1806  return randomSeed_;
1807  }
1809  inline void setMultipleRootTries(int value) {
1810  multipleRootTries_ = value;
1811  }
1813  inline int getMultipleRootTries() const {
1814  return multipleRootTries_;
1815  }
1817  inline void sayEventHappened()
1818  { eventHappened_=true;}
1820  inline bool normalSolver() const {
1821  return (specialOptions_&16) == 0;
1822  }
1827  inline bool waitingForMiniBranchAndBound() const {
1828  return (specialOptions_&1048576) != 0;
1829  }
1853  inline void setMoreSpecialOptions(int value) {
1854  moreSpecialOptions_ = value;
1855  }
1857  inline int moreSpecialOptions() const {
1858  return moreSpecialOptions_;
1859  }
1874  inline void setMoreSpecialOptions2(int value) {
1875  moreSpecialOptions2_ = value;
1876  }
1878  inline int moreSpecialOptions2() const {
1879  return moreSpecialOptions2_;
1880  }
1882  inline void setCutoffAsConstraint(bool yesNo) {
1883  cutoffRowNumber_ = (yesNo) ? -2 : -1;
1884  }
1886  inline void setUseElapsedTime(bool yesNo) {
1887  if (yesNo)
1888  moreSpecialOptions_ |= 131072;
1889  else
1890  moreSpecialOptions_ &= ~131072;
1891  }
1893  inline bool useElapsedTime() const {
1894  return (moreSpecialOptions_&131072)!=0;
1895  }
1897  inline void * temporaryPointer() const
1898  { return temporaryPointer_;}
1900  inline void setTemporaryPointer(void * pointer)
1901  { temporaryPointer_=pointer;}
1903  void goToDantzig(int numberNodes, ClpDualRowPivot *& savePivotMethod);
1905  inline bool ownObjects() const {
1906  return ownObjects_;
1907  }
1909  void checkModel();
1911  //---------------------------------------------------------------------------
1912 
1914 
1915  CbcModel();
1917 
1919  CbcModel(const OsiSolverInterface &);
1920 
1929  void assignSolver(OsiSolverInterface *&solver, bool deleteSolver = true);
1930 
1942  inline void setModelOwnsSolver (bool ourSolver) {
1943  ownership_ = ourSolver ? (ownership_ | 0x80000000) : (ownership_ & (~0x80000000)) ;
1944  }
1945 
1951  inline bool modelOwnsSolver () {
1952  return ((ownership_&0x80000000) != 0) ;
1953  }
1954 
1958  CbcModel(const CbcModel & rhs, bool cloneHandler = false);
1959 
1961  virtual CbcModel *clone (bool cloneHandler);
1962 
1964  CbcModel & operator=(const CbcModel& rhs);
1965 
1967  virtual ~CbcModel ();
1968 
1970  inline OsiSolverInterface * solver() const {
1971  return solver_;
1972  }
1973 
1976  OsiSolverInterface * returnSolver = solver_;
1977  solver_ = solver;
1978  return returnSolver;
1979  }
1980 
1983  return continuousSolver_;
1984  }
1985 
1987  inline void createContinuousSolver() {
1989  }
1991  inline void clearContinuousSolver() {
1992  delete continuousSolver_;
1993  continuousSolver_ = NULL;
1994  }
1995 
1998  return referenceSolver_;
1999  }
2000 
2002  void saveReferenceSolver();
2003 
2009  void resetToReferenceSolver();
2010 
2012  void gutsOfDestructor();
2015  void gutsOfDestructor2();
2018  void resetModel();
2024  void gutsOfCopy(const CbcModel & rhs, int mode = 0);
2026  void moveInfo(const CbcModel & rhs);
2028 
2030 
2031  static bool haveMultiThreadSupport();
2035  return masterThread_;
2036  }
2038  CbcNodeInfo ** walkback() const {
2039  return walkback_;
2040  }
2042  inline int getNumberThreads() const {
2043  return numberThreads_;
2044  }
2046  inline void setNumberThreads(int value) {
2047  numberThreads_ = value;
2048  }
2050  inline int getThreadMode() const {
2051  return threadMode_;
2052  }
2062  inline void setThreadMode(int value) {
2063  threadMode_ = value;
2064  }
2071  inline int parallelMode() const {
2072  if (!numberThreads_) {
2073  if ((threadMode_&1) == 0)
2074  return 0;
2075  else
2076  return -1;
2077  return 0;
2078  } else {
2079  if ((threadMode_&1) == 0)
2080  return 1;
2081  else
2082  return -2;
2083  }
2084  }
2086  inline CbcBaseModel * master() const
2087  { return master_;}
2090  bool isLocked() const;
2091 #ifdef CBC_THREAD
2092 
2096  void lockThread();
2100  void unlockThread();
2101 #else
2102  inline void lockThread() {}
2103  inline void unlockThread() {}
2104 #endif
2105 
2112  void setInfoInChild(int type, CbcThread * info);
2119  void moveToModel(CbcModel * baseModel, int mode);
2121  int splitModel(int numberModels, CbcModel ** model,
2122  int numberNodes);
2124  void startSplitModel(int numberIterations);
2126  void mergeModels(int numberModel, CbcModel ** model,
2127  int numberNodes);
2129 
2131 
2132  int getNodeCount2() const {
2134  return numberNodes2_;
2135  }
2137  void setPointers(const OsiSolverInterface * solver);
2143  int reducedCostFix() ;
2147  void synchronizeHandlers(int makeDefault);
2149  void saveExtraSolution(const double * solution, double objectiveValue);
2151  void saveBestSolution(const double * solution, double objectiveValue);
2153  void deleteSolutions();
2156 #ifdef CLP_RESOLVE
2157  int resolveClp(OsiClpSolverInterface * solver, int type);
2159 #endif
2160 
2164  int chooseBranch(CbcNode * & newNode, int numberPassesLeft,
2165  CbcNode * oldNode, OsiCuts & cuts,
2166  bool & resolved, CoinWarmStartBasis *lastws,
2167  const double * lowerBefore, const double * upperBefore,
2168  OsiSolverBranch * & branches);
2169  int chooseBranch(CbcNode * newNode, int numberPassesLeft, bool & resolved);
2170 
2177  CoinWarmStartBasis *getEmptyBasis(int ns = 0, int na = 0) const ;
2178 
2190  int takeOffCuts(OsiCuts &cuts,
2191  bool allowResolve, OsiCuts * saveCuts,
2192  int numberNewCuts = 0, const OsiRowCut ** newCuts = NULL) ;
2193 
2206  int addCuts(CbcNode * node, CoinWarmStartBasis *&lastws);
2207 
2224  bool addCuts1(CbcNode * node, CoinWarmStartBasis *&lastws);
2228  void previousBounds (CbcNode * node, CbcNodeInfo * where, int iColumn,
2229  double & lower, double & upper, int force);
2234  void setObjectiveValue(CbcNode * thisNode, const CbcNode * parentNode) const;
2235 
2239  void convertToDynamic();
2241  void synchronizeNumberBeforeTrust(int type = 0);
2243  void zapIntegerInformation(bool leaveObjects = true);
2245  int cliquePseudoCosts(int doStatistics);
2247  void pseudoShadow(int type);
2254  void fillPseudoCosts(double * downCosts, double * upCosts,
2255  int * priority = NULL,
2256  int * numberDown = NULL, int * numberUp = NULL,
2257  int * numberDownInfeasible = NULL,
2258  int * numberUpInfeasible = NULL) const;
2264  void doHeuristicsAtRoot(int deleteHeuristicsAfterwards = 0);
2266  void adjustHeuristics();
2268  inline const double * hotstartSolution() const {
2269  return hotstartSolution_;
2270  }
2272  inline const int * hotstartPriorities() const {
2273  return hotstartPriorities_;
2274  }
2275 
2277  inline CbcCountRowCut ** addedCuts() const {
2278  return addedCuts_;
2279  }
2281  inline int currentNumberCuts() const {
2282  return currentNumberCuts_;
2283  }
2285  inline CbcRowCuts * globalCuts() {
2286  return &globalCuts_;
2287  }
2289  inline void zapGlobalCuts() {
2290  globalCuts_ = CbcRowCuts();
2291  }
2293  void setNextRowCut(const OsiRowCut & cut);
2295  inline CbcNode * currentNode() const {
2296  return currentNode_;
2297  }
2299  inline CglTreeProbingInfo * probingInfo() const {
2300  return probingInfo_;
2301  }
2304  return &randomNumberGenerator_;
2305  }
2307  inline void setNumberStrongIterations(int number) {
2308  numberStrongIterations_ = number;
2309  }
2311  inline int numberStrongIterations() const {
2312  return numberStrongIterations_;
2313  }
2315  inline int maximumNumberIterations() const {
2316  return maximumNumberIterations_;
2317  }
2319  inline void setMaximumNumberIterations(int value) {
2320  maximumNumberIterations_ = value;
2321  }
2323  inline CbcSymmetry * symmetryInfo() const
2324  { return symmetryInfo_;}
2326  inline void setFastNodeDepth(int value) {
2327  fastNodeDepth_ = value;
2328  }
2330  inline int fastNodeDepth() const {
2331  return fastNodeDepth_;
2332  }
2334  inline int continuousPriority() const {
2335  return continuousPriority_;
2336  }
2338  inline void setContinuousPriority(int value) {
2339  continuousPriority_ = value;
2340  }
2341  inline void incrementExtra(int nodes, int iterations, int fathoms=1) {
2342  numberExtraNodes_ += nodes;
2343  numberExtraIterations_ += iterations;
2344  numberFathoms_ += fathoms;
2345  }
2347  inline void zeroExtra() {
2348  numberExtraNodes_ = 0;
2350  numberFathoms_ = 0;
2351  }
2353  inline int numberExtraIterations() const {
2354  return numberExtraIterations_;
2355  }
2357  void incrementStrongInfo(int numberTimes, int numberIterations,
2358  int numberFixed, bool ifInfeasible);
2360  inline const int * strongInfo() const {
2361  return strongInfo_;
2362  }
2363 
2365  inline int * mutableStrongInfo() {
2366  return strongInfo_;
2367  }
2370  return storedRowCuts_;
2371  }
2374  storedRowCuts_ = cuts;
2375  }
2377  inline bool allDynamic () const {
2378  return ((ownership_&0x40000000) != 0) ;
2379  }
2381  void generateCpp( FILE * fp, int options);
2390  inline void setBestSolutionBasis(const CoinWarmStartBasis & bestSolutionBasis) {
2391  bestSolutionBasis_ = bestSolutionBasis;
2392  }
2394  void redoWalkBack();
2396 
2397  void setMIPStart( const std::vector< std::pair< std::string, double > > &mips ) {
2398  this->mipStart_ = mips;
2399  }
2400 
2401  const std::vector< std::pair< std::string, double > > &getMIPStart() {
2402  return this->mipStart_;
2403  }
2404 
2405 
2406 //---------------------------------------------------------------------------
2407 
2408 private:
2410 
2411 
2414 
2420  unsigned int ownership_ ;
2421 
2424 
2427 
2430 
2437 
2440 
2443 
2446 
2456 
2465 
2467  double * bestSolution_;
2469  double ** savedSolutions_;
2470 
2479  mutable const double * testSolution_;
2483  std::vector< std::pair< std::string, double > > mipStart_;
2495 
2530  int status_;
2562  int phase_;
2563 
2566 
2584 
2593 
2598 
2601 
2694  const double * cbcColLower_;
2697  const double * cbcColUpper_;
2699  const double * cbcRowLower_;
2701  const double * cbcRowUpper_;
2703  const double * cbcColSolution_;
2705  const double * cbcRowPrice_;
2707  const double * cbcReducedCost_;
2709  const double * cbcRowActivity_;
2711  void * appData_;
2752  // Cut generators
2754  // Cut generators before any changes
2765 # ifdef CBC_ONLY_CLP
2767 # else
2769 # endif
2774 
2788 
2852  mutable bool eventHappened_;
2877  int strongInfo_[7];
2922 };
2924 void getIntegerInformation(const OsiObject * object, double & originalLower,
2925  double & originalUpper) ;
2926 // So we can call from other programs
2927 // Real main program
2928 class OsiClpSolverInterface;
2929 int CbcMain (int argc, const char *argv[], OsiClpSolverInterface & solver, CbcModel ** babSolver);
2930 int CbcMain (int argc, const char *argv[], CbcModel & babSolver);
2931 // four ways of calling
2932 int callCbc(const char * input2, OsiClpSolverInterface& solver1);
2933 int callCbc(const char * input2);
2934 int callCbc(const std::string input2, OsiClpSolverInterface& solver1);
2935 int callCbc(const std::string input2) ;
2936 // When we want to load up CbcModel with options first
2937 void CbcMain0 (CbcModel & babSolver);
2938 int CbcMain1 (int argc, const char *argv[], CbcModel & babSolver);
2939 // two ways of calling
2940 int callCbc(const char * input2, CbcModel & babSolver);
2941 int callCbc(const std::string input2, CbcModel & babSolver);
2942 // And when CbcMain0 already called to initialize
2943 int callCbc1(const char * input2, CbcModel & babSolver);
2944 int callCbc1(const std::string input2, CbcModel & babSolver);
2945 // And when CbcMain0 already called to initialize (with call back) (see CbcMain1 for whereFrom)
2946 int callCbc1(const char * input2, CbcModel & babSolver, int (CbcModel * currentSolver, int whereFrom));
2947 int callCbc1(const std::string input2, CbcModel & babSolver, int (CbcModel * currentSolver, int whereFrom));
2948 int CbcMain1 (int argc, const char *argv[], CbcModel & babSolver, int (CbcModel * currentSolver, int whereFrom));
2949 // For uniform setting of cut and heuristic options
2950 void setCutAndHeuristicOptions(CbcModel & model);
2951 #endif
2952 
void flipModel()
Flip direction of optimization on all models.
CbcThread * masterThread() const
Get pointer to masterthread.
Definition: CbcModel.hpp:2034
void passInSolverCharacteristics(OsiBabSolver *solverCharacteristics)
For advanced applications you may wish to modify the behavior of Cbc e.g.
const double * testSolution() const
For testing infeasibilities - will point to currentSolution_ or solver–&gt;getColSolution() ...
Definition: CbcModel.hpp:1241
CbcNodeInfo ** walkback_
Array used to assemble the path between a node and the search tree root.
Definition: CbcModel.hpp:2577
const double * cbcColUpper_
Pointer to array[getNumCols()] (for speed) of column upper bounds.
Definition: CbcModel.hpp:2697
int status_
Status of problem - 0 finished, 1 stopped, 2 difficulties.
Definition: CbcModel.hpp:2530
void setProblemFeasibility(CbcFeasibilityBase *feasibility)
CglTreeProbingInfo * probingInfo_
Probing info.
Definition: CbcModel.hpp:2844
The objective is assumed to worsen by this amount for each integer infeasibility. ...
Definition: CbcModel.hpp:137
CbcObjectUpdateData * updateItems_
Update items.
Definition: CbcModel.hpp:2896
void resetToReferenceSolver()
Uses a copy of reference solver to be current solver.
int numberExtraNodes_
Number of extra nodes in fast lp.
Definition: CbcModel.hpp:2799
Number of branches (may be more than number of nodes as may include strong branching) ...
Definition: CbcModel.hpp:126
void newLanguage(CoinMessages::Language language)
Set language.
virtual const double * getRowActivity() const =0
Get a pointer to array[getNumRows()] of row activity levels.
CbcNodeInfo ** lastNodeInfo_
Definition: CbcModel.hpp:2578
CbcHeuristic * lastHeuristic() const
Pointer to heuristic solver which found last solution (or NULL)
Definition: CbcModel.hpp:1642
CbcModel * integerPresolve(bool weak=false)
Do integer presolve, creating a new (presolved) model.
void setPointers(const OsiSolverInterface *solver)
Set pointers for speed.
double * currentSolution_
Array holding the current solution.
Definition: CbcModel.hpp:2475
char * integerInfo_
Whether of not integer.
Definition: CbcModel.hpp:2605
const double * getRightHandSide() const
Get pointer to array[getNumRows()] of rows right-hand sides.
Definition: CbcModel.hpp:1072
void setHowOftenGlobalScan(int number)
Set how often to scan global cuts.
Current objective value.
Definition: CbcModel.hpp:163
int strongStrategy_
Strategy for strong branching 0 - normal when to do all fractional 1 - root node 2 - depth less than ...
Definition: CbcModel.hpp:2872
CbcNode * currentNode_
Current node so can be used elsewhere.
Definition: CbcModel.hpp:2600
void setLastHeuristic(CbcHeuristic *last)
set last heuristic which found a solution
Definition: CbcModel.hpp:1646
int parallelCuts(CbcBaseModel *master, OsiCuts &cuts, CbcNode *node, OsiCuts &slackCuts, int lastNumberCuts)
Generate one round of cuts - parallel mode returns - 0 - normal 1 - must keep going 2 - set numberTri...
Event handling for cbc.
CbcBranchDecision * branchingMethod() const
Get the current branching decision method.
Definition: CbcModel.hpp:1503
virtual OsiSolverInterface * clone(bool copyData=true) const =0
Clone.
double getSolverObjValue() const
Get solver objective function value (as minimization)
Definition: CbcModel.hpp:1303
int * usedInSolution() const
Array marked whenever a solution is found if non-zero.
Definition: CbcModel.hpp:1196
void setOptionalInteger(int index)
int numberSavedSolutions_
Number of saved solutions.
Definition: CbcModel.hpp:2501
int numberSolutions_
Number of solutions.
Definition: CbcModel.hpp:2499
int moreSpecialOptions() const
Get more special options.
Definition: CbcModel.hpp:1857
double numberDJFixed_
Number of reduced cost fixings.
Definition: CbcModel.hpp:2842
void * getApplicationData() const
Get application data.
int preferredWay_
Preferred way of branching.
Definition: CbcModel.hpp:2816
void setRandomSeed(int value)
Set random seed.
Definition: CbcModel.hpp:1801
bool setAllowableFractionGap(double value)
Set the fraction allowable gap between the best known solution and the best possible solution...
Definition: CbcModel.hpp:668
const std::vector< std::pair< std::string, double > > & getMIPStart()
Definition: CbcModel.hpp:2401
const double * cbcRowLower_
Pointer to array[getNumRows()] (for speed) of row lower bounds.
Definition: CbcModel.hpp:2699
bool isInitialSolveProvenOptimal() const
Is optimality proven (for initialSolve) ?
int cutoffRowNumber_
-1 - cutoff as constraint not activated -2 - waiting to activate &gt;=0 - activated
Definition: CbcModel.hpp:2551
int stateOfSearch_
State of search 0 - no solution 1 - only heuristic solutions 2 - branched to a solution 3 - no soluti...
Definition: CbcModel.hpp:2510
const double * getRowRange() const
Get pointer to array[getNumRows()] of row ranges.
Definition: CbcModel.hpp:1084
int getPrintingMode() const
Get the printing mode.
Definition: CbcModel.hpp:600
void incrementStrongInfo(int numberTimes, int numberIterations, int numberFixed, bool ifInfeasible)
Increment strong info.
int CbcMain(int argc, const char *argv[], OsiClpSolverInterface &solver, CbcModel **babSolver)
CbcCountRowCut ** addedCuts_
The list of cuts initially collected for this subproblem.
Definition: CbcModel.hpp:2592
void setCutoffAsConstraint(bool yesNo)
Set cutoff as constraint.
Definition: CbcModel.hpp:1882
CbcSymmetry * symmetryInfo_
Symmetry information.
Definition: CbcModel.hpp:2771
bool resolveAfterTakeOffCuts_
Whether to force a resolve after takeOffCuts.
Definition: CbcModel.hpp:2886
CbcModel & operator=(const CbcModel &rhs)
Assignment operator.
double sumChangeObjective2_
Sum of Changes to objective by subsequent solves.
Definition: CbcModel.hpp:2464
const double * getObjCoefficients() const
Get pointer to array[getNumCols()] of objective function coefficients.
Definition: CbcModel.hpp:1099
bool isAbandoned() const
Are there a numerical difficulties?
The maximum number of nodes before terminating.
Definition: CbcModel.hpp:107
bool isNodeLimitReached() const
Node limit reached?
int priority() const
Return Priority - note 1 is highest priority.
int * whichGenerator_
Which cut generator generated this cut.
Definition: CbcModel.hpp:2834
int maximumRows_
Maximum number of rows.
Definition: CbcModel.hpp:2822
const char * integerType() const
Whether or not integer.
Definition: CbcModel.hpp:1037
CbcModel * heuristicModel() const
A pointer to model from CbcHeuristic.
Definition: CbcModel.hpp:1430
void setFastNodeDepth(int value)
Set depth for fast nodes.
Definition: CbcModel.hpp:2326
CbcCompareBase * nodeCompare_
User node comparison function.
Definition: CbcModel.hpp:2668
void setNumberStrongIterations(int number)
Set the number of iterations done in strong branching.
Definition: CbcModel.hpp:2307
int getThreadMode() const
Get thread mode.
Definition: CbcModel.hpp:2050
int numberObjects() const
Get the number of objects.
Definition: CbcModel.hpp:463
bool isSolutionLimitReached() const
Solution limit reached?
bool setHeuristicFractionGap(double value)
Set the fraction heuristic gap between the best known solution and the best possible solution...
Definition: CbcModel.hpp:705
CoinBigIndex getNumElements() const
Get number of nonzero elements.
Definition: CbcModel.hpp:1018
int moreSpecialOptions2() const
Get more special options2.
Definition: CbcModel.hpp:1878
bool isIntegerNonBinary(int colIndex) const
Return true if variable is general integer.
Definition: CbcModel.hpp:1128
int maximumNumberUpdateItems_
Maximum number of outstanding update information items.
Definition: CbcModel.hpp:2894
void setStrongStrategy(int value)
Set strong branching strategy.
Definition: CbcModel.hpp:1560
int * lastNumberCuts_
Definition: CbcModel.hpp:2583
int numberGlobalCutsIn_
Number of global cuts on entry to a node.
Definition: CbcModel.hpp:2916
int * mutableStrongInfo()
Return mutable strong info.
Definition: CbcModel.hpp:2365
virtual bool isIntegerNonBinary(int colIndex) const
Return true if the variable is general integer.
virtual CbcModel * clone(bool cloneHandler)
Clone.
const double * getCbcColUpper() const
Get pointer to array[getNumCols()] (for speed) of column upper bounds.
Definition: CbcModel.hpp:1156
virtual const char * getRowSense() const =0
Get a pointer to an array[getNumRows()] of row constraint senses.
void setHeuristicModel(CbcModel *model)
Set a pointer to model from CbcHeuristic.
Definition: CbcModel.hpp:1433
void setCurrentPassNumber(int value)
Set current cut pass number in this round of cuts.
Definition: CbcModel.hpp:772
bool isBinary(int colIndex) const
Return true if variable is binary.
Definition: CbcModel.hpp:1115
void setResolveAfterTakeOffCuts(bool yesNo)
Definition: CbcModel.hpp:1410
int getIterationCount() const
Get how many iterations it took to solve the problem.
Definition: CbcModel.hpp:922
void * temporaryPointer_
Useful temporary pointer.
Definition: CbcModel.hpp:2738
int numberHeuristics() const
Get the number of heuristics.
Definition: CbcModel.hpp:1634
int secondaryStatus() const
Secondary status of problem -1 unset (status_ will also be -1) 0 search completed with solution 1 lin...
Definition: CbcModel.hpp:972
void incrementNodeCount(int value)
Increment how many nodes it took to solve the problem.
Definition: CbcModel.hpp:934
void setContinuousPriority(int value)
Set anything with priority &gt;= this can be treated as continuous.
Definition: CbcModel.hpp:2338
void resizeWhichGenerator(int numberNow, int numberAfter)
Update size of whichGenerator.
int maximumRows() const
Maximum number of rows.
Definition: CbcModel.hpp:1414
double rootObjectiveAfterCuts() const
Value of objective after root node cuts added.
Definition: CbcModel.hpp:1391
int getContinuousInfeasibilities() const
Number of infeasibilities at continuous.
Definition: CbcModel.hpp:1384
int callCbc(const char *input2, OsiClpSolverInterface &solver1)
CbcEventHandler * getEventHandler() const
Retrieve a pointer to the event handler.
Definition: CbcModel.hpp:1682
void lockThread()
Definition: CbcModel.hpp:2102
const double * getReducedCost() const
Get a pointer to array[getNumCols()] of reduced costs.
Definition: CbcModel.hpp:1261
int getNumberHeuristicSolutions() const
Get number of heuristic solutions.
Definition: CbcModel.hpp:1362
Stored Cut Generator Class.
Definition: CglStored.hpp:16
Just a marker, so that a static sized array can store parameters.
Definition: CbcModel.hpp:194
const double * getCbcReducedCost() const
Get a pointer to array[getNumCols()] (for speed) of reduced costs.
Definition: CbcModel.hpp:1176
int serialCuts(OsiCuts &cuts, CbcNode *node, OsiCuts &slackCuts, int lastNumberCuts)
Generate one round of cuts - serial mode returns - 0 - normal 1 - must keep going 2 - set numberTries...
bool setInfeasibilityWeight(double value)
Set the weight per integer infeasibility .
Definition: CbcModel.hpp:641
OsiSolverInterface * solver_
The solver associated with this model.
Definition: CbcModel.hpp:2413
void reserveCurrentSolution(const double *solution=NULL)
Make sure region there and optionally copy solution.
int getMultipleRootTries() const
Get multiple root tries.
Definition: CbcModel.hpp:1813
int numberRowsAtContinuous() const
Number of rows in continuous (root) problem.
Definition: CbcModel.hpp:1003
double * bestSolution_
Array holding the incumbent (best) solution.
Definition: CbcModel.hpp:2467
bool setIntegerTolerance(double value)
Set the integrality tolerance .
Definition: CbcModel.hpp:627
int * integerVariable_
Indices of integer variables.
Definition: CbcModel.hpp:2603
int logLevel() const
Get log level.
Definition: CbcModel.hpp:1746
CbcModel * parentModel_
Parent model.
Definition: CbcModel.hpp:2688
int searchStrategy() const
Strategy worked out - mainly at root node for use by CbcNode.
Definition: CbcModel.hpp:1548
CoinMessageHandler * handler_
Message handler.
Definition: CbcModel.hpp:2429
const double * hotstartSolution() const
Get the hotstart solution.
Definition: CbcModel.hpp:2268
bool addCuts1(CbcNode *node, CoinWarmStartBasis *&lastws)
Traverse the tree from node to root and prep the model.
bool setMaximumSolutions(int value)
Set the maximum number of solutions desired.
Definition: CbcModel.hpp:584
int specialOptions_
Special options 0 bit (1) - check if cuts valid (if on debugger list) 1 bit (2) - use current basis t...
Definition: CbcModel.hpp:2637
bool isFreeBinary(int colIndex) const
Return true if variable is binary and not fixed at either bound.
Definition: CbcModel.hpp:1133
bool canStopOnGap() const
See if can stop on gap.
double minimumDrop_
Minimum degradation in objective value to continue cut generation.
Definition: CbcModel.hpp:2497
Cutoff - stored for speed.
Definition: CbcModel.hpp:159
bool isProvenOptimal() const
Is optimality proven?
CbcCutGenerator ** generator_
Definition: CbcModel.hpp:2753
int numberLongStrong_
Number of long strong goes.
Definition: CbcModel.hpp:2854
virtual const double * getRowPrice() const =0
Get pointer to array[getNumRows()] of dual variable values.
CbcNodeInfo ** walkback() const
Get pointer to walkback.
Definition: CbcModel.hpp:2038
int howOftenGlobalScan() const
Get how often to scan global cuts.
Definition: CbcModel.hpp:873
int fastNodeDepth_
Depth for fast nodes.
Definition: CbcModel.hpp:2763
bool integerPresolveThisModel(OsiSolverInterface *originalSolver, bool weak=false)
Do integer presolve, modifying the current model.
int numberSolves_
Cumulative number of solves.
Definition: CbcModel.hpp:2528
unsigned int ownership_
Ownership of objects and other stuff.
Definition: CbcModel.hpp:2420
const CbcFullNodeInfo * topOfTree() const
Pointer to top of tree.
Definition: CbcModel.hpp:835
CoinWarmStartBasis & workingBasis()
Work basis for temporary use.
Definition: CbcModel.hpp:1418
const double * cbcColLower_
Whether to automatically do presolve before branch and bound.
Definition: CbcModel.hpp:2695
CbcEventHandler * eventHandler_
Pointer to the event handler.
Definition: CbcModel.hpp:2768
virtual const CoinPackedMatrix * getMatrixByCol() const =0
Get a pointer to a column-wise copy of the matrix.
CbcCountRowCut ** addedCuts() const
Return the list of cuts initially collected for this subproblem.
Definition: CbcModel.hpp:2277
void setStoredRowCuts(CglStored *cuts)
Set stored row cuts for donor/recipient CbcModel.
Definition: CbcModel.hpp:2373
bool setDblParam(CbcDblParam key, double value)
Set a double parameter.
Definition: CbcModel.hpp:544
CbcHeuristic * lastHeuristic_
Pointer to heuristic solver which found last solution (or NULL)
Definition: CbcModel.hpp:2761
CbcHeuristic ** heuristic_
Heuristic solvers.
Definition: CbcModel.hpp:2759
void clearContinuousSolver()
Clear solver with continuous state.
Definition: CbcModel.hpp:1991
CoinMessages * messagesPointer()
Return pointer to messages.
Definition: CbcModel.hpp:1740
void makePartialCut(const OsiRowCut *cut, const OsiSolverInterface *solver=NULL)
Make partial cut into a global cut and save.
int getRandomSeed() const
Get random seed.
Definition: CbcModel.hpp:1805
void setNumberHeuristicSolutions(int value)
Set number of heuristic solutions.
Definition: CbcModel.hpp:1366
int getNodeCount2() const
Get how many Nodes it took to solve the problem.
Definition: CbcModel.hpp:2133
int numberInfeasibleNodes_
Number of nodes infeasible by normal branching (before cuts)
Definition: CbcModel.hpp:2740
Sum of non-zero changes on a branch.
Definition: CbcModel.hpp:188
int phase() const
Current phase (so heuristics etc etc can find out).
Definition: CbcModel.hpp:1357
int multipleRootTries_
Multiple root tries.
Definition: CbcModel.hpp:2826
bool modelOwnsSolver()
Get ownership of solver.
Definition: CbcModel.hpp:1951
int numberStrong_
Maximum number of candidates to consider for strong branching.
Definition: CbcModel.hpp:2717
int moreSpecialOptions2_
More more special options 0 bit (1) - find switching variables 1 bit (2) - using fake objective until...
Definition: CbcModel.hpp:2666
Collections of row cuts and column cuts.
Definition: OsiCuts.hpp:19
Column Cut Class.
Definition: OsiColCut.hpp:23
void setModelOwnsSolver(bool ourSolver)
Set ownership of solver.
Definition: CbcModel.hpp:1942
void setNumberAnalyzeIterations(int number)
Number of analyze iterations to do.
Definition: CbcModel.hpp:838
int currentNumberCuts() const
Number of entries in the list returned by addedCuts()
Definition: CbcModel.hpp:2281
void setThreadMode(int value)
Set thread mode always use numberThreads for branching 1 set then deterministic 2 set then use number...
Definition: CbcModel.hpp:2062
int takeOffCuts(OsiCuts &cuts, bool allowResolve, OsiCuts *saveCuts, int numberNewCuts=0, const OsiRowCut **newCuts=NULL)
Remove inactive cuts from the model.
double getCurrentObjValue() const
Get current objective function value.
Definition: CbcModel.hpp:1271
Clp Solver Interface.
void setNumberThreads(int value)
Set number of threads.
Definition: CbcModel.hpp:2046
int lastNumberCuts2_
Definition: CbcModel.hpp:2581
void saveReferenceSolver()
Save a copy of the current solver so can be reset to.
CbcStrategy * strategy_
Strategy.
Definition: CbcModel.hpp:2686
int strongStrategy() const
Stong branching strategy.
Definition: CbcModel.hpp:1556
const double * cbcRowPrice_
Pointer to array[getNumRows()] (for speed) of dual prices.
Definition: CbcModel.hpp:2705
void setPrintFrequency(int number)
Set the print frequency.
Definition: CbcModel.hpp:893
bool feasibleSolution(int &numberIntegerInfeasibilities, int &numberObjectInfeasibilities) const
Test the current solution for feasiblility.
bool normalSolver() const
Says if normal solver i.e. has well defined CoinPackedMatrix.
Definition: CbcModel.hpp:1820
virtual double checkSolution(double cutoff, double *solution, int fixVariables, double originalObjValue)
Call this to really test if a valid solution can be feasible Solution is number columns in size...
int currentDepth_
Current depth.
Definition: CbcModel.hpp:2828
void passInEventHandler(const CbcEventHandler *eventHandler)
Set an event handler.
void setNumberStrong(int number)
Set the maximum number of candidates to be evaluated for strong branching.
void setLanguage(CoinMessages::Language language)
Definition: CbcModel.hpp:1728
OsiRowCut * conflictCut(const OsiSolverInterface *solver, bool &localCuts)
Create conflict cut (well - most of)
void passInTreeHandler(CbcTree &tree)
For modifying tree handling (original is cloned)
void incrementUsed(const double *solution)
Increases usedInSolution for nonzeros.
double savedSolutionObjective(int which) const
Return a saved solution objective (0==best) - COIN_DBL_MAX if off end.
int numberNewCuts_
Number of new cuts.
Definition: CbcModel.hpp:2858
void unlockThread()
Definition: CbcModel.hpp:2103
The default COIN simplex (basis-oriented) warm start class.
bool defaultHandler() const
Check default handler.
Definition: CbcModel.hpp:1758
void convertToDynamic()
If numberBeforeTrust &gt;0 then we are going to use CbcBranchDynamic.
OsiObject ** object_
Integer and Clique and ...
Definition: CbcModel.hpp:2785
double getIntegerTolerance() const
Get the integrality tolerance .
Definition: CbcModel.hpp:633
CbcStatistics ** statistics_
statistics
Definition: CbcModel.hpp:2838
int numberStrong() const
Get the maximum number of candidates to be evaluated for strong branching.
Definition: CbcModel.hpp:785
const double * getColUpper() const
Get pointer to array[getNumCols()] of column upper bounds.
Definition: CbcModel.hpp:1047
bool setAllowablePercentageGap(double value)
Set the percentage allowable gap between the best known solution and the best possible solution...
Definition: CbcModel.hpp:680
CbcTree * tree_
Tree.
Definition: CbcModel.hpp:2672
int numberIntegers() const
Number of integers in problem.
Definition: CbcModel.hpp:1023
void setBranchingMethod(CbcBranchDecision *method)
Set the branching decision method.
Definition: CbcModel.hpp:1507
void generateCpp(FILE *fp, int options)
Create C++ lines to get to current state.
int cliquePseudoCosts(int doStatistics)
Use cliques for pseudocost information - return nonzero if infeasible.
int maximumNumberIterations_
Maximum number of iterations (designed to be used in heuristics)
Definition: CbcModel.hpp:2888
Adjusts printout 1 does different node message with number unsatisfied on last branch.
Definition: CbcModel.hpp:123
void setApplicationData(void *appData)
Set application data.
Base class for message handling.
Stop when the gap between the objective value of the best known solution and the best bound on the ob...
Definition: CbcModel.hpp:154
void setStrategy(CbcStrategy &strategy)
Set the strategy. Clones.
void setSearchStrategy(int value)
Set strategy worked out - mainly at root node for use by CbcNode.
Definition: CbcModel.hpp:1552
virtual bool isInteger(int colIndex) const
Return true if the variable is integer.
bool isInitialSolveProvenPrimalInfeasible() const
Is primal infeasiblity proven (for initialSolve) ?
This class allows for the use of more exotic solvers e.g.
Definition: OsiAuxInfo.hpp:49
void setOriginalColumns(const int *originalColumns, int numberGood=COIN_INT_MAX)
Set original columns as created by preprocessing.
void deleteSolutions()
Delete best and saved solutions.
virtual int getNumCols() const =0
Get the number of columns.
void makeGlobalCuts()
Make partial cuts into global cuts.
double * bestSolution() const
The best solution to the integer programming problem.
Definition: CbcModel.hpp:1313
bool isProvenInfeasible() const
Is infeasiblity proven (or none better than cutoff)?
const OsiRowCut ** lastCut_
Definition: CbcModel.hpp:2579
CbcFullNodeInfo * topOfTree_
Pointer to top of tree.
Definition: CbcModel.hpp:2674
bool eventHappened_
Whether event happened.
Definition: CbcModel.hpp:2852
CbcCutGenerator ** cutGenerators() const
Get the list of cut generators.
Definition: CbcModel.hpp:1569
void setMoreSpecialOptions(int value)
Set more special options at present bottom 6 bits used for shadow price mode 1024 for experimental ho...
Definition: CbcModel.hpp:1853
double penaltyScaleFactor_
Scale factor to make penalties match strong.
Definition: CbcModel.hpp:2732
int numberStrongIterations_
Number of iterations in strong branching.
Definition: CbcModel.hpp:2874
CbcNode ** solveOneNode(int whichSolver, CbcNode *node, int &numberNodesOutput, int &status)
Input one node output N nodes to put on tree and optional solution update This should be able to oper...
int numberUpdateItems_
Number of outstanding update information items.
Definition: CbcModel.hpp:2892
bool setPrintingMode(int value)
Set the printing mode.
Definition: CbcModel.hpp:595
void setDefaultHandler(bool yesNo)
Set flag to say if handler_ is the default handler.
Definition: CbcModel.hpp:1754
int numberGlobalViolations() const
Number of times global cuts violated.
Definition: CbcModel.hpp:1400
CbcNode * currentNode() const
Get a pointer to current node (be careful)
Definition: CbcModel.hpp:2295
Abstract Base Class for describing an interface to a solver.
void setCutAndHeuristicOptions(CbcModel &model)
int getMaximumCutPasses() const
Get the maximum number of cut passes at other nodes (default 10)
Definition: CbcModel.hpp:762
void moveToModel(CbcModel *baseModel, int mode)
Move/copy information from one model to another -1 - initialization 0 - from base model 1 - to base m...
bool ownObjects() const
Now we may not own objects - just point to solver&#39;s objects.
Definition: CbcModel.hpp:1905
const double * getCbcColSolution() const
Get pointer to array[getNumCols()] (for speed) of primal solution vector.
Definition: CbcModel.hpp:1168
double getHeuristicGap() const
Get the heuristic gap between the best known solution and the best possible solution.
Definition: CbcModel.hpp:698
const CoinPackedMatrix * getMatrixByRow() const
Get pointer to row-wise copy of matrix.
Definition: CbcModel.hpp:1138
int maximumCutPassesAtRoot_
Maximum number of cut passes at root.
Definition: CbcModel.hpp:2812
double getAllowablePercentageGap() const
Get the percentage allowable gap between the best known solution and the best possible solution...
Definition: CbcModel.hpp:686
OsiSolverInterface * referenceSolver_
A copy of the solver, taken at constructor or by saveReferenceSolver.
Definition: CbcModel.hpp:2426
bool maximumSecondsReached() const
Return true if maximum time reached.
Fathoming discipline.
Definition: CbcModel.hpp:119
int numberNodes2_
Cumulative number of nodes for statistics.
Definition: CbcModel.hpp:2524
int maximumDepth_
Current limit on search tree depth.
Definition: CbcModel.hpp:2571
double getObjSense() const
Get objective function sense (1 for min (default), -1 for max)
Definition: CbcModel.hpp:1104
bool isSecondsLimitReached() const
Time limit reached?
int whenCuts() const
Get at which depths to do cuts.
Definition: CbcModel.hpp:798
void incrementSubTreeStopped()
Says a sub tree was stopped.
Definition: CbcModel.hpp:1479
int threadMode_
thread mode always use numberThreads for branching 1 set then deterministic 2 set then use numberThre...
Definition: CbcModel.hpp:2914
int getMaximumCutPassesAtRoot() const
Get the maximum number of cut passes at root node.
Definition: CbcModel.hpp:752
double getMinimumDrop() const
Get the minimum drop to continue cuts.
Definition: CbcModel.hpp:742
CbcCutModifier * cutModifier_
Cut modifier function.
Definition: CbcModel.hpp:2684
void zapGlobalCuts()
Get rid of global cuts.
Definition: CbcModel.hpp:2289
const double * getRowPrice() const
Get pointer to array[getNumRows()] of dual prices.
Definition: CbcModel.hpp:1256
void gutsOfCopy(const CbcModel &rhs, int mode=0)
Most of copy constructor mode - 0 copy but don&#39;t delete before 1 copy and delete before 2 copy and de...
bool isProvenDualInfeasible() const
Was continuous solution unbounded.
int printFrequency() const
Get the print frequency.
Definition: CbcModel.hpp:897
void setInfoInChild(int type, CbcThread *info)
Set information in a child -3 pass pointer to child thread info -2 just stop -1 delete simple child s...
CbcEventHandler::CbcAction dealWithEventHandler(CbcEventHandler::CbcEvent event, double objValue, const double *solution)
Deals with event handler and solution.
void branchAndBound(int doStatistics=0)
Invoke the branch &amp; cut algorithm.
CbcBaseModel * master_
Thread stuff for master.
Definition: CbcModel.hpp:2918
CbcEvent
Events known to cbc.
const double * cbcReducedCost_
Get a pointer to array[getNumCols()] (for speed) of reduced costs.
Definition: CbcModel.hpp:2707
virtual bool isContinuous(int colIndex) const =0
Return true if the variable is continuous.
Current minimization objective value.
Definition: CbcModel.hpp:165
CoinWarmStartBasis * getEmptyBasis(int ns=0, int na=0) const
Return an empty basis object of the specified size.
double getAllowableFractionGap() const
Get the fraction allowable gap between the best known solution and the best possible solution...
Definition: CbcModel.hpp:674
int logLevel() const
Get current log (detail) level.
CbcCutModifier * cutModifier() const
Get the current cut modifier method.
Definition: CbcModel.hpp:1520
void setBestSolutionBasis(const CoinWarmStartBasis &bestSolutionBasis)
Warm start object produced by heuristic or strong branching.
Definition: CbcModel.hpp:2390
void synchronizeHandlers(int makeDefault)
Makes all handlers same.
void setNumberPenalties(int number)
Set the number of variables for which to compute penalties in dynamic strong branching.
double getAllowableGap() const
Get the allowable gap between the best known solution and the best possible solution.
Definition: CbcModel.hpp:661
int numberNodes_
Cumulative number of nodes.
Definition: CbcModel.hpp:2520
int numberFixedAtRoot_
Number of fixed by analyze at root.
Definition: CbcModel.hpp:2846
void setMinimizationObjValue(double value)
Set best objective function value as minimization.
Definition: CbcModel.hpp:1284
void startSplitModel(int numberIterations)
Start threads.
Using MS heap implementation.
Definition: CbcTree.hpp:53
int whenCuts_
At which depths to do cuts.
Definition: CbcModel.hpp:2512
const OsiObject * object(int which) const
Get the specified object.
Definition: CbcModel.hpp:477
int numberFathoms_
Number of times fast lp entered.
Definition: CbcModel.hpp:2801
int continuousInfeasibilities_
Number of infeasibilities at continuous.
Definition: CbcModel.hpp:2810
Stop doing heuristics when the gap between the objective value of the best known solution and the bes...
Definition: CbcModel.hpp:184
void setLogLevel(int value)
Set log level.
int getCurrentPassNumber() const
Get current cut pass number in this round of cuts.
Definition: CbcModel.hpp:767
bool isInteger(int colIndex) const
Return true if column is integer.
Definition: CbcModel.hpp:1123
void setWhenCuts(int value)
Set at which depths to do cuts.
Definition: CbcModel.hpp:802
void setNumberBeforeTrust(int number)
Set the number of branches before pseudo costs believed in dynamic strong branching.
int numberIntegers_
Number of integers in problem.
Definition: CbcModel.hpp:2543
Class to deal with symmetry.
Definition: CbcSymmetry.hpp:69
int problemType_
Problem type as set by user or found by analysis.
Definition: CbcModel.hpp:2747
Base class for Cbc event handling.
int strongInfo_[7]
0 - number times strong branching done, 1 - number fixed, 2 - number infeasible Second group of three...
Definition: CbcModel.hpp:2877
int callCbc1(const char *input2, CbcModel &babSolver)
int typePresolve() const
Whether to automatically do presolve before branch and bound (subTrees).
Definition: CbcModel.hpp:1487
CoinMessageHandler * messageHandler() const
Return handler.
Definition: CbcModel.hpp:1732
void setHotstartSolution(const double *solution, const int *priorities=NULL)
Pass in target solution and optional priorities.
OsiObject ** objects() const
Get the array of objects.
Definition: CbcModel.hpp:472
int addCuts(CbcNode *node, CoinWarmStartBasis *&lastws)
Determine and install the active cuts that need to be added for the current subproblem.
virtual const double * getRightHandSide() const =0
Get a pointer to an array[getNumRows()] of row right-hand sides.
double * currentSolution() const
Solution to the most recent lp relaxation.
Definition: CbcModel.hpp:1235
Just a marker, so that a static sized array can store parameters.
Definition: CbcModel.hpp:128
This is a first attempt at a message handler.
const CoinPackedMatrix * getMatrixByCol() const
Get pointer to column-wise copy of matrix.
Definition: CbcModel.hpp:1143
void setMaximumSavedSolutions(int value)
Set maximum number of extra saved solutions.
double sumChangeObjective1_
Sum of Changes to objective by first solve.
Definition: CbcModel.hpp:2462
void setUseElapsedTime(bool yesNo)
Set time method.
Definition: CbcModel.hpp:1886
double * continuousSolution() const
Holds solution at continuous (after cuts if branchAndBound called)
Definition: CbcModel.hpp:1189
int numberCutGenerators() const
Get the number of cut generators.
Definition: CbcModel.hpp:1565
int getPreferredWay() const
Get the preferred way to branch (default 0)
Definition: CbcModel.hpp:794
double getInfinity() const
Get solver&#39;s value for infinity.
Definition: CbcModel.hpp:1148
virtual const double * getColLower() const =0
Get a pointer to an array[getNumCols()] of column lower bounds.
Cut Generator Base Class.
int numberHeuristicSolutions_
Number of heuristic solutions.
Definition: CbcModel.hpp:2518
int stopNumberIterations_
For threads - stop after this many &quot;iterations&quot;.
Definition: CbcModel.hpp:2729
int numberStoppedSubTrees() const
Returns number of times any subtree stopped on nodes, time etc.
Definition: CbcModel.hpp:1475
CbcHeuristic * heuristic(int i) const
Get the specified heuristic.
Definition: CbcModel.hpp:1630
OsiSolverInterface * continuousSolver() const
Returns solver with continuous state.
Definition: CbcModel.hpp:1982
void gutsOfDestructor2()
Clears out enough to reset CbcModel as if no branch and bound done.
double bestObjective_
Best objective.
Definition: CbcModel.hpp:2458
const int * whichGenerator() const
Which cut generator generated this cut.
Definition: CbcModel.hpp:365
int getMaximumNodes() const
Get the maximum node limit .
Definition: CbcModel.hpp:576
const double * savedSolution(int which) const
Return a saved solution (0==best) - NULL if off end.
const double * getCbcRowUpper() const
Get pointer to array[getNumRows()] (for speed) of row upper bounds.
Definition: CbcModel.hpp:1164
void setBestObjectiveValue(double objectiveValue)
Just update objectiveValue.
CbcSymmetry * symmetryInfo() const
Symmetry information.
Definition: CbcModel.hpp:2323
void redoWalkBack()
Redo walkback arrays.
int searchStrategy_
Strategy worked out - mainly at root node.
Definition: CbcModel.hpp:2860
int numberBeforeTrust_
The number of branches before pseudo costs believed in dynamic strong branching.
Definition: CbcModel.hpp:2723
int fastNodeDepth() const
Get depth for fast nodes.
Definition: CbcModel.hpp:2330
void setStateOfSearch(int state)
Definition: CbcModel.hpp:1544
void setNodeComparison(CbcCompareBase *compare)
Stop doing heuristics when the gap between the objective value of the best known solution and the bes...
Definition: CbcModel.hpp:176
int chooseBranch(CbcNode *&newNode, int numberPassesLeft, CbcNode *oldNode, OsiCuts &cuts, bool &resolved, CoinWarmStartBasis *lastws, const double *lowerBefore, const double *upperBefore, OsiSolverBranch *&branches)
Encapsulates choosing a variable - anyAction -2, infeasible (-1 round again), 0 done.
void synchronizeModel()
Ensure attached objects point to this model.
virtual int getNumRows() const =0
Get the number of rows.
int resolve(CbcNodeInfo *parent, int whereFrom, double *saveSolution=NULL, double *saveLower=NULL, double *saveUpper=NULL)
Reoptimise an LP relaxation.
void setBranchingMethod(CbcBranchDecision &method)
Set the branching method.
Definition: CbcModel.hpp:1515
double * analyzeResults_
Arrays with analysis results.
Definition: CbcModel.hpp:2736
The amount by which to tighten the objective function cutoff when a new solution is discovered...
Definition: CbcModel.hpp:140
const double * cbcColSolution_
Pointer to array[getNumCols()] (for speed) of primal solution vector.
Definition: CbcModel.hpp:2703
virtual CbcBranchDecision * clone() const =0
Clone.
void setProblemType(int number)
Problem type as set by user or found by analysis.
Definition: CbcModel.hpp:859
void saveBestSolution(const double *solution, double objectiveValue)
Save a solution to best and move current to saved.
void clearNumberGlobalViolations()
Definition: CbcModel.hpp:1403
CbcModel * parentModel() const
Get the current parent model.
Definition: CbcModel.hpp:1611
void setCutoff(double value)
Set cutoff bound on the objective function.
const double * getColSolution() const
Get pointer to array[getNumCols()] of primal solution vector.
Definition: CbcModel.hpp:1251
int printFrequency_
Print frequency.
Definition: CbcModel.hpp:2749
double continuousObjective_
Value of objective at continuous (Well actually after initial round of cuts)
Definition: CbcModel.hpp:2805
CbcModel * subTreeModel(OsiSolverInterface *solver=NULL) const
For retrieving a copy of subtree model with given OsiSolver.
void passInPriorities(const int *priorities, bool ifNotSimpleIntegers)
Pass in branching priorities.
int numberBeforeTrust() const
get the number of branches before pseudo costs believed in dynamic strong branching.
Definition: CbcModel.hpp:820
virtual bool isBinary(int colIndex) const
Return true if the variable is binary.
virtual double getInfinity() const =0
Get the solver&#39;s value for infinity.
CoinWarmStartBasis bestSolutionBasis_
Warm start object produced by heuristic or strong branching.
Definition: CbcModel.hpp:2490
int howOftenGlobalScan_
How often to scan global cuts.
Definition: CbcModel.hpp:2792
OsiRowCut augmented with bookkeeping.
int stateOfSearch() const
State of search 0 - no solution 1 - only heuristic solutions 2 - branched to a solution 3 - no soluti...
Definition: CbcModel.hpp:1541
double getCurrentSeconds() const
Current time since start of branchAndbound.
bool tightenVubs(int type, bool allowMultipleBinary=false, double useCutoff=1.0e50)
For variables involved in VUB constraints, see if we can tighten bounds by solving lp&#39;s...
int maximumDepthActual_
Maximum depth reached.
Definition: CbcModel.hpp:2840
void setNumberObjects(int number)
Set the number of objects.
Definition: CbcModel.hpp:467
double getCurrentMinimizationObjValue() const
Get current minimization objective function value.
Definition: CbcModel.hpp:1275
double getContinuousObjective() const
Value of objective at continuous.
Definition: CbcModel.hpp:1377
int numberRowsAtContinuous_
Number of rows at continuous.
Definition: CbcModel.hpp:2545
CoinWarmStart * emptyWarmStart_
Pointer to an empty warm start object.
Definition: CbcModel.hpp:2455
void previousBounds(CbcNode *node, CbcNodeInfo *where, int iColumn, double &lower, double &upper, int force)
Returns bounds just before where - initially original bounds.
void zeroExtra()
Zero extra.
Definition: CbcModel.hpp:2347
CbcBaseModel * master() const
Thread stuff for master.
Definition: CbcModel.hpp:2086
CbcModel()
Default Constructor.
int continuousPriority() const
Get anything with priority &gt;= this can be treated as continuous.
Definition: CbcModel.hpp:2334
CbcBranchDecision * branchingMethod_
Variable selection function.
Definition: CbcModel.hpp:2682
Optimization direction - stored for speed.
Definition: CbcModel.hpp:161
Information required while the node is live.
Definition: CbcNode.hpp:49
int numberFixedNow_
Number fixed by analyze so far.
Definition: CbcModel.hpp:2848
For gathering statistics.
const double * getCbcRowLower() const
Get pointer to array[getNumRows()] (for speed) of row lower bounds.
Definition: CbcModel.hpp:1160
int * originalColumns() const
Original columns as created by integerPresolve or preprocessing.
Definition: CbcModel.hpp:877
void setSolutionCount(int value)
Set number of solutions (so heuristics will be different)
Definition: CbcModel.hpp:1331
const double * cbcRowActivity_
Pointer to array[getNumRows()] (for speed) of row activity levels.
Definition: CbcModel.hpp:2709
int getNumRows() const
Get number of rows.
Definition: CbcModel.hpp:1013
int numberStoppedSubTrees_
Number of times any subtree stopped on nodes, time etc.
Definition: CbcModel.hpp:2680
double getCutoffIncrement() const
Get the CbcModel::CbcCutoffIncrement desired.
Definition: CbcModel.hpp:725
virtual double getObjValue() const =0
Get the objective function value.
int parallelMode() const
Return -2 if deterministic threaded and main thread -1 if deterministic threaded and serial thread 0 ...
Definition: CbcModel.hpp:2071
int continuousPriority_
Anything with priority &gt;= this can be treated as continuous.
Definition: CbcModel.hpp:2890
int numberCutGenerators_
Number of cut generators.
Definition: CbcModel.hpp:2751
int currentPassNumber_
Current cut pass number.
Definition: CbcModel.hpp:2818
CoinThreadRandom * randomNumberGenerator()
Thread specific random number generator.
Definition: CbcModel.hpp:2303
int numberObjects_
Total number of objects.
Definition: CbcModel.hpp:2773
void setObjSense(double s)
Set objective function sense (1 for min (default), -1 for max,)
Definition: CbcModel.hpp:1371
int currentDepth() const
Current depth.
Definition: CbcModel.hpp:866
double dblParam_[CbcLastDblParam]
Array for double parameters.
Definition: CbcModel.hpp:2445
void CbcMain0(CbcModel &babSolver)
The maximum number of solutions before terminating.
Definition: CbcModel.hpp:109
int getExtraNodeCount() const
Get how many Nodes were enumerated in complete fathoming B&amp;B inside CLP.
Definition: CbcModel.hpp:938
CbcFeasibilityBase * problemFeasibility_
User feasibility function (see CbcFeasibleBase.hpp)
Definition: CbcModel.hpp:2670
Row Cut Class.
Definition: OsiRowCut.hpp:29
CbcCompareBase * nodeComparison() const
Definition: CbcModel.hpp:1440
int maximumStatistics_
Maximum number of statistics.
Definition: CbcModel.hpp:2836
int maximumSavedSolutions_
Maximum number of saved solutions.
Definition: CbcModel.hpp:2503
OsiSolverInterface * continuousSolver_
A copy of the solver, taken at the continuous (root) node.
Definition: CbcModel.hpp:2423
CoinMessages messages_
Cbc messages.
Definition: CbcModel.hpp:2439
int getNumCols() const
Get number of columns.
Definition: CbcModel.hpp:1008
CbcRowCuts globalCuts_
Global cuts.
Definition: CbcModel.hpp:2492
int intParam_[CbcLastIntParam]
Array for integer parameters.
Definition: CbcModel.hpp:2442
CglStored * storedRowCuts() const
Get stored row cuts for donor/recipient CbcModel.
Definition: CbcModel.hpp:2369
bool defaultHandler_
Flag to say if handler_ is the default handler.
Definition: CbcModel.hpp:2436
void setMoreSpecialOptions2(int value)
Set more more special options 0 bit (1) - find switching variables 1 bit (2) - using fake objective u...
Definition: CbcModel.hpp:1874
const double * getRowUpper() const
Get pointer to array[getNumRows()] of row upper bounds.
Definition: CbcModel.hpp:1094
void setStrategy(CbcStrategy *strategy)
Set the strategy. assigns.
Definition: CbcModel.hpp:1607
void incrementIterationCount(int value)
Increment how many iterations it took to solve the problem.
Definition: CbcModel.hpp:926
CBC_Message
This deals with Cbc messages (as against Clp messages etc).
Definition: CbcMessage.hpp:24
virtual int getNumElements() const =0
Get the number of nonzero elements.
Smallest non-zero change on a branch.
Definition: CbcModel.hpp:186
int getNumberThreads() const
Get number of threads.
Definition: CbcModel.hpp:2042
int maximumNumberCuts_
Maximum number of cuts.
Definition: CbcModel.hpp:2553
void setMaximumCutPassesAtRoot(int value)
Set the maximum number of cut passes at root node (default 20) Minimum drop can also be used for fine...
Definition: CbcModel.hpp:748
Sparse Matrix Base Class.
void checkModel()
Check original model before it gets messed up.
int doOneNode(CbcModel *baseModel, CbcNode *&node, CbcNode *&newNode)
Do one node - broken out for clarity? also for parallel (when baseModel!=this) Returns 1 if solution ...
void setObjValue(double value)
Set best objective function value.
Definition: CbcModel.hpp:1299
The maximum number of seconds before terminating.
Definition: CbcModel.hpp:157
CoinMessages & messages()
Return messages.
Definition: CbcModel.hpp:1736
bool allDynamic() const
Says whether all dynamic integers.
Definition: CbcModel.hpp:2377
const int COIN_INT_MAX
Definition: CoinFinite.hpp:19
void initialSolve()
Solve the initial LP relaxation.
bool ownObjects_
Now we may not own objects - just point to solver&#39;s objects.
Definition: CbcModel.hpp:2787
int maximumCutPasses_
Maximum number of cut passes.
Definition: CbcModel.hpp:2814
bool isContinuous(int colIndex) const
Return true if variable is continuous.
Definition: CbcModel.hpp:1110
const double * getRowActivity() const
Get pointer to array[getNumRows()] of row activity levels.
Definition: CbcModel.hpp:1266
int lastDepth_
Definition: CbcModel.hpp:2580
CbcRowCuts * globalCuts()
Global cuts.
Definition: CbcModel.hpp:2285
int status() const
Final status of problem Some of these can be found out by is......
Definition: CbcModel.hpp:954
CbcRowCuts * globalConflictCuts_
Global conflict cuts.
Definition: CbcModel.hpp:2494
int maximumCuts_
Definition: CbcModel.hpp:2582
bool setMaximumNodes(int value)
Set the maximum node limit .
Definition: CbcModel.hpp:571
The time at start of model.
Definition: CbcModel.hpp:168
virtual const double * getColSolution() const =0
Get a pointer to an array[getNumCols()] of primal variable values.
const double * cbcRowUpper_
Pointer to array[getNumRows()] (for speed) of row upper bounds.
Definition: CbcModel.hpp:2701
const char * getRowSense() const
Get pointer to array[getNumRows()] of row constraint senses.
Definition: CbcModel.hpp:1060
void addObjects(int numberObjects, OsiObject **objects)
Add in object information.
int getStopNumberIterations() const
Get number of &quot;iterations&quot; to stop after.
Definition: CbcModel.hpp:1422
CglStored * storedRowCuts_
Stored row cuts for donor/recipient CbcModel.
Definition: CbcModel.hpp:2898
Base class for Clp event handling.
void incrementExtra(int nodes, int iterations, int fathoms=1)
Definition: CbcModel.hpp:2341
OsiSolverInterface * solver() const
Returns solver - has current state.
Definition: CbcModel.hpp:1970
Heuristic base class.
bool isInitialSolveAbandoned() const
Are there numerical difficulties (for initialSolve) ?
int splitModel(int numberModels, CbcModel **model, int numberNodes)
Split up nodes.
Language
Supported languages.
int numberIterations_
Cumulative number of iterations.
Definition: CbcModel.hpp:2526
double * continuousSolution_
Holds solution at continuous (after cuts)
Definition: CbcModel.hpp:2607
void sayEventHappened()
Tell model to stop on event.
Definition: CbcModel.hpp:1817
Abstract cut modifier base class.
double getObjValue() const
Get best objective function value.
Definition: CbcModel.hpp:1289
double ** savedSolutions_
Arrays holding other solutions.
Definition: CbcModel.hpp:2469
bool isLocked() const
From here to end of section - code in CbcThread.cpp until class changed Returns true if locked...
Information required to recreate the subproblem at this node.
Definition: CbcNodeInfo.hpp:68
void setBestSolution(CBC_Message how, double &objectiveValue, const double *solution, int fixVariables=0)
Record a new incumbent solution and update objectiveValue.
int numberAnalyzeIterations_
Number of analyze iterations to do.
Definition: CbcModel.hpp:2734
virtual double getObjSense() const =0
Get the objective function sense.
int secondaryStatus_
Secondary status of problem -1 unset (status_ will also be -1) 0 search completed with solution 1 lin...
Definition: CbcModel.hpp:2541
void setParentModel(CbcModel &parentModel)
Set the parent model.
Definition: CbcModel.hpp:1615
virtual bool isFreeBinary(int colIndex) const
Return true if the variable is binary and not fixed.
int CoinBigIndex
int * hotstartPriorities_
Hotstart priorities.
Definition: CbcModel.hpp:2516
void setMIPStart(const std::vector< std::pair< std::string, double > > &mips)
Definition: CbcModel.hpp:2397
bool isContinuousUnbounded() const
Was continuous solution unbounded.
double originalContinuousObjective_
Value of objective before root node cuts added.
Definition: CbcModel.hpp:2808
int getNodeCount() const
Get how many Nodes it took to solve the problem (including those in complete fathoming B&amp;B inside CLP...
Definition: CbcModel.hpp:930
void zapIntegerInformation(bool leaveObjects=true)
Zap integer information in problem (may leave object info)
void setPenaltyScaleFactor(double value)
Set scale factor to make penalties match strong.
Information required to recreate the subproblem at this node.
void setSecondaryStatus(int value)
Definition: CbcModel.hpp:975
void setMaximumNumberIterations(int value)
Set maximum number of iterations (designed to be used in heuristics)
Definition: CbcModel.hpp:2319
CbcModel * subTreeModel_
A pointer to model to be used for subtrees.
Definition: CbcModel.hpp:2676
Base model.
Definition: CbcThread.hpp:437
CoinWarmStartBasis workingBasis_
Work basis for temporary use.
Definition: CbcModel.hpp:2832
void * appData_
Pointer to user-defined data structure.
Definition: CbcModel.hpp:2711
void doHeuristicsAtRoot(int deleteHeuristicsAfterwards=0)
Do heuristics at root.
void setContinuousObjective(double value)
Definition: CbcModel.hpp:1380
void analyzeObjective()
Analyze problem to find a minimum change in the objective function.
int numberPenalties() const
get the number of variables for which to compute penalties in dynamic strong branching.
Definition: CbcModel.hpp:831
void setProblemStatus(int value)
Definition: CbcModel.hpp:957
bool stoppedOnGap_
Whether stopping on gap.
Definition: CbcModel.hpp:2850
int numberStrongIterations() const
Get the number of iterations done in strong branching.
Definition: CbcModel.hpp:2311
CbcAction
Action codes returned by the event handler.
Largest non-zero change on a branch.
Definition: CbcModel.hpp:190
int specialOptions() const
Get special options.
Definition: CbcModel.hpp:1797
const double * getCbcColLower() const
Get pointer to array[getNumCols()] (for speed) of column lower bounds.
Definition: CbcModel.hpp:1152
int getSolutionCount() const
Get number of solutions.
Definition: CbcModel.hpp:1326
bool useElapsedTime() const
Get time method.
Definition: CbcModel.hpp:1893
static bool haveMultiThreadSupport()
Indicates whether Cbc library has been compiled with multithreading support.
int CbcMain1(int argc, const char *argv[], CbcModel &babSolver)
void createContinuousSolver()
Create solver with continuous state.
Definition: CbcModel.hpp:1987
void setTestSolution(const double *solution)
Definition: CbcModel.hpp:1244
char integerType(int i) const
Whether or not integer.
Definition: CbcModel.hpp:1031
CbcTree * tree() const
Tree method e.g. heap (which may be overridden by inheritance)
Definition: CbcModel.hpp:1460
OsiRowCut * nextRowCut_
A pointer to a row cut which will be added instead of normal branching.
Definition: CbcModel.hpp:2597
int phase_
Current phase (so heuristics etc etc can find out).
Definition: CbcModel.hpp:2562
int numberSavedSolutions() const
Number of saved solutions (including best)
CbcModel * heuristicModel_
A pointer to model from CbcHeuristic.
Definition: CbcModel.hpp:2678
double penaltyScaleFactor() const
Get scale factor to make penalties match strong.
Definition: CbcModel.hpp:846
double getCutoff() const
Get the cutoff bound on the objective function - always as minimize.
Definition: CbcModel.hpp:564
double getMinimizationObjValue() const
Get best objective function value as minimization.
Definition: CbcModel.hpp:1280
void synchronizeNumberBeforeTrust(int type=0)
Set numberBeforeTrust in all objects.
const double * getColLower() const
Get pointer to array[getNumCols()] of column lower bounds.
Definition: CbcModel.hpp:1042
OsiBabSolver * solverCharacteristics_
For advanced applications you may wish to modify the behavior of Cbc e.g.
Definition: CbcModel.hpp:2884
void setNumberHeuristics(int value)
Set the number of heuristics.
Definition: CbcModel.hpp:1638
Small non-zero change on a branch to be used as guess.
Definition: CbcModel.hpp:192
int numberAnalyzeIterations() const
Definition: CbcModel.hpp:841
bool setAllowableGap(double value)
Set the allowable gap between the best known solution and the best possible solution.
Definition: CbcModel.hpp:655
void setMaximumCutPasses(int value)
Set the maximum number of cut passes at other nodes (default 10) Minimum drop can also be used for fi...
Definition: CbcModel.hpp:758
void setMinimumDrop(double value)
Set the minimum drop to continue cuts.
Definition: CbcModel.hpp:738
int * usedInSolution_
Array marked whenever a solution is found if non-zero.
Definition: CbcModel.hpp:2609
int getIntParam(CbcIntParam key) const
Get an integer parameter.
Definition: CbcModel.hpp:549
void passInMessageHandler(CoinMessageHandler *handler)
Pass in Message handler (not deleted at end)
double getInfeasibilityWeight() const
Get the weight per integer infeasibility .
Definition: CbcModel.hpp:648
Validate cuts against a known solution.
int presolve_
Presolve for CbcTreeLocal.
Definition: CbcModel.hpp:2713
CbcThread * masterThread_
Pointer to masterthread.
Definition: CbcModel.hpp:2920
void addUpdateInformation(const CbcObjectUpdateData &data)
Adds an update information object.
int maximumNumberIterations() const
Get maximum number of iterations (designed to be used in heuristics)
Definition: CbcModel.hpp:2315
CbcCutGenerator * virginCutGenerator(int i) const
Get the specified cut generator before any changes.
Definition: CbcModel.hpp:1577
void resetModel()
Clears out enough to reset CbcModel cutoff etc.
void goToDantzig(int numberNodes, ClpDualRowPivot *&savePivotMethod)
Go to dantzig pivot selection if easy problem (clp only)
int problemType() const
Definition: CbcModel.hpp:862
CbcCutGenerator ** virginGenerator_
Definition: CbcModel.hpp:2755
OsiBranchingInformation usefulInformation() const
Generate an OsiBranchingInformation object.
Class for preProcessing and postProcessing.
void getIntegerInformation(const OsiObject *object, double &originalLower, double &originalUpper)
So we can use osiObject or CbcObject during transition.
void setTemporaryPointer(void *pointer)
Set useful temporary pointer.
Definition: CbcModel.hpp:1900
bool setIntParam(CbcIntParam key, int value)
Set an integer parameter.
Definition: CbcModel.hpp:539
void setMultipleRootTries(int value)
Set multiple root tries.
Definition: CbcModel.hpp:1809
virtual const double * getObjCoefficients() const =0
Get a pointer to an array[getNumCols()] of objective function coefficients.
void fillPseudoCosts(double *downCosts, double *upCosts, int *priority=NULL, int *numberDown=NULL, int *numberUp=NULL, int *numberDownInfeasible=NULL, int *numberUpInfeasible=NULL) const
Return pseudo costs If not all integers or not pseudo costs - returns all zero Length of arrays are n...
CglTreeProbingInfo * probingInfo() const
Get a pointer to probing info.
Definition: CbcModel.hpp:2299
int numberExtraIterations() const
Number of extra iterations.
Definition: CbcModel.hpp:2353
virtual const CoinPackedMatrix * getMatrixByRow() const =0
Get a pointer to a row-wise copy of the matrix.
std::vector< std::pair< std::string, double > > mipStart_
MIPstart values values for integer variables which will be converted to a complete integer initial fe...
Definition: CbcModel.hpp:2483
int numberOldActiveCuts_
Number of old active cuts.
Definition: CbcModel.hpp:2856
void AddIntegers()
Add additional integers.
int maximumSavedSolutions() const
Maximum number of extra saved solutions.
Definition: CbcModel.hpp:1337
bool solveWithCuts(OsiCuts &cuts, int numberTries, CbcNode *node)
Evaluate a subproblem using cutting planes and heuristics.
const OsiBabSolver * solverCharacteristics() const
Get solver characteristics.
Definition: CbcModel.hpp:1715
CbcStrategy * strategy() const
Get the current strategy.
Definition: CbcModel.hpp:1601
int getMaximumSolutions() const
Get the maximum number of solutions desired.
Definition: CbcModel.hpp:591
void setContinuousInfeasibilities(int value)
Definition: CbcModel.hpp:1387
int reducedCostFix()
Perform reduced cost fixing.
void saveSolution(const ClpSimplex *lpSolver, std::string fileName)
Solver Branch Class.
const double * testSolution_
For testing infeasibilities - will point to currentSolution_ or solver–&gt;getColSolution() ...
Definition: CbcModel.hpp:2479
bool setMaximumSeconds(double value)
Set the maximum number of seconds desired.
Definition: CbcModel.hpp:608
virtual const double * getRowUpper() const =0
Get a pointer to an array[getNumRows()] of row upper bounds.
Interface between Cbc and Cut Generation Library.
void deleteSavedSolution(int which)
Delete a saved solution and move others up.
void setObjectiveValue(CbcNode *thisNode, const CbcNode *parentNode) const
Set objective value in a node.
virtual const double * getReducedCost() const =0
Get a pointer to an array[getNumCols()] of reduced costs.
virtual const double * getRowLower() const =0
Get a pointer to an array[getNumRows()] of row lower bounds.
void setTypePresolve(int value)
Definition: CbcModel.hpp:1490
void deleteObjects(bool findIntegers=true)
Delete all object information (and just back to integers if true)
double getMaximumSeconds() const
Get the maximum number of seconds desired.
Definition: CbcModel.hpp:615
bool setCutoffIncrement(double value)
Set the CbcModel::CbcCutoffIncrement desired.
Definition: CbcModel.hpp:718
int numberPenalties_
The number of variables for which to compute penalties in dynamic strong branching.
Definition: CbcModel.hpp:2727
bool setHeuristicGap(double value)
Set the heuristic gap between the best known solution and the best possible solution.
Definition: CbcModel.hpp:692
CbcModel * findCliques(bool makeEquality, int atLeastThisMany, int lessThanThis, int defaultValue=1000)
Identify cliques and construct corresponding objects.
double getHeuristicFractionGap() const
Get the fraction heuristic gap between the best known solution and the best possible solution...
Definition: CbcModel.hpp:711
The maximum amount the value of an integer variable can vary from integer and still be considered fea...
Definition: CbcModel.hpp:134
Abstract base class for `objects&#39;.
virtual const double * getRowRange() const =0
Get a pointer to an array[getNumRows()] of row ranges.
void addCutGenerator(CglCutGenerator *generator, int howOften=1, const char *name=NULL, bool normal=true, bool atSolution=false, bool infeasible=false, int howOftenInSub=-100, int whatDepth=-1, int whatDepthInSub=-1)
Add one generator - up to user to delete generators.
Stop when the gap between the objective value of the best known solution and the best bound on the ob...
Definition: CbcModel.hpp:147
void addHeuristic(CbcHeuristic *generator, const char *name=NULL, int before=-1)
Add one heuristic - up to user to delete.
void assignSolver(OsiSolverInterface *&solver, bool deleteSolver=true)
Assign a solver to the model (model assumes ownership)
OsiSolverInterface * swapSolver(OsiSolverInterface *solver)
Returns current solver - sets new one.
Definition: CbcModel.hpp:1975
bool waitingForMiniBranchAndBound() const
Says if model is sitting there waiting for mini branch and bound to finish This is because an event h...
Definition: CbcModel.hpp:1827
double getDblParam(CbcDblParam key) const
Get a double parameter.
Definition: CbcModel.hpp:553
int numberExtraIterations_
Number of extra iterations in fast lp.
Definition: CbcModel.hpp:2797
OsiObject * modifiableObject(int which) const
Get the specified object.
Definition: CbcModel.hpp:481
const double * getCbcRowPrice() const
Get pointer to array[getNumRows()] (for speed) of dual prices.
Definition: CbcModel.hpp:1172
void setPreferredWay(int value)
Set global preferred way to branch -1 down, +1 up, 0 no preference.
Definition: CbcModel.hpp:790
int * originalColumns_
Original columns as created by integerPresolve or preprocessing.
Definition: CbcModel.hpp:2790
CoinThreadRandom randomNumberGenerator_
Thread specific random number generator.
Definition: CbcModel.hpp:2830
Dual Row Pivot Abstract Base Class.
double getBestPossibleObjValue() const
Get best possible objective function value.
const double * getRowLower() const
Get pointer to array[getNumRows()] of row lower bounds.
Definition: CbcModel.hpp:1089
void gutsOfDestructor()
Clears out as much as possible (except solver)
const int * strongInfo() const
Return strong info.
Definition: CbcModel.hpp:2360
int numberThreads_
Parallel 0 - off 1 - testing 2-99 threads other special meanings.
Definition: CbcModel.hpp:2906
Simple Branch and bound class.
Definition: CbcModel.hpp:101
void saveExtraSolution(const double *solution, double objectiveValue)
Save a solution to saved list.
OsiSolverInterface * referenceSolver() const
A copy of the solver, taken at constructor or by saveReferenceSolver.
Definition: CbcModel.hpp:1997
Abstract base class for warm start information.
void * temporaryPointer() const
Get useful temporary pointer.
Definition: CbcModel.hpp:1897
void findIntegers(bool startAgain, int type=0)
Identify integer variables and create corresponding objects.
bool resolveAfterTakeOffCuts() const
Whether to force a resolve after takeOffCuts.
Definition: CbcModel.hpp:1407
int randomSeed_
Random seed.
Definition: CbcModel.hpp:2824
void setStopNumberIterations(int value)
Set number of &quot;iterations&quot; to stop after.
Definition: CbcModel.hpp:1426
void setCutModifier(CbcCutModifier *modifier)
Set the cut modifier method.
void setSpecialOptions(int value)
Set special options 0 bit (1) - check if cuts valid (if on debugger list) 1 bit (2) - use current bas...
Definition: CbcModel.hpp:1793
CbcFeasibilityBase * problemFeasibility() const
Definition: CbcModel.hpp:1450
void saveModel(OsiSolverInterface *saveSolver, double *checkCutoffForRestart, bool *feasible)
Save copy of the model.
int makeGlobalCut(const OsiRowCut *cut)
Make given cut into a global cut.
const double * getCbcRowActivity() const
Get pointer to array[getNumRows()] (for speed) of row activity levels.
Definition: CbcModel.hpp:1180
int moreSpecialOptions_
More special options at present bottom 6 bits used for shadow price mode 1024 for experimental hotsta...
Definition: CbcModel.hpp:2652
int currentNumberCuts_
Number of entries in addedCuts_.
Definition: CbcModel.hpp:2565
void setNextRowCut(const OsiRowCut &cut)
Copy and set a pointer to a row cut which will be added instead of normal branching.
Class to hold and manipulate an array of massaged messages.
CbcCutGenerator * cutGenerator(int i) const
Get the specified cut generator.
Definition: CbcModel.hpp:1573
void originalModel(CbcModel *presolvedModel, bool weak)
Put back information into the original model after integer presolve.
Strategy base class.
Definition: CbcStrategy.hpp:18
int numberGlobalViolations_
Number of times global cuts violated.
Definition: CbcModel.hpp:2795
void pseudoShadow(int type)
Fill in useful estimates.
bool doCutsNow(int allowForTopOfTree) const
Return true if we want to do cuts If allowForTopOfTree zero then just does on multiples of depth if 1...
int numberHeuristics_
Number of heuristics.
Definition: CbcModel.hpp:2757
void passInSubTreeModel(CbcModel &model)
For passing in an CbcModel to do a sub Tree (with derived tree handlers).
Class for thread specific random numbers.
bool isInitialSolveProvenDualInfeasible() const
Is dual infeasiblity proven (for initialSolve) ?
virtual ~CbcModel()
Destructor.
A class to encapsulate thread stuff.
Definition: CbcThread.hpp:426
double * hotstartSolution_
Hotstart solution.
Definition: CbcModel.hpp:2514
void mergeModels(int numberModel, CbcModel **model, int numberNodes)
Merge models.
const int * hotstartPriorities() const
Get the hotstart priorities.
Definition: CbcModel.hpp:2272
void adjustHeuristics()
Adjust heuristics based on model.
double sumChangeObjective() const
Sum of Changes to objective by first solve.
Definition: CbcModel.hpp:1395
const int * integerVariable() const
Definition: CbcModel.hpp:1027
virtual void setObjSense(double s)=0
Set the objective function sense.
int maximumWhich_
Maximum number of cuts (for whichGenerator_)
Definition: CbcModel.hpp:2820
double bestPossibleObjective_
Best possible objective.
Definition: CbcModel.hpp:2460
void moveInfo(const CbcModel &rhs)
Move status, nodes etc etc across.
int priority(int sequence) const
Returns priority level for an object (or 1000 if no priorities exist)
Definition: CbcModel.hpp:1671
int getFathomCount() const
Get how many times complete fathoming B&amp;B was done.
Definition: CbcModel.hpp:942
virtual const double * getColUpper() const =0
Get a pointer to an array[getNumCols()] of column upper bounds.