Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

master.h
Go to the documentation of this file.
1 
30 #pragma once
31 
32 #include <ogdf/lib/abacus/global.h>
34 
35 #include <ogdf/lib/abacus/hash.h>
36 #include <ogdf/basic/Stopwatch.h>
37 
38 
39 class OsiSolverInterface;
40 
41 namespace abacus {
42 
43 
44 class Sub;
45 class BranchRule;
46 class Variable;
47 class Constraint;
48 
49 class History;
50 class OpenSub;
51 class FixCand;
52 class LpMasterOsi;
53 
54 template<class BaseType, class CoType> class StandardPool;
55 
56 
58 
70 
71  friend class Sub;
72  friend class FixCand;
73 
74 public:
75 
77  enum STATUS {
78  Optimal,
85  Guaranteed,
91  ExceptionFathom
93  };
94 
96 
99  static const char* STATUS_[];
100 
101 
103  enum ENUMSTRAT {
104  BestFirst,
109  DiveAndBest
111  };
112 
114 
117  static const char *ENUMSTRAT_[];
118 
122  CloseHalfExpensive
124  };
125 
127 
130  static const char *BRANCHINGSTRAT_[];
131 
133 
139  NoPrimalBound,
142  OptimumOne
144  };
145 
147 
150  static const char* PRIMALBOUNDMODE_[];
151 
154  SkipByNode,
156  SkipByLevel
157  };
158 
160 
163  static const char* SKIPPINGMODE_[];
164 
166  enum CONELIMMODE {
169  Basic
170  };
171 
172 
174 
177  static const char* CONELIMMODE_[];
178 
180  enum VARELIMMODE {
182  ReducedCost
183  };
184 
186 
189  static const char* VARELIMMODE_[];
190 
192  enum VBCMODE {
195  Pipe
196  };
197 
199 
202  static const char* VBCMODE_[];
203 
204 
206 
209  enum OSISOLVER { Cbc, Clp, CPLEX, DyLP, FortMP, GLPK, MOSEK, OSL, SoPlex, SYMPHONY, XPRESS_MP, Gurobi, Csdp };
210 
212  static const char* OSISOLVER_[];
213 
215 
239  Master(const char *problemName, bool cutting, bool pricing,
241  double eps = 1.0e-4, double machineEps = 1.0e-7,
242  double infinity = 1.0e30,
243  bool readParamFromFile = false);
244 
246  virtual ~Master();
247 
249 
252  STATUS optimize();
253 
265 
268  double lowerBound() const;
269 
271  double upperBound() const;
272 
274 
278  double primalBound() const { return primalBound_; }
279 
281 
286  void primalBound(double x);
287 
289 
293  double dualBound() const { return dualBound_; }
294 
296 
301  void dualBound(double x);
302 
304 
307  bool betterDual(double x) const;
308 
310 
318  bool primalViolated(double x) const;
319 
321 
326  bool betterPrimal(double x) const;
327 
329  double rootDualBound() const { return rootDualBound_; }
330 
332  /***
333  * This function is only correct if any primal bound better than plus/minus infinity corresponds
334  * to a feasible solution.
335  *
336  * \return true If a feasible solution of the optimization problem has been found, false otherwise.
337  */
338  bool feasibleFound() const;
340 
342  ENUMSTRAT enumerationStrategy() const { return enumerationStrategy_; }
343 
345 
348  void enumerationStrategy(ENUMSTRAT strat) { enumerationStrategy_ = strat; }
349 
363  virtual int enumerationStrategy(const Sub *s1, const Sub *s2);
364 
366 
379  bool guaranteed() const;
380 
382 
388  double guarantee() const;
389 
391 
395  void printGuarantee() const;
396 
398 
406  bool check() const;
407 
420  bool knownOptimum(double &optVal) const;
421 
423  virtual void output() const { }
424 
431  bool cutting() const { return cutting_; }
432 
439  bool pricing() const { return pricing_; }
440 
442  const OptSense *optSense() const { return &optSense_; }
443 
445  History *history() const { return history_; }
446 
448  OpenSub *openSub() const { return openSub_; }
449 
451  StandardPool<Constraint, Variable> *conPool() const { return conPool_; }
452 
454  StandardPool<Constraint, Variable> *cutPool() const { return cutPool_; }
455 
457  StandardPool<Variable, Constraint> *varPool() const { return varPool_; }
458 
460 
463  Sub *root() const { return root_; }
464 
470  Sub *rRoot() const { return rRoot_; }
471 
473  STATUS status() const { return status_; }
474 
476  const string &problemName() const { return problemName_; }
477 
479  const ogdf::StopwatchWallClock *totalCowTime() const { return &totalCowTime_; }
480 
482  inline bool solveApprox() const { return solveApprox_; }
483 
485  const ogdf::StopwatchCPU *totalTime() const { return &totalTime_; }
486 
488  const ogdf::StopwatchCPU *lpTime() const { return &lpTime_; }
489 
491  const ogdf::StopwatchCPU *lpSolverTime() const { return &lpSolverTime_; }
492 
494  const ogdf::StopwatchCPU *separationTime() const { return &separationTime_; }
495 
497  const ogdf::StopwatchCPU *improveTime() const { return &improveTime_; }
498 
500  const ogdf::StopwatchCPU *pricingTime() const { return &pricingTime_; }
501 
503  const ogdf::StopwatchCPU *branchingTime() const { return &branchingTime_; }
504 
506  int nSub() const { return nSub_; }
507 
509  int nLp() const { return nLp_; }
510 
512  int highestLevel() const { return highestLevel_; }
513 
515  int nNewRoot() const { return nNewRoot_; }
516 
518  int nSubSelected() const { return nSubSelected_; }
519 
521  void printParameters() const;
522 
524  BRANCHINGSTRAT branchingStrategy() const { return branchingStrategy_; }
525 
527 
530  void branchingStrategy(BRANCHINGSTRAT strat) { branchingStrategy_ = strat; }
531 
533  OSISOLVER defaultLpSolver() const { return defaultLpSolver_; }
534 
536 
539  void defaultLpSolver(OSISOLVER osiSolver) { defaultLpSolver_ = osiSolver; }
540 
541  LpMasterOsi *lpMasterOsi() const { return lpMasterOsi_; }
542 
544  int nBranchingVariableCandidates() const { return nBranchingVariableCandidates_; }
545 
547 
551  void nBranchingVariableCandidates(int n);
552 
554  int nStrongBranchingIterations() const { return nStrongBranchingIterations_; }
555 
557 
560  void nStrongBranchingIterations(int n);
561 
563  double requiredGuarantee() const { return requiredGuarantee_; }
564 
566 
573  void requiredGuarantee(double g);
574 
576 
579  int maxLevel() const { return maxLevel_; }
580 
582 
587  void maxLevel(int ml);
588 
590 
593  int maxNSub() const { return maxNSub_; }
594 
596 
601  void maxNSub(int ml);
602 
604  int64_t maxCpuTime() const { return maxCpuTime_; }
605 
607  string maxCpuTimeAsString() const;
608 
610 
613  void maxCpuTime(const string &t);
614 
616  void maxCpuTime(int64_t seconds) { maxCpuTime_ = seconds; }
617 
619  void maxCpuTime(int hour, int min, int sec);
620 
622  int64_t maxCowTime() const { return maxCowTime_; }
623 
625  string maxCowTimeAsString() const;
626 
628  void maxCowTime(int64_t seconds) { maxCowTime_ = seconds; }
629 
631 
634  void maxCowTime(const string &t);
635 
637  bool objInteger() const { return objInteger_; }
638 
640 
643  void objInteger(bool b) { objInteger_ = b; }
644 
646  int tailOffNLp() const { return tailOffNLp_; }
647 
649 
655  void tailOffNLp(int n) { tailOffNLp_ = n; }
656 
658  double tailOffPercent() const { return tailOffPercent_; }
659 
661 
667  void tailOffPercent(double p);
668 
670 
673  bool delayedBranching(int nOpt) const;
674 
676 
687  void dbThreshold(int threshold) { dbThreshold_ = threshold; }
688 
690 
693  int dbThreshold() const { return dbThreshold_; }
694 
696 
700  int minDormantRounds() const { return minDormantRounds_; }
701 
703 
706  void minDormantRounds(int nRounds) { minDormantRounds_ = nRounds; }
707 
709  PRIMALBOUNDMODE pbMode() const { return pbMode_; }
710 
712 
715  void pbMode(PRIMALBOUNDMODE mode) { pbMode_ = mode; }
716 
718 
725  int pricingFreq() const { return pricingFreq_; }
726 
728 
731  void pricingFreq(int f);
732 
734  int skipFactor() const { return skipFactor_; }
735 
737 
740  void skipFactor(int f);
741 
743 
746  void skippingMode(SKIPPINGMODE mode) { skippingMode_ = mode; }
747 
749  SKIPPINGMODE skippingMode() const { return skippingMode_; }
750 
752  CONELIMMODE conElimMode() const { return conElimMode_; }
753 
755 
758  void conElimMode(CONELIMMODE mode) { conElimMode_ = mode; }
759 
761  VARELIMMODE varElimMode() const { return varElimMode_; }
762 
764 
767  void varElimMode(VARELIMMODE mode) { varElimMode_ = mode; }
768 
770  double conElimEps() const { return conElimEps_; }
771 
773 
776  void conElimEps(double eps) { conElimEps_ = eps; }
777 
779  double varElimEps() const { return varElimEps_; }
780 
782 
785  void varElimEps(double eps) { varElimEps_ = eps; }
786 
788  int varElimAge() const { return varElimAge_; }
789 
791 
794  void varElimAge(int age) { varElimAge_ = age; }
795 
797  int conElimAge() const { return conElimAge_; }
798 
800 
803  void conElimAge(int age) { conElimAge_ = age; }
804 
809  bool fixSetByRedCost() const { return fixSetByRedCost_; }
810 
812 
816  void fixSetByRedCost(bool on) { fixSetByRedCost_ = on; }
817 
822  bool printLP() const { return printLP_; }
823 
825 
829  void printLP(bool on) { printLP_ = on; }
830 
832  int maxConAdd() const { return maxConAdd_; }
833 
835  /***
836  * \param max The maximal number of constraints.
837  */
838  void maxConAdd(int max) { maxConAdd_ = max; }
839 
841  int maxConBuffered() const { return maxConBuffered_; }
842 
844 
850  void maxConBuffered(int max) { maxConBuffered_ = max; }
851 
853  int maxVarAdd() const { return maxVarAdd_; }
854 
856 
859  void maxVarAdd(int max) { maxVarAdd_ = max; }
860 
862  int maxVarBuffered() const { return maxVarBuffered_; }
863 
865 
871  void maxVarBuffered(int max) { maxVarBuffered_ = max; }
872 
874  int maxIterations() const { return maxIterations_; }
875 
877 
886  void maxIterations(int max) { maxIterations_ = max; }
887 
892  bool eliminateFixedSet() const { return eliminateFixedSet_; }
893 
895 
899  void eliminateFixedSet(bool turnOn) { eliminateFixedSet_ = turnOn; }
900 
906  bool newRootReOptimize() const { return newRootReOptimize_; }
907 
909 
912  void newRootReOptimize(bool on) { newRootReOptimize_ = on; }
913 
915  const string &optimumFileName() const { return optimumFileName_; }
916 
918 
921  void optimumFileName(const char *name) { optimumFileName_ = name; }
922 
929  bool showAverageCutDistance() const { return showAverageCutDistance_; }
930 
932 
935  void showAverageCutDistance(bool on) { showAverageCutDistance_ = on; }
936 
938  VBCMODE vbcLog() const { return VbcLog_; }
939 
941 
947  void vbcLog(VBCMODE mode) { VbcLog_ = mode; }
948 
950 
955  virtual bool setSolverParameters(OsiSolverInterface* interface, bool solverIsApprox);
956 
957 protected:
958 
960 
978  virtual void initializePools(
979  ArrayBuffer<Constraint*> &constraints,
980  ArrayBuffer<Variable*> &variables,
981  int varPoolSize,
982  int cutPoolSize,
983  bool dynamicCutPool = false);
984 
986 
1008  virtual void initializePools(
1009  ArrayBuffer<Constraint*> &constraints,
1011  ArrayBuffer<Variable*> &variables,
1012  int varPoolSize,
1013  int cutPoolSize,
1014  bool dynamicCutPool = false);
1015 
1023  void initializeOptSense(OptSense::SENSE sense) { optSense_.sense(sense); }
1024 
1026 
1039  int bestFirstSearch(const Sub* s1, const Sub* s2) const;
1040 
1066  virtual int equalSubCompare(const Sub *s1, const Sub *s2) const;
1067 
1069 
1080  int depthFirstSearch(const Sub* s1, const Sub* s2) const;
1081 
1083 
1095  int breadthFirstSearch(const Sub* s1, const Sub* s2) const;
1096 
1097 
1099 
1107  int diveAndBestFirstSearch(const Sub *s1, const Sub* s2) const;
1108 
1114  virtual void initializeParameters() { }
1115 
1117 
1122  virtual Sub *firstSub() = 0;
1123 
1130  virtual void initializeOptimization() { }
1131 
1138  virtual void terminateOptimization() { }
1139 
1141  virtual void assignParameters();
1142 
1143 private:
1144 
1146 
1163  void _initializeParameters();
1164 
1165  void _createLpMasters();
1166  void _deleteLpMasters();
1167  void _initializeLpParameters();
1168 
1170 
1173  void _setDefaultLpParameters();
1174 
1176 
1179  void _printLpParameters() const;
1180 
1182 
1185  void _outputLpStatistics() const;
1186 
1188 
1194  Sub *select();
1195 
1196  int initLP();
1197 
1199 
1205  void writeTreeInterface(const string &info, bool time = true) const;
1206 
1212  void treeInterfaceNewNode(Sub *sub) const;
1213 
1215  void treeInterfacePaintNode(int id, int color) const;
1216 
1218  void treeInterfaceLowerBound(double lb) const;
1219 
1221  void treeInterfaceUpperBound(double ub) const;
1222 
1224  void treeInterfaceNodeBounds(int id, double lb, double ub);
1225 
1227 
1230  void newSub(int level);
1231 
1233  void countLp() { ++nLp_; }
1234 
1236  void newFixed(int n) { nFixed_ += n; }
1237 
1239  void addCons(int n) { nAddCons_ += n; }
1240 
1242  void removeCons(int n) { nRemCons_ += n; }
1243 
1245  void addVars(int n) { nAddVars_ += n; }
1246 
1248  void removeVars(int n) { nRemVars_ += n; }
1249 
1251  FixCand *fixCand() const { return fixCand_; }
1252 
1254 
1261  void rRoot(Sub *newRoot, bool reoptimize);
1262 
1264  void status(STATUS stat) { status_ = stat; }
1265 
1267 
1270  void rootDualBound(double x);
1271 
1272  void theFuture();
1273 
1276 
1278 
1281 
1284 
1287 
1290 
1293 
1296 
1299 
1302 
1305 
1308 
1310 
1313 
1314 
1317 
1320 
1323 
1325  double dualBound_;
1326 
1329 
1332 
1334  bool cutting_;
1335 
1337  bool pricing_;
1338 
1341 
1344 
1347 
1349  std::ostream *treeStream_;
1350 
1352 
1356 
1358 
1362 
1364 
1368 
1370  int64_t maxCpuTime_;
1371 
1373  int64_t maxCowTime_;
1374 
1377 
1380 
1383 
1386 
1393 
1396 
1399 
1402 
1408 
1411 
1413  bool printLP_;
1414 
1417 
1420 
1423 
1426 
1429 
1432 
1438 
1441 
1447 
1450 
1453 
1455  double conElimEps_;
1456 
1458  double varElimEps_;
1459 
1462 
1465 
1468 
1471 
1474 
1477 
1479 
1482 
1485 
1488 
1491 
1493  int nSub_;
1494 
1496  int nLp_;
1497 
1500 
1502  int nFixed_;
1503 
1506 
1509 
1512 
1515 
1518 
1519  Master(const Master &rhs);
1520  const Master &operator=(const Master& rhs);
1521 };
1522 
1523 
1524 inline double Master::lowerBound() const
1525 {
1526  if (optSense_.max()) return primalBound_;
1527  else return dualBound_;
1528 }
1529 
1530 inline double Master::upperBound() const
1531 {
1532  if (optSense_.max()) return dualBound_;
1533  else return primalBound_;
1534 }
1535 
1536 }
ogdf::ArrayBuffer
An array that keeps track of the number of inserted elements; also usable as an efficient stack.
Definition: Array.h:53
abacus::Master::conPool
StandardPool< Constraint, Variable > * conPool() const
Returns a pointer to the default pool storing the constraints of the problem formulation.
Definition: master.h:451
abacus::Master::MaxCpuTime
@ MaxCpuTime
The status, if the optimization terminates since the maximum cpu time is exceeded.
Definition: master.h:88
abacus::Master::nAddCons_
int nAddCons_
The total number of added constraints.
Definition: master.h:1505
abacus::Master::nLp
int nLp() const
Returns the number of optimized linear programs (only LP-relaxations).
Definition: master.h:509
global.h
global.
abacus::Master::fixCand_
FixCand * fixCand_
The variables which are candidates for being fixed.
Definition: master.h:1331
abacus::Master::maxConBuffered
void maxConBuffered(int max)
Changes the maximal number of constraints that are buffered in an iteration of the cutting plane algo...
Definition: master.h:850
abacus::Master::pbMode_
PRIMALBOUNDMODE pbMode_
The mode of the primal bound initialization.
Definition: master.h:1395
abacus::FixCand
Candidates for fixing.
Definition: fixcand.h:63
abacus::Master::rootDualBound_
double rootDualBound_
The best known dual bound at the end of the optimization of the root node.
Definition: master.h:1328
abacus::Master::varElimEps_
double varElimEps_
The tolerance for the elimination of variables by the mode ReducedCost.
Definition: master.h:1458
abacus::Master::improveTime
const ogdf::StopwatchCPU * improveTime() const
Returns a pointer to the timer measuring the cpu time spent in the heuristics for the computation of ...
Definition: master.h:497
abacus::Master::maxNSub
int maxNSub() const
Returns the maximal number of subproblems to be processed.
Definition: master.h:593
abacus::Master::maxConAdd
void maxConAdd(int max)
Sets the maximal number of constraints that are added in an iteration of the cutting plane algorithm.
Definition: master.h:838
abacus::Master::dualBound_
double dualBound_
The best known dual bound.
Definition: master.h:1325
abacus::Master::conElimAge
int conElimAge() const
Returns the age for the elimination of constraints.
Definition: master.h:797
abacus::Master::XPRESS_MP
@ XPRESS_MP
Definition: master.h:209
abacus::Master::DepthFirst
@ DepthFirst
Depth-first search, i.e., select the subproblem with maximal level in the enumeration tree.
Definition: master.h:108
abacus::Master::skipFactor
int skipFactor() const
Returns the frequency of subproblems in which constraints or variables should be generated.
Definition: master.h:734
abacus::Master::problemName_
string problemName_
The name of the optimized problem.
Definition: master.h:1275
abacus::Master::openSub
OpenSub * openSub() const
Returns a pointer to the set of open subproblems.
Definition: master.h:448
ogdf::StopwatchWallClock
Implements a stopwatch measuring wall-clock time.
Definition: Stopwatch.h:183
abacus::Master::conElimEps_
double conElimEps_
The tolerance for the elimination of constraints by the mode NonBinding/.
Definition: master.h:1455
abacus::OptSense::SENSE
SENSE
The enumeration defining the sense of optimization.
Definition: optsense.h:48
abacus::Master::dbThreshold
void dbThreshold(int threshold)
Sets the number of optimizations of a subproblem until sons are created in Sub::branching().
Definition: master.h:687
ogdf::matching_blossom::infinity
TWeight infinity()
Helper function to get the maximum value for a given weight type.
Definition: utils.h:46
abacus::Master::varElimEps
double varElimEps() const
Returns the zero tolerance for the elimination of variables by the reduced cost criterion.
Definition: master.h:779
abacus::Master::rootDualBound
double rootDualBound() const
Returns the dual bound at the root node.
Definition: master.h:329
abacus::Master::tailOffPercent
double tailOffPercent() const
Returns the minimal change of the dual bound for the tailing off analysis in percent.
Definition: master.h:658
abacus::Master::Unprocessed
@ Unprocessed
The initial status, before the optimization starts.
Definition: master.h:83
abacus::Master::STATUS
STATUS
The various statuses of the optimization process.
Definition: master.h:77
abacus::Master::maxLevel
int maxLevel() const
Returns the maximal depth up to which the enumeration should be performed.
Definition: master.h:579
abacus::Master::CONELIMMODE
CONELIMMODE
This enumeration defines the ways for automatic constraint elimination during the cutting plane phase...
Definition: master.h:166
abacus::Master::cutting_
bool cutting_
If true, then constraints are generated in the optimization.
Definition: master.h:1334
abacus::Master::enumerationStrategy
ENUMSTRAT enumerationStrategy() const
Returns the enumeration strategy.
Definition: master.h:342
abacus::Master::initializeOptimization
virtual void initializeOptimization()
The default implementation of initializeOptimization() does nothing.
Definition: master.h:1130
abacus::Master::openSub_
OpenSub * openSub_
The set of open subproblems.
Definition: master.h:1289
abacus::Master::pricingFreq_
int pricingFreq_
The number of solved LPs between two additional pricing steps.
Definition: master.h:1398
abacus::Master::removeCons
void removeCons(int n)
Increments the counter for the total number of removed constraints by n.
Definition: master.h:1242
abacus::Master::lpMasterOsi
LpMasterOsi * lpMasterOsi() const
Definition: master.h:541
abacus::OptSense
Sense of optimization.
Definition: optsense.h:44
abacus::Master::pricing_
bool pricing_
If true, then variables are generated in the optimization.
Definition: master.h:1337
abacus::Master::showAverageCutDistance
void showAverageCutDistance(bool on)
Turns the output of the average distance of the added cuts from the fractional solution on or off.
Definition: master.h:935
abacus::Master::varElimAge
void varElimAge(int age)
Changes the age for the elimination of variables by the reduced cost criterion to age.
Definition: master.h:794
abacus::Master::Error
@ Error
An error occurred during the optimization process.
Definition: master.h:81
abacus::Master::nNewRoot
int nNewRoot() const
Returns the number of root changes of the remaining branch-and-cut tree.
Definition: master.h:515
abacus::Master::readParamFromFile_
bool readParamFromFile_
Definition: master.h:1277
abacus::Master::separationTime
const ogdf::StopwatchCPU * separationTime() const
Returns a pointer to the timer measuring the cpu time spent in the separation of cutting planes.
Definition: master.h:494
abacus::Master::varElimMode
void varElimMode(VARELIMMODE mode)
Changes the variable elimination mode to mode.
Definition: master.h:767
abacus::Master::history_
History * history_
The solution history.
Definition: master.h:1292
abacus::Master::rRoot_
Sub * rRoot_
The root node of the remaining enumeration tree.
Definition: master.h:1286
abacus::Master::skippingMode
void skippingMode(SKIPPINGMODE mode)
Sets the skipping strategy to mode.
Definition: master.h:746
abacus::Master::treeStream_
std::ostream * treeStream_
A pointer to the log stream for the VBC-Tool.
Definition: master.h:1349
abacus::Master::maxCowTime
int64_t maxCowTime() const
Returns the maximal wall-clock time (in seconds) which can be used by the optimization.
Definition: master.h:622
abacus
Definition: ILPClusterPlanarity.h:50
abacus::Master::maxConAdd
int maxConAdd() const
Returns the maximal number of constraints which should be added in every iteration of the cutting pla...
Definition: master.h:832
abacus::Master::newRootReOptimize_
bool newRootReOptimize_
If true, then an already earlier processed node is reoptimized if it becomes the new root of the rema...
Definition: master.h:1437
abacus::Master::varElimMode_
VARELIMMODE varElimMode_
The way variables are automatically eliminated in the column generation algorithm.
Definition: master.h:1452
abacus::Master::showAverageCutDistance
bool showAverageCutDistance() const
Definition: master.h:929
abacus::Master::maxCpuTime
void maxCpuTime(int64_t seconds)
Sets the maximally allowed cpu time to seconds.
Definition: master.h:616
abacus::Master::maxVarBuffered_
int maxVarBuffered_
The size of the buffer for generated variables.
Definition: master.h:1425
abacus::Master::totalCowTime
const ogdf::StopwatchWallClock * totalCowTime() const
Returns a pointer to the timer measuring the total wall clock time.
Definition: master.h:479
abacus::Master::primalBound
double primalBound() const
Returns the value of the primal bound.
Definition: master.h:278
abacus::Master::varElimAge
int varElimAge() const
Returns the age for the elimination of variables by the reduced cost criterion.
Definition: master.h:788
abacus::Master::terminateOptimization
virtual void terminateOptimization()
The default implementation of terminateOptimization() does nothing.
Definition: master.h:1138
abacus::Master::VBCMODE
VBCMODE
This enumeration defines what kind of output can be generated for the VBCTOOL.
Definition: master.h:192
abacus::Master::lpTime_
ogdf::StopwatchCPU lpTime_
The timer for the cpu time spent in the LP-interface.
Definition: master.h:1476
ogdf::StopwatchCPU
Implements a stopwatch measuring CPU time.
Definition: Stopwatch.h:157
abacus::History
Solution histories.
Definition: history.h:43
abacus::Master::nSub
int nSub() const
returns the number of generated subproblems.
Definition: master.h:506
abacus::Master::lpSolverTime_
ogdf::StopwatchCPU lpSolverTime_
Definition: master.h:1478
abacus::Master::nAddVars_
int nAddVars_
The total number of added variables.
Definition: master.h:1511
abacus::Master::conElimMode
CONELIMMODE conElimMode() const
Returns the mode for the elimination of constraints.
Definition: master.h:752
abacus::Master::branchingStrategy
BRANCHINGSTRAT branchingStrategy() const
Returns the branching strategy.
Definition: master.h:524
abacus::Master::maxConAdd_
int maxConAdd_
The maximal number of added constraints per iteration of the cutting plane algorithm.
Definition: master.h:1416
abacus::Master::pricingFreq
int pricingFreq() const
Returns the number of linear programs being solved between two additional pricing steps.
Definition: master.h:725
abacus::Master::nBranchingVariableCandidates
int nBranchingVariableCandidates() const
Returns the number of variables that should be tested for the selection of the branching variable.
Definition: master.h:544
abacus::Master::varPool_
StandardPool< Variable, Constraint > * varPool_
The default pool with the variables of the problem formulation.
Definition: master.h:1319
abacus::Master::problemName
const string & problemName() const
Returns the name of the instance being optimized (as specified in the constructor of this class).
Definition: master.h:476
abacus::Master::maxCpuTime
int64_t maxCpuTime() const
Returns the maximal cpu time (in seconds) which can be used by the optimization.
Definition: master.h:604
abacus::Master::eliminateFixedSet_
bool eliminateFixedSet_
If true, then nonbasic fixed and set variables are eliminated.
Definition: master.h:1431
abacus::Master::branchingTime_
ogdf::StopwatchCPU branchingTime_
The timer for the cpu time spent in determining the branching rules.
Definition: master.h:1490
abacus::Master::branchingStrategy_
BRANCHINGSTRAT branchingStrategy_
The branching strategy.
Definition: master.h:1298
abacus::StandardPool
Standard pools.
Definition: ILPClusterPlanarity.h:52
abacus::Master::cutPool
StandardPool< Constraint, Variable > * cutPool() const
Returns a pointer to the default pool for the generated cutting planes.
Definition: master.h:454
abacus::Master::defaultLpSolver
OSISOLVER defaultLpSolver() const
returns the Lp Solver.
Definition: master.h:533
abacus::Master::varElimMode
VARELIMMODE varElimMode() const
Returns the mode for the elimination of variables.
Definition: master.h:761
abacus::Master::maxIterations
int maxIterations() const
Returns the maximal number of iterations per subproblem optimization (-1 means no iteration limit).
Definition: master.h:874
abacus::Master::fixSetByRedCost_
bool fixSetByRedCost_
If true, then variables are fixed and set by reduced cost criteria.
Definition: master.h:1410
abacus::Master::maxVarBuffered
int maxVarBuffered() const
Returns the size of the buffer for the variables generated in the column generation algorithm.
Definition: master.h:862
abacus::Master::Processing
@ Processing
The status while the optimization is performed.
Definition: master.h:84
abacus::Master::nSubSelected
int nSubSelected() const
Returns the number of subproblems which have already been selected from the set of open subproblems.
Definition: master.h:518
abacus::Master::enumerationStrategy
void enumerationStrategy(ENUMSTRAT strat)
Changes the enumeration strategy to strat.
Definition: master.h:348
abacus::Master::newRootReOptimize
void newRootReOptimize(bool on)
Turns the reoptimization of new root nodes of the remaining branch and bound tree on or off.
Definition: master.h:912
abacus::Master::conElimMode
void conElimMode(CONELIMMODE mode)
Changes the constraint elimination mode to mode.
Definition: master.h:758
abacus::Master::conElimMode_
CONELIMMODE conElimMode_
The way constraints are automatically eliminated in the cutting plane algorithm.
Definition: master.h:1449
abacus::Master::pricing
bool pricing() const
Definition: master.h:439
ogdf::AlgorithmFailureCode::Constraint
@ Constraint
abacus::Master::maxVarAdd
void maxVarAdd(int max)
Changes the maximal number of variables that are added in an iteration of the subproblem optimization...
Definition: master.h:859
abacus::Master::maxLevel_
int maxLevel_
The maximal level in enumeration tree.
Definition: master.h:1361
abacus::LpMasterOsi
The OSI LP master.
Definition: lpmasterosi.h:43
abacus::Master::pbMode
void pbMode(PRIMALBOUNDMODE mode)
Sets the mode of the primal bound initialization to mode.
Definition: master.h:715
abacus::Master::MaxLevel
@ MaxLevel
The status, if subproblems are ignored since the maximum enumeration level is exceeded.
Definition: master.h:87
abacus::Master::initializeParameters
virtual void initializeParameters()
Is only a dummy.
Definition: master.h:1114
abacus::Master::nStrongBranchingIterations_
int nStrongBranchingIterations_
The number of simplex iterations that are performed when testing a branching variable candidate withi...
Definition: master.h:1304
abacus::Master::conElimAge_
int conElimAge_
The number of iterations an elimination criterion must be satisfied until a constraint can be removed...
Definition: master.h:1461
abacus::Master::tailOffNLp
void tailOffNLp(int n)
Sets the number of linear programs considered in the tailing off analysis to n.
Definition: master.h:655
abacus::Master::NoConElim
@ NoConElim
No constraints are eliminated.
Definition: master.h:167
abacus::Master::NoVarElim
@ NoVarElim
No variables are eliminated.
Definition: master.h:181
abacus::Master::pricingTime_
ogdf::StopwatchCPU pricingTime_
The timer for the cpu time spent in pricing.
Definition: master.h:1487
abacus::Master::varPool
StandardPool< Variable, Constraint > * varPool() const
Returns a pointer to the default pool storing the variables.
Definition: master.h:457
abacus::Master::lpTime
const ogdf::StopwatchCPU * lpTime() const
Returns a pointer to the timer measuring the cpu time spent in members of the LP-interface.
Definition: master.h:488
abacus::Master::improveTime_
ogdf::StopwatchCPU improveTime_
The timer for the cpu time spent in the heuristics for the computation of feasible solutions.
Definition: master.h:1484
abacus::Master::nSub_
int nSub_
The number of generated subproblems.
Definition: master.h:1493
abacus::Master::vbcLog
void vbcLog(VBCMODE mode)
Changes the mode of output for the Vbc-Tool to mode.
Definition: master.h:947
abacus::Master::nRemVars_
int nRemVars_
The total number of removed variables.
Definition: master.h:1514
abacus::Master::nLp_
int nLp_
The number of solved LPs.
Definition: master.h:1496
optsense.h
sense of optimization.
abacus::Master::tailOffNLp
int tailOffNLp() const
Returns the number of linear programs considered in the tailing off analysis.
Definition: master.h:646
abacus::Master::defaultLpSolver_
OSISOLVER defaultLpSolver_
The default LP-Solver.
Definition: master.h:1307
abacus::Master::printLP
bool printLP() const
Definition: master.h:822
abacus::Master::maxVarBuffered
void maxVarBuffered(int max)
Changes the maximal number of variables that are buffered in an iteration of the subproblem optimizat...
Definition: master.h:871
abacus::Master::VARELIMMODE
VARELIMMODE
This enumeration defines the ways for automatic variable elimination during the column generation alg...
Definition: master.h:180
abacus::Master::MaxNSub
@ MaxNSub
The status, if the optimization terminates since the maximum number of subproblems is reached.
Definition: master.h:89
abacus::Master::fixSetByRedCost
bool fixSetByRedCost() const
Definition: master.h:809
abacus::OptSense::Unknown
@ Unknown
Unknown optimization sense, required to recognize uninitialized object.
Definition: optsense.h:51
abacus::Master::status
STATUS status() const
Returns the status of the Master.
Definition: master.h:473
abacus::Master::nNewRoot_
int nNewRoot_
The number of changes of the root of the remaining branch-and-bound tree.
Definition: master.h:1517
abacus::Master::status_
STATUS status_
The current status of the optimization.
Definition: master.h:1467
abacus::Master::defaultLpSolver
void defaultLpSolver(OSISOLVER osiSolver)
Changes the default Lp solver to osiSolver.
Definition: master.h:539
Stopwatch.h
Declaration of stopwatch classes.
abacus::Master::removeVars
void removeVars(int n)
Increments the counter for the total number of removed variables by n.
Definition: master.h:1248
abacus::Master::addCons
void addCons(int n)
Increments the counter for the total number of added constraints by n.
Definition: master.h:1239
abacus::Master::maxNSub_
int maxNSub_
The maximal number of subproblems to be processed.
Definition: master.h:1367
abacus::Master::skippingMode_
SKIPPINGMODE skippingMode_
Either constraints are generated only every skipFactor_ subproblem (SkipByNode) only every skipFactor...
Definition: master.h:1407
abacus::Master::maxCowTime_
int64_t maxCowTime_
The maximal available wall-clock time.
Definition: master.h:1373
abacus::Master::objInteger
bool objInteger() const
If true then we assume that all feasible solutions have integral objective function values.
Definition: master.h:637
abacus::Master::dualBound
double dualBound() const
Returns the value of the dual bound.
Definition: master.h:293
abacus::Master::solveApprox
bool solveApprox() const
True, if an approximative solver should be used.
Definition: master.h:482
abacus::Master::output
virtual void output() const
Does nothing but can be redefined in derived classes for output before the timing statistics.
Definition: master.h:423
abacus::Master::pricingTime
const ogdf::StopwatchCPU * pricingTime() const
Returns a pointer to the timer measuring the cpu time spent in pricing.
Definition: master.h:500
abacus::OptSense::max
bool max() const
Returns true if it is maximization problem,, false otherwise.
Definition: optsense.h:90
abacus::Master::status
void status(STATUS stat)
Sets the status of the Master.
Definition: master.h:1264
abacus::Master::branchingStrategy
void branchingStrategy(BRANCHINGSTRAT strat)
Changes the branching strategy to strat.
Definition: master.h:530
abacus::Master::rRoot
Sub * rRoot() const
Definition: master.h:470
abacus::Master::optSense
const OptSense * optSense() const
Returns a pointer to the object holding the optimization sense of the problem.
Definition: master.h:442
abacus::Master::objInteger
void objInteger(bool b)
Sets the assumption that the objective function values of all feasible solutions are integer.
Definition: master.h:643
abacus::Master::ENUMSTRAT
ENUMSTRAT
The enumeration defining the different enumeration strategies for the branch and bound algorithm.
Definition: master.h:103
abacus::Master::totalTime_
ogdf::StopwatchCPU totalTime_
The timer for the total cpu time for the optimization.
Definition: master.h:1473
abacus::Master::conElimEps
double conElimEps() const
Returns the zero tolerance for the elimination of constraints by the slack criterion.
Definition: master.h:770
abacus::Master::varElimAge_
int varElimAge_
The number of iterations an elimination criterion must be satisfied until a variable can be removed.
Definition: master.h:1464
abacus::Master::nStrongBranchingIterations
int nStrongBranchingIterations() const
The number of simplex iterations that are performed when testing candidates for branching variables w...
Definition: master.h:554
abacus::Master::separationTime_
ogdf::StopwatchCPU separationTime_
The timer for the cpu time spent in the separation.
Definition: master.h:1481
abacus::Master::File
@ File
Output for the tree interface is written to a file.
Definition: master.h:194
abacus::Master::VbcLog_
VBCMODE VbcLog_
Ouput for the Tree Interface is generated depending on the value of this variable.
Definition: master.h:1346
abacus::Master::newFixed
void newFixed(int n)
Increments the counter of the number of fixed variables by n.
Definition: master.h:1236
abacus::Master::NonBinding
@ NonBinding
Nonbinding constraints are eliminated.
Definition: master.h:168
abacus::Master::maxConBuffered
int maxConBuffered() const
Returns the size of the buffer for generated constraints in the cutting plane algorithm.
Definition: master.h:841
abacus::Master::lowerBound
double lowerBound() const
Returns the value of the global lower bound.
Definition: master.h:1524
abacus::Master::vbcLog
VBCMODE vbcLog() const
Returns the mode of output for the Vbc-Tool.
Definition: master.h:938
abacus::Master::root
Sub * root() const
Can be used to access the root node of the branch-and-bound tree.
Definition: master.h:463
abacus::Master::nFixed_
int nFixed_
The total number of fixed variables.
Definition: master.h:1502
abacus::Master::conPool_
StandardPool< Constraint, Variable > * conPool_
The default pool with the constraints of the problem formulation.
Definition: master.h:1312
abacus::Master::skipFactor_
int skipFactor_
The frequency constraints or variables are generated depending on the skipping mode.
Definition: master.h:1401
abacus::Master::branchingTime
const ogdf::StopwatchCPU * branchingTime() const
Returns a pointer to the timer measuring the cpu time spent in finding and selecting the branching ru...
Definition: master.h:503
abacus::Master::addVars
void addVars(int n)
Increments the counter for the total number of added variables by n.
Definition: master.h:1245
abacus::Master::maxConBuffered_
int maxConBuffered_
The size of the buffer for generated cutting planes.
Definition: master.h:1419
abacus::Master::objInteger_
bool objInteger_
true, if all objective function values of feasible solutions are assumed to be integer.
Definition: master.h:1376
ogdf::AlgorithmFailureCode::Variable
@ Variable
abacus::Master::tailOffPercent_
double tailOffPercent_
The minimal change of the LP-value on the tailing off analysis.
Definition: master.h:1382
abacus::OpenSub
Maintains open subproblems.
Definition: opensub.h:49
abacus::Master::dbThreshold
int dbThreshold() const
Returns the number of optimizations of a subproblem until sons are created.
Definition: master.h:693
abacus::Master::eliminateFixedSet
bool eliminateFixedSet() const
Definition: master.h:892
abacus::Master::MaxCowTime
@ MaxCowTime
The status, if the optimization terminates since the maximum wall-clock time is exceeded.
Definition: master.h:90
abacus::Master::maxIterations
void maxIterations(int max)
Changes the default value for the maximal number of iterations of the optimization of a subproblem.
Definition: master.h:886
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
abacus::Sub
The subproblem.
Definition: sub.h:68
abacus::Master::fixSetByRedCost
void fixSetByRedCost(bool on)
Turns fixing and setting variables by reduced cost on or off.
Definition: master.h:816
abacus::Master::conElimAge
void conElimAge(int age)
Changes the age for the elimination of constraints to age.
Definition: master.h:803
abacus::Master::tailOffNLp_
int tailOffNLp_
The number of LP-iterations for the tailing off analysis.
Definition: master.h:1379
hash.h
hash table.
abacus::Master::totalCowTime_
ogdf::StopwatchWallClock totalCowTime_
The timer for the total elapsed time.
Definition: master.h:1470
abacus::Master::printLP_
bool printLP_
If true, then the linear program is output every iteration.
Definition: master.h:1413
abacus::Master::nSubSelected_
int nSubSelected_
The number of subproblems already selected from the list of open subproblems.
Definition: master.h:1343
abacus::Master::optimumFileName
void optimumFileName(const char *name)
Changes the name of the file in which the value of the optimum solution is searched.
Definition: master.h:921
abacus::Master::maxCpuTime_
int64_t maxCpuTime_
The maximal available cpu time.
Definition: master.h:1370
abacus::Master::history
History * history() const
Returns a pointer to the object storing the solution history of this branch and cut problem.
Definition: master.h:445
abacus::Master::maxIterations_
int maxIterations_
The maximal number of iterations of the cutting plane/column generation algorithm in the subproblem.
Definition: master.h:1428
abacus::Master::maxVarAdd
int maxVarAdd() const
Returns the maximal number of variables which should be added in the column generation algorithm.
Definition: master.h:853
abacus::Master::lpMasterOsi_
LpMasterOsi * lpMasterOsi_
Definition: master.h:1309
abacus::Master::upperBound
double upperBound() const
Returns the value of the global upper bound.
Definition: master.h:1530
abacus::Master::cutPool_
StandardPool< Constraint, Variable > * cutPool_
The default pool of dynamically generated constraints.
Definition: master.h:1316
abacus::Master::requiredGuarantee_
double requiredGuarantee_
The guarantee in percent which should be reached when the optimization stops.
Definition: master.h:1355
abacus::Master::BreadthFirst
@ BreadthFirst
Breadth-first search, i.e., select the subproblem with minimal level in the enumeration tree.
Definition: master.h:107
abacus::Master::conElimEps
void conElimEps(double eps)
Changes the tolerance for the elimination of constraints by the slack criterion to eps.
Definition: master.h:776
abacus::Master::lpSolverTime
const ogdf::StopwatchCPU * lpSolverTime() const
Return a pointer to the timer measuring the cpu time required by the LP solver.
Definition: master.h:491
abacus::Master::nBranchingVariableCandidates_
int nBranchingVariableCandidates_
The number of candidates that are evaluated for branching on variables.
Definition: master.h:1301
ogdf::AlgorithmFailureCode::StandardPool
@ StandardPool
abacus::Master::fixCand
FixCand * fixCand() const
Returns a pointer to the object storing the variables which are candidates for being fixed.
Definition: master.h:1251
abacus::Master::dbThreshold_
int dbThreshold_
The number of optimizations of an Sub until branching is performed.
Definition: master.h:1385
abacus::Master::countLp
void countLp()
Increments the counter for linear programs and should be called in each optimization call of the LP-r...
Definition: master.h:1233
abacus::Master::showAverageCutDistance_
bool showAverageCutDistance_
If true then the average distance of the added cutting planes is output every iteration of the cuttin...
Definition: master.h:1446
abacus::Master::totalTime
const ogdf::StopwatchCPU * totalTime() const
returns a pointer to the timer measuring the total cpu time for the optimization.
Definition: master.h:485
abacus::Master::minDormantRounds
int minDormantRounds() const
Returns the maximal number of rounds, i.e., number of subproblem optimizations, a subproblem is dorma...
Definition: master.h:700
abacus::Master::maxCowTime
void maxCowTime(int64_t seconds)
Sets the maximally allowed wall-clock time to seconds.
Definition: master.h:628
abacus::Master::primalBound_
double primalBound_
The best known primal bound.
Definition: master.h:1322
abacus::Master::highestLevel
int highestLevel() const
Returns the highest level in the tree which has been reached during the implicit enumeration.
Definition: master.h:512
abacus::Master::requiredGuarantee
double requiredGuarantee() const
The guarantee specification for the optimization.
Definition: master.h:563
ogdf::AlgorithmFailureCode::FixCand
@ FixCand
abacus::Master::pbMode
PRIMALBOUNDMODE pbMode() const
Returns the mode of the primal bound initialization.
Definition: master.h:709
abacus::Master::newRootReOptimize
bool newRootReOptimize() const
Definition: master.h:906
abacus::Master::optSense_
OptSense optSense_
The sense of the objective function.
Definition: master.h:1280
abacus::Master::Optimum
@ Optimum
The primal bound is initialized with the value of the optimum solution.
Definition: master.h:141
abacus::Master::minDormantRounds
void minDormantRounds(int nRounds)
Sets the number of rounds a subproblem should stay dormant to nRounds.
Definition: master.h:706
abacus::Master::skippingMode
SKIPPINGMODE skippingMode() const
Returns the skipping strategy.
Definition: master.h:749
abacus::Master::varElimEps
void varElimEps(double eps)
Changes the tolerance for the elimination of variables by the reduced cost criterion to eps.
Definition: master.h:785
abacus::Master::NoVbc
@ NoVbc
No output for the tree interface.
Definition: master.h:193
abacus::AbacusGlobal
Global data and functions.
Definition: global.h:57
abacus::Master::printLP
void printLP(bool on)
Turns the output of the linear program in every iteration on or off.
Definition: master.h:829
abacus::Master::nRemCons_
int nRemCons_
The total number of removed constraints.
Definition: master.h:1508
abacus::Master::BRANCHINGSTRAT
BRANCHINGSTRAT
This enumeration defines the two currently implemented branching variable selection strategies.
Definition: master.h:120
abacus::Master::PRIMALBOUNDMODE
PRIMALBOUNDMODE
This enumeration provides various methods for the initialization of the primal bound.
Definition: master.h:138
abacus::Master::minDormantRounds_
int minDormantRounds_
The minimal number of rounds, i.e., number of subproblem optimizations, a subproblem is dormant,...
Definition: master.h:1392
abacus::Master::OSISOLVER
OSISOLVER
This enumeration defines which solvers can be used to solve the LP-relaxations.
Definition: master.h:209
abacus::Master::initializeOptSense
void initializeOptSense(OptSense::SENSE sense)
Can be used to initialize the sense of the optimization in derived classes, if this has not been alre...
Definition: master.h:1023
abacus::Master::solveApprox_
bool solveApprox_
If true, then an approximative solver is used to solve linear programs.
Definition: master.h:1340
abacus::Master::CloseHalf
@ CloseHalf
Selects the variable with fractional part closest to 0.5.
Definition: master.h:121
abacus::Master::highestLevel_
int highestLevel_
The highest level which has been reached in the enumeration tree.
Definition: master.h:1499
abacus::Master::cutting
bool cutting() const
Definition: master.h:431
abacus::Master::enumerationStrategy_
ENUMSTRAT enumerationStrategy_
The enumeration strategy.
Definition: master.h:1295
abacus::Master::maxVarAdd_
int maxVarAdd_
The maximal number of added variables per iteration of the column generation algorithm.
Definition: master.h:1422
abacus::Master
The master of the optimization.
Definition: master.h:69
abacus::Master::root_
Sub * root_
The root node of the enumeration tree.
Definition: master.h:1283
abacus::Master::optimumFileName_
string optimumFileName_
The name of a file storing a list of optimum solutions of problem instances.
Definition: master.h:1440
abacus::Master::optimumFileName
const string & optimumFileName() const
Returns the name of the file that stores the optimum solutions.
Definition: master.h:915
abacus::Master::SKIPPINGMODE
SKIPPINGMODE
The way nodes are skipped for the generation of cuts.
Definition: master.h:153
abacus::Master::eliminateFixedSet
void eliminateFixedSet(bool turnOn)
Turns the elimination of fixed and set variables on or off.
Definition: master.h:899
abacus::Master::OutOfMemory
@ OutOfMemory
Definition: master.h:82