#include <ogdf/cluster/internal/CPlanarityMaster.h>
Public Member Functions | |
CPlanarityMaster (const ClusterGraph &C, int heuristicLevel=0, int heuristicRuns=2, double heuristicOEdgeBound=0.3, int heuristicNPermLists=5, int kuratowskiIterations=3, int subdivisions=10, int kSupportGraphs=3, double kuratowskiHigh=0.75, double kuratowskiLow=0.3, bool perturbation=false, double branchingGap=0.4, const char *time="00:20:00") | |
virtual | ~CPlanarityMaster () |
Destruction. | |
double | branchingOEdgeSelectGap () const |
virtual abacus::Sub * | firstSub () override |
Should return a pointer to the first subproblem of the optimization, i.e., the root node of the enumeration tree. | |
const ClusterGraph * | getClusterGraph () const |
const List< node > & | getClusterNodes (cluster c) const |
Returns reference to cluster nodes member list for c . | |
void | getClusterNodes (cluster c, List< node > &nodeList) const |
Copies cluster nodes from member list to parameter list. Should be used if node list needs to be altered. | |
void | getConnectionOptimalSolutionEdges (List< NodePair > &egdes) const override |
Returns nodePairs of connecting optimal solution edges in list edges . | |
const Graph * | getGraph () const |
double | getHeuristicFractionalBound () const |
int | getHeuristicLevel () const |
int | getHeuristicRuns () const |
double | getKBoundHigh () const |
double | getKBoundLow () const |
int | getKIterations () const |
bool | getMPHeuristic () const |
int | getNKuratowskiSupportGraphs () const |
int | getNSubdivisions () const |
int | getNumAddVariables () const |
int | getNumInactiveVars () |
const char * | getStdConstraintsFileName () |
The name of the file that contains the standard, i.e., non-cut, constraints (may be deleted by ABACUS and shouldn't be stored twice) | |
double | getStrongConstraintViolation () const |
double | getStrongVariableViolation () const |
void | heuristicLevel (int level) |
int | nMaxVars () const |
int | numberOfHeuristicPermutationLists () const |
bool | perturbation () const |
const GraphCopy * | searchSpaceGraph () const |
void | setHeuristicFractionalBound (double b) |
void | setHeuristicPermutationLists (int n) |
void | setHeuristicRuns (int n) |
void | setKBoundHigh (double n) |
void | setKBoundLow (double n) |
void | setKIterations (int n) |
void | setMPHeuristic (bool b) |
Switches use of lower bound heuristic. | |
void | setNHeuristicRuns (int n) |
void | setNKuratowskiSupportGraphs (int n) |
void | setNSubdivisions (int n) |
void | setNumAddVariables (int i) |
void | setPertubation (bool b) |
void | setSearchSpaceShrinking (bool b) |
Toggles reduction of search space (using only some bag/satchel connections) on/off. | |
void | setStrongConstraintViolation (double d) |
void | setStrongVariableViolation (double d) |
Graph * | solutionInducedGraph () override |
Returns the optimal solution induced Clustergraph. | |
void | updateBestSubGraph (List< NodePair > &connection) override |
Updates the "best" Subgraph m_solutionGraph found so far and fills connection with. | |
Public Member Functions inherited from ogdf::cluster_planarity::CP_MasterBase | |
CP_MasterBase (const ClusterGraph &C, int heuristicLevel=1, int heuristicRuns=2, double heuristicOEdgeBound=0.3, int heuristicNPermLists=5, int kuratowskiIterations=3, int subdivisions=10, int kSupportGraphs=3, double kuratowskiHigh=0.7, double kuratowskiLow=0.3, bool perturbation=false, double branchingGap=0.4, const char *time="00:05:00") | |
Construction and default values. | |
virtual | ~CP_MasterBase () |
Destruction. | |
int | addedCConstraints () const |
int | addedKConstraints () const |
double | epsilon () const |
Returns the objective function coefficient of C-edges. | |
const ClusterGraph * | getClusterGraph () const |
Returns a pointer to the given Clustergraph. | |
abacus::StandardPool< abacus::Constraint, abacus::Variable > * | getCutConnPool () |
Returns cut pool for connectivity. | |
abacus::StandardPool< abacus::Constraint, abacus::Variable > * | getCutKuraPool () |
Returns cut pool for planarity. | |
double | getDualBound () |
const Graph * | getGraph () const |
Returns a pointer to the underlying Graph. | |
double | getHeuristicFractionalBound () const |
int | getHeuristicLevel () const |
int | getHeuristicRuns () const |
double | getKBoundHigh () const |
double | getKBoundLow () const |
int | getKIterations () const |
bool | getMPHeuristic () const |
int | getNKuratowskiSupportGraphs () const |
int | getNSubdivisions () const |
int | getNumAddVariables () const |
int | getNumInactiveVars () |
double | getPrimalBound () |
const char * | getStdConstraintsFileName () |
The name of the file that contains the standard, i.e., non-cut, constraints (may be deleted by ABACUS and shouldn't be stored twice) | |
double | getStrongConstraintViolation () const |
double | getStrongVariableViolation () const |
void | heuristicLevel (int level) |
double | intGap () |
Returns a value that allows to distinguish result values when connection edges (tiny negative cost) are added. | |
int | nMaxVars () const |
Returns the number of variables. | |
int | numberOfHeuristicPermutationLists () const |
bool | perturbation () const |
void | setHeuristicFractionalBound (double b) |
void | setHeuristicPermutationLists (int n) |
void | setHeuristicRuns (int n) |
void | setKBoundHigh (double n) |
void | setKBoundLow (double n) |
void | setKIterations (int n) |
void | setMPHeuristic (bool b) |
Switches use of lower bound heuristic. | |
void | setNHeuristicRuns (int n) |
void | setNKuratowskiSupportGraphs (int n) |
void | setNSubdivisions (int n) |
void | setNumAddVariables (int i) |
void | setPertubation (bool b) |
void | setPortaFile (bool b) |
If set to true, PORTA output is written in a file. | |
void | setStrongConstraintViolation (double d) |
void | setStrongVariableViolation (double d) |
void | setTimeLimit (const char *s) |
void | updateAddedCCons (int n) |
void | updateAddedKCons (int n) |
bool & | useDefaultCutPool () |
Returns true if default cut pool is used. Otherwise, separate connectivity and Kuratowski pools are generated and used. | |
Public Member Functions inherited from abacus::Master | |
Master (const char *problemName, bool cutting, bool pricing, OptSense::SENSE optSense=OptSense::Unknown, double eps=1.0e-4, double machineEps=1.0e-7, double infinity=1.0e30, bool readParamFromFile=false) | |
The constructor. | |
virtual | ~Master () |
The destructor. | |
BRANCHINGSTRAT | branchingStrategy () const |
Returns the branching strategy. | |
void | branchingStrategy (BRANCHINGSTRAT strat) |
Changes the branching strategy to strat. | |
const ogdf::StopwatchCPU * | branchingTime () const |
Returns a pointer to the timer measuring the cpu time spent in finding and selecting the branching rules. | |
bool | check () const |
Can be used to control the correctness of the optimization if the value of the optimum solution has been loaded. | |
int | conElimAge () const |
Returns the age for the elimination of constraints. | |
void | conElimAge (int age) |
Changes the age for the elimination of constraints to age. | |
double | conElimEps () const |
Returns the zero tolerance for the elimination of constraints by the slack criterion. | |
void | conElimEps (double eps) |
Changes the tolerance for the elimination of constraints by the slack criterion to eps. | |
CONELIMMODE | conElimMode () const |
Returns the mode for the elimination of constraints. | |
void | conElimMode (CONELIMMODE mode) |
Changes the constraint elimination mode to mode. | |
StandardPool< Constraint, Variable > * | conPool () const |
Returns a pointer to the default pool storing the constraints of the problem formulation. | |
StandardPool< Constraint, Variable > * | cutPool () const |
Returns a pointer to the default pool for the generated cutting planes. | |
bool | cutting () const |
int | dbThreshold () const |
Returns the number of optimizations of a subproblem until sons are created. | |
void | dbThreshold (int threshold) |
Sets the number of optimizations of a subproblem until sons are created in Sub::branching(). | |
OSISOLVER | defaultLpSolver () const |
returns the Lp Solver. | |
void | defaultLpSolver (OSISOLVER osiSolver) |
Changes the default Lp solver to osiSolver. | |
bool | delayedBranching (int nOpt) const |
Returns true if the number of optimizations nOpt of a subproblem exceeds the delayed branching threshold, false otherwise. | |
bool | eliminateFixedSet () const |
void | eliminateFixedSet (bool turnOn) |
Turns the elimination of fixed and set variables on or off. | |
ENUMSTRAT | enumerationStrategy () const |
Returns the enumeration strategy. | |
virtual int | enumerationStrategy (const Sub *s1, const Sub *s2) |
Analyzes the enumeration strategy set in the parameter file .abacus and calls the corresponding comparison function for the subproblems s1 and s2. | |
void | enumerationStrategy (ENUMSTRAT strat) |
Changes the enumeration strategy to strat. | |
bool | fixSetByRedCost () const |
void | fixSetByRedCost (bool on) |
Turns fixing and setting variables by reduced cost on or off. | |
double | guarantee () const |
Can be used to access the guarantee which can be given for the best known feasible solution. | |
bool | guaranteed () const |
Can be used to check if the guarantee requirements are fulfilled. | |
int | highestLevel () const |
Returns the highest level in the tree which has been reached during the implicit enumeration. | |
History * | history () const |
Returns a pointer to the object storing the solution history of this branch and cut problem. | |
const ogdf::StopwatchCPU * | improveTime () const |
Returns a pointer to the timer measuring the cpu time spent in the heuristics for the computation of feasible solutions. | |
bool | knownOptimum (double &optVal) const |
Opens the file specified with the parameter OptimumFileName in the configuration file .abacus and tries to find a line with the name of the problem instance (as specified in the constructor of Master) as first string. | |
LpMasterOsi * | lpMasterOsi () const |
const ogdf::StopwatchCPU * | lpSolverTime () const |
Return a pointer to the timer measuring the cpu time required by the LP solver. | |
const ogdf::StopwatchCPU * | lpTime () const |
Returns a pointer to the timer measuring the cpu time spent in members of the LP-interface. | |
int | maxConAdd () const |
Returns the maximal number of constraints which should be added in every iteration of the cutting plane algorithm. | |
void | maxConAdd (int max) |
Sets the maximal number of constraints that are added in an iteration of the cutting plane algorithm. | |
int | maxConBuffered () const |
Returns the size of the buffer for generated constraints in the cutting plane algorithm. | |
void | maxConBuffered (int max) |
Changes the maximal number of constraints that are buffered in an iteration of the cutting plane algorithm. | |
int64_t | maxCowTime () const |
Returns the maximal wall-clock time (in seconds) which can be used by the optimization. | |
void | maxCowTime (const string &t) |
Sets the maximally allowed wall-clock time for the optimization to t. | |
void | maxCowTime (int64_t seconds) |
Sets the maximally allowed wall-clock time to seconds. | |
string | maxCowTimeAsString () const |
Returns the maximal wall-clock time (as string hh:mm:ss ) which can be used by the optimization. | |
int64_t | maxCpuTime () const |
Returns the maximal cpu time (in seconds) which can be used by the optimization. | |
void | maxCpuTime (const string &t) |
Sets the maximally allowed cpu time for the optimization to t. | |
void | maxCpuTime (int hour, int min, int sec) |
Sets the maximally allowed cpu time for the optimization to hour, min, sec. | |
void | maxCpuTime (int64_t seconds) |
Sets the maximally allowed cpu time to seconds. | |
string | maxCpuTimeAsString () const |
Returns the maximal cpu time (as string hh:mm:ss ) which can be used by the optimization. | |
int | maxIterations () const |
Returns the maximal number of iterations per subproblem optimization (-1 means no iteration limit). | |
void | maxIterations (int max) |
Changes the default value for the maximal number of iterations of the optimization of a subproblem. | |
int | maxLevel () const |
Returns the maximal depth up to which the enumeration should be performed. | |
void | maxLevel (int ml) |
This version of the function maxLevel() changes the maximal enumeration depth. | |
int | maxNSub () const |
Returns the maximal number of subproblems to be processed. | |
void | maxNSub (int ml) |
Changes the maximal number of subproblems to ml. | |
int | maxVarAdd () const |
Returns the maximal number of variables which should be added in the column generation algorithm. | |
void | maxVarAdd (int max) |
Changes the maximal number of variables that are added in an iteration of the subproblem optimization. | |
int | maxVarBuffered () const |
Returns the size of the buffer for the variables generated in the column generation algorithm. | |
void | maxVarBuffered (int max) |
Changes the maximal number of variables that are buffered in an iteration of the subproblem optimization. | |
int | minDormantRounds () const |
Returns the maximal number of rounds, i.e., number of subproblem optimizations, a subproblem is dormant. | |
void | minDormantRounds (int nRounds) |
Sets the number of rounds a subproblem should stay dormant to nRounds. | |
int | nBranchingVariableCandidates () const |
Returns the number of variables that should be tested for the selection of the branching variable. | |
void | nBranchingVariableCandidates (int n) |
Sets the number of tested branching variable candidates to n. | |
bool | newRootReOptimize () const |
void | newRootReOptimize (bool on) |
Turns the reoptimization of new root nodes of the remaining branch and bound tree on or off. | |
int | nLp () const |
Returns the number of optimized linear programs (only LP-relaxations). | |
int | nNewRoot () const |
Returns the number of root changes of the remaining branch-and-cut tree. | |
int | nStrongBranchingIterations () const |
The number of simplex iterations that are performed when testing candidates for branching variables within strong branching. | |
void | nStrongBranchingIterations (int n) |
Sets the number of simplex iterations that are performed when testing candidates for branching variables within strong branching. | |
int | nSub () const |
returns the number of generated subproblems. | |
int | nSubSelected () const |
Returns the number of subproblems which have already been selected from the set of open subproblems. | |
bool | objInteger () const |
If true then we assume that all feasible solutions have integral objective function values. | |
void | objInteger (bool b) |
Sets the assumption that the objective function values of all feasible solutions are integer. | |
OpenSub * | openSub () const |
Returns a pointer to the set of open subproblems. | |
STATUS | optimize () |
Performs the optimization by branch-and-bound. | |
const string & | optimumFileName () const |
Returns the name of the file that stores the optimum solutions. | |
void | optimumFileName (const char *name) |
Changes the name of the file in which the value of the optimum solution is searched. | |
const OptSense * | optSense () const |
Returns a pointer to the object holding the optimization sense of the problem. | |
virtual void | output () const |
Does nothing but can be redefined in derived classes for output before the timing statistics. | |
PRIMALBOUNDMODE | pbMode () const |
Returns the mode of the primal bound initialization. | |
void | pbMode (PRIMALBOUNDMODE mode) |
Sets the mode of the primal bound initialization to mode. | |
bool | pricing () const |
int | pricingFreq () const |
Returns the number of linear programs being solved between two additional pricing steps. | |
void | pricingFreq (int f) |
Sets the number of linear programs being solved between two additional pricing steps to f. | |
const ogdf::StopwatchCPU * | pricingTime () const |
Returns a pointer to the timer measuring the cpu time spent in pricing. | |
void | printGuarantee () const |
Writes the guarantee nicely formated on the output stream associated with this object. | |
bool | printLP () const |
void | printLP (bool on) |
Turns the output of the linear program in every iteration on or off. | |
void | printParameters () const |
Writes all parameters of the class Master together with their values to the global output stream. | |
const string & | problemName () const |
Returns the name of the instance being optimized (as specified in the constructor of this class). | |
double | requiredGuarantee () const |
The guarantee specification for the optimization. | |
void | requiredGuarantee (double g) |
Changes the guarantee specification tp g. | |
Sub * | root () const |
Can be used to access the root node of the branch-and-bound tree. | |
Sub * | rRoot () const |
const ogdf::StopwatchCPU * | separationTime () const |
Returns a pointer to the timer measuring the cpu time spent in the separation of cutting planes. | |
virtual bool | setSolverParameters (OsiSolverInterface *interface, bool solverIsApprox) |
Sets solver specific parameters. | |
bool | showAverageCutDistance () const |
void | showAverageCutDistance (bool on) |
Turns the output of the average distance of the added cuts from the fractional solution on or off. | |
int | skipFactor () const |
Returns the frequency of subproblems in which constraints or variables should be generated. | |
void | skipFactor (int f) |
Sets the frequency for constraint and variable generation to f. | |
SKIPPINGMODE | skippingMode () const |
Returns the skipping strategy. | |
void | skippingMode (SKIPPINGMODE mode) |
Sets the skipping strategy to mode. | |
bool | solveApprox () const |
True, if an approximative solver should be used. | |
STATUS | status () const |
Returns the status of the Master. | |
int | tailOffNLp () const |
Returns the number of linear programs considered in the tailing off analysis. | |
void | tailOffNLp (int n) |
Sets the number of linear programs considered in the tailing off analysis to n. | |
double | tailOffPercent () const |
Returns the minimal change of the dual bound for the tailing off analysis in percent. | |
void | tailOffPercent (double p) |
Sets the minimal change of the dual bound for the tailing off analysis to p. | |
const ogdf::StopwatchWallClock * | totalCowTime () const |
Returns a pointer to the timer measuring the total wall clock time. | |
const ogdf::StopwatchCPU * | totalTime () const |
returns a pointer to the timer measuring the total cpu time for the optimization. | |
int | varElimAge () const |
Returns the age for the elimination of variables by the reduced cost criterion. | |
void | varElimAge (int age) |
Changes the age for the elimination of variables by the reduced cost criterion to age. | |
double | varElimEps () const |
Returns the zero tolerance for the elimination of variables by the reduced cost criterion. | |
void | varElimEps (double eps) |
Changes the tolerance for the elimination of variables by the reduced cost criterion to eps. | |
VARELIMMODE | varElimMode () const |
Returns the mode for the elimination of variables. | |
void | varElimMode (VARELIMMODE mode) |
Changes the variable elimination mode to mode. | |
StandardPool< Variable, Constraint > * | varPool () const |
Returns a pointer to the default pool storing the variables. | |
VBCMODE | vbcLog () const |
Returns the mode of output for the Vbc-Tool. | |
void | vbcLog (VBCMODE mode) |
Changes the mode of output for the Vbc-Tool to mode. | |
double | lowerBound () const |
Returns the value of the global lower bound. | |
double | upperBound () const |
Returns the value of the global upper bound. | |
double | primalBound () const |
Returns the value of the primal bound. | |
void | primalBound (double x) |
Sets the primal bound to x and makes a new entry in the solution history. | |
double | dualBound () const |
Returns the value of the dual bound. | |
void | dualBound (double x) |
Sets the dual bound to x and makes a new entry in the solution history. | |
bool | betterDual (double x) const |
Returns true if x is better than the best known dual bound; false otherwise. | |
bool | primalViolated (double x) const |
Can be used to compare a value with the one of the best known primal bound. | |
bool | betterPrimal (double x) const |
Can be used to check if a value is better than the best know primal bound. | |
double | rootDualBound () const |
Returns the dual bound at the root node. | |
bool | feasibleFound () const |
We use this function, e.g., to adapt the enumeration strategy in the DiveAndBest-Strategy. | |
Public Member Functions inherited from abacus::AbacusGlobal | |
AbacusGlobal (double eps=1.0e-4, double machineEps=1.0e-7, double infinity=1.0e32) | |
The constructor. | |
virtual | ~AbacusGlobal () |
The destructor. | |
void | assignParameter (bool ¶m, const char *name) const |
See AbacusGlobal::assignParameter(int&,const char*,int,int) for a description. | |
void | assignParameter (bool ¶m, const char *name, bool defVal) const |
See AbacusGlobal::assignParameter(int&,const char*,int,int) for a description. | |
void | assignParameter (char ¶m, const char *name, const char *feasible, char defVal) const |
See AbacusGlobal::assignParameter(int&,const char*,int,int) for a description. | |
void | assignParameter (char ¶m, const char *name, const char *feasible=nullptr) const |
See AbacusGlobal::assignParameter(int&,const char*,int,int) for a description. | |
void | assignParameter (double ¶m, const char *name, double minVal, double maxVal) const |
See AbacusGlobal::assignParameter(int&,const char*,int,int) for a description. | |
void | assignParameter (double ¶m, const char *name, double minVal, double maxVal, double defVal) const |
See AbacusGlobal::assignParameter(int&,const char*,int,int) for a description. | |
void | assignParameter (int ¶m, const char *name, int minVal, int maxVal) const |
Searches for parameter name in the parameter table and returns its value in param. | |
void | assignParameter (int ¶m, const char *name, int minVal, int maxVal, int defVal) const |
See AbacusGlobal::assignParameter(int&,const char*,int,int) for a description. | |
void | assignParameter (string ¶m, const char *name, unsigned nFeasible, const char *feasible[], const char *defVal) const |
See AbacusGlobal::assignParameter(int&,const char*,int,int) for a description. | |
void | assignParameter (string ¶m, const char *name, unsigned nFeasible=0, const char *feasible[]=nullptr) const |
See AbacusGlobal::assignParameter(int&,const char*,int,int) for a description. | |
void | assignParameter (unsigned ¶m, const char *name, unsigned minVal, unsigned maxVal) const |
See AbacusGlobal::assignParameter(int&,const char*,int,int) for a description. | |
void | assignParameter (unsigned ¶m, const char *name, unsigned minVal, unsigned maxVal, unsigned defVal) const |
See AbacusGlobal::assignParameter(int&,const char*,int,int) for a description. | |
double | eps () const |
Returns the zero tolerance. | |
void | eps (double e) |
Sets the zero tolerance to e. | |
bool | equal (double x, double y) const |
Returns whether the absolute difference between x and y is less than the machine dependent zero tolerance. | |
int | findParameter (const char *name, const char *feasible) const |
See AbacusGlobal::findParameter(const char *name, unsigned nFeasible, const int *feasible) for description. | |
int | findParameter (const char *name, unsigned nFeasible, const char *feasible[]) const |
See AbacusGlobal::findParameter(const char *name, unsigned nFeasible, const int *feasible) for description. | |
int | findParameter (const char *name, unsigned nFeasible, const int *feasible) const |
Searches for parameter name in the parameter table. | |
int | getParameter (const char *name, bool ¶m) const |
int | getParameter (const char *name, char ¶m) const |
int | getParameter (const char *name, double ¶m) const |
int | getParameter (const char *name, int ¶m) const |
Searches for parameter name in the parameter table and returns its value in param. | |
int | getParameter (const char *name, string ¶m) const |
int | getParameter (const char *name, unsigned int ¶m) const |
double | infinity () const |
Provides a floating point value of "infinite" size. | |
void | infinity (double x) |
Sets the "infinite value" to x. | |
void | insertParameter (const char *name, const char *value) |
Inserts parameter name with value value into the parameter table. | |
bool | isInfinity (double x) const |
Returns true if x is regarded as "infinite" large, false otherwise. | |
bool | isInteger (double x) const |
Returns whether the value x differs at most by the machine dependent zero tolerance from an integer value. | |
bool | isInteger (double x, double eps) const |
Returns whether the value x differs at most by eps from an integer value. | |
bool | isMinusInfinity (double x) const |
Returns true if x is regarded as infinite small, false otherwise. | |
double | machineEps () const |
Provides a machine dependent zero tolerance. | |
void | machineEps (double e) |
Sets the machine dependent zero tolerance to e. | |
void | readParameters (const string &fileName) |
Opens the parameter file fileName, reads all parameters, and inserts them in the parameter table. | |
Public Member Functions inherited from abacus::AbacusRoot | |
virtual | ~AbacusRoot () |
The destructor. | |
Protected Member Functions | |
void | addExternalConnections (cluster c, List< CPlanarEdgeVar * > &connectVars) |
Create variables for external cluster connections in case we search only in the bag-reduced search space. | |
void | addInnerConnections (cluster c, List< CPlanarEdgeVar * > &connectVars) |
Adds inner cluster connection variables in bag-reduced search space. | |
void | createInitialVariables (List< CPlanarEdgeVar * > &initVars) override |
All variables that have to be present at start of optimization are created here. Their number is returned. | |
bool | goodVar (node a, node b) override |
Node pair is potential candidate for new edge variable. | |
double | heuristicInitialLowerBound () override |
virtual void | initializeOptimization () override |
The default implementation of initializeOptimization() does nothing. | |
bool | isCP () override |
Derives and returns c-planarity property either directly or indirectly from computation results. | |
virtual void | terminateOptimization () override |
Function that is invoked at the end of the optimization. Does nothing but output in CP_MasterBase. | |
Protected Member Functions inherited from ogdf::cluster_planarity::CP_MasterBase | |
void | clearActiveRepairs () |
double | getDoubleTime (const Stopwatch *act) |
Protected Member Functions inherited from abacus::Master | |
virtual void | assignParameters () |
Assigns the parameters that were read from a file to the member variables of the master. | |
int | bestFirstSearch (const Sub *s1, const Sub *s2) const |
Implements the best first search enumeration. | |
int | breadthFirstSearch (const Sub *s1, const Sub *s2) const |
Implements the breadth first search enumeration strategy, i.e., the subproblem with minimum level is selected. | |
int | depthFirstSearch (const Sub *s1, const Sub *s2) const |
Implements the depth first search enumeration strategy, i.e., the subproblem with maximum level is selected. | |
int | diveAndBestFirstSearch (const Sub *s1, const Sub *s2) const |
Performs depth-first search until a feasible solution is found, then the search process is continued with best-first search. | |
virtual int | equalSubCompare (const Sub *s1, const Sub *s2) const |
Is called from the function bestFirstSearch() and from the function depthFirstSearch() if the subproblems s1 and s2 have the same priority. | |
void | initializeOptSense (OptSense::SENSE sense) |
Can be used to initialize the sense of the optimization in derived classes, if this has not been already performed when the constructor of Master has been called. | |
virtual void | initializeParameters () |
Is only a dummy. | |
virtual void | initializePools (ArrayBuffer< Constraint * > &constraints, ArrayBuffer< Constraint * > &cuts, ArrayBuffer< Variable * > &variables, int varPoolSize, int cutPoolSize, bool dynamicCutPool=false) |
Is overloaded such that also a first set of cutting planes can be inserted into the cutting plane pool. | |
virtual void | initializePools (ArrayBuffer< Constraint * > &constraints, ArrayBuffer< Variable * > &variables, int varPoolSize, int cutPoolSize, bool dynamicCutPool=false) |
Sets up the default pools for variables, constraints, and cutting planes. | |
Private Member Functions | |
double | clusterConnection (cluster c, GraphCopy &GC) override |
Is invoked by heuristicInitialLowerBound() | |
void | createCompConnVars (List< CPlanarEdgeVar * > &initVars) override |
Creates variables for complete connectivity. | |
virtual CPlanarEdgeVar * | createVariable (ListIterator< NodePair > &it) override |
Variable creation for nodePair. | |
virtual CPlanarEdgeVar * | createVariable (node a, node b) override |
Variable creation for pair of nodes which is not stored in m_inactiveVariables. | |
virtual CPlanarEdgeVar * | createVariable (node a, node b, double lbound) |
Variable creation for pair of nodes with lower bound. | |
virtual void | generateVariablesForFeasibility (const List< ChunkConnection * > &ccons, List< CPlanarEdgeVar * > &connectVars) |
virtual void | getCoefficients (abacus::Constraint *con, const List< CPlanarEdgeVar * > &connect, List< double > &coeffs) override |
writes coefficients of all orig and connect variables in constraint con into emptied list coeffs | |
double | heuristicInitialUpperBound () override |
Computes a dual bound for the optimal solution. Tries to find as many edge-disjoint Kuratowski subdivisions as possible. If k edge-disjoint groups of subdivisions are found, the upper bound can be initialized with number of edges in underlying graph minus k. | |
virtual double | nextConnectCoeff () override |
Switch to minimization of additional edges, no delta necessary. | |
void | nodeDistances (node u, NodeArray< NodeArray< int > > &dist) override |
Computes the graphtheoretical distances of edges incident to node u . | |
Private Attributes | |
ClusterAnalysis * | m_ca |
Used to check if variables are truly needed wrt to search space reduction (Chimani/Klein) | |
ClusterArray< List< node > > | m_cNodes |
Static storage of cluster node lists to avoid repeated computation. | |
int | m_nSep |
Stores number of separation calls. | |
bool | m_shrink |
If set to true, search space reduction is performed. Reduction is only feasible when only a single independent bag exists, which has to be assured by external partitioning. | |
GraphCopy * | m_ssg |
Search space graph, input graph plus edges modelled by initial variables. | |
Friends | |
class | CPlanaritySub |
Additional Inherited Members | |
Public Types inherited from ogdf::cluster_planarity::CP_MasterBase | |
enum class | solutionState { Undefined , CPlanar , NonCPlanar } |
Public Types inherited from abacus::Master | |
enum | BRANCHINGSTRAT { CloseHalf , CloseHalfExpensive } |
This enumeration defines the two currently implemented branching variable selection strategies. More... | |
enum | CONELIMMODE { NoConElim , NonBinding , Basic } |
This enumeration defines the ways for automatic constraint elimination during the cutting plane phase. More... | |
enum | ENUMSTRAT { BestFirst , BreadthFirst , DepthFirst , DiveAndBest } |
The enumeration defining the different enumeration strategies for the branch and bound algorithm. More... | |
enum | OSISOLVER { Cbc , Clp , CPLEX , DyLP , FortMP , GLPK , MOSEK , OSL , SoPlex , SYMPHONY , XPRESS_MP , Gurobi , Csdp } |
This enumeration defines which solvers can be used to solve the LP-relaxations. More... | |
enum | PRIMALBOUNDMODE { NoPrimalBound , Optimum , OptimumOne } |
This enumeration provides various methods for the initialization of the primal bound. More... | |
enum | SKIPPINGMODE { SkipByNode , SkipByLevel } |
The way nodes are skipped for the generation of cuts. More... | |
enum | STATUS { Optimal , Error , OutOfMemory , Unprocessed , Processing , Guaranteed , MaxLevel , MaxCpuTime , MaxNSub , MaxCowTime , ExceptionFathom } |
The various statuses of the optimization process. More... | |
enum | VARELIMMODE { NoVarElim , ReducedCost } |
This enumeration defines the ways for automatic variable elimination during the column generation algorithm. More... | |
enum | VBCMODE { NoVbc , File , Pipe } |
This enumeration defines what kind of output can be generated for the VBCTOOL. More... | |
Static Public Member Functions inherited from abacus::AbacusRoot | |
static bool | ascii2bool (const string &str) |
Converts the string str to a boolean value. | |
static bool | endsWith (const string &str, const string &end) |
Returns true if str ends with end, false otherwise. | |
static double | fracPart (double x) |
Returns the absolute value of the fractional part of x. | |
static const char * | onOff (bool value) |
Converts a boolean variable to the strings "on" and "off". | |
Public Attributes inherited from ogdf::cluster_planarity::CP_MasterBase | |
solutionState | m_solState |
Static Public Attributes inherited from abacus::Master | |
static const char * | BRANCHINGSTRAT_ [] |
Literal values for the enumerators of the corresponding enumeration type. | |
static const char * | CONELIMMODE_ [] |
Literal values for the enumerators of the corresponding enumeration type. | |
static const char * | ENUMSTRAT_ [] |
Literal values for the enumerators of the corresponding enumeration type. | |
static const char * | OSISOLVER_ [] |
Array for the literal values for possible Osi solvers. | |
static const char * | PRIMALBOUNDMODE_ [] |
Literal values for the enumerators of the corresponding enumeration type. | |
static const char * | SKIPPINGMODE_ [] |
Literal values for the enumerators of the corresponding enumeration type. | |
static const char * | STATUS_ [] |
Literal values for the enumerators of the corresponding enumeration type. | |
static const char * | VARELIMMODE_ [] |
Literal values for the enumerators of the corresponding enumeration type. | |
static const char * | VBCMODE_ [] |
Literal values for the enumerators of the corresponding enumeration type. | |
Protected Attributes inherited from ogdf::cluster_planarity::CP_MasterBase | |
double | globalDualBound |
double | globalPrimalBound |
int | m_activeRepairs |
double | m_branchingGap |
const ClusterGraph * | m_C |
Pointers to the given Clustergraph and underlying Graph are stored. | |
List< NodePair > | m_connectionOneEdges |
stores optimization success state | |
abacus::StandardPool< abacus::Constraint, abacus::Variable > * | m_cutConnPool |
Cut pools for connectivity and Kuratowski constraints. | |
abacus::StandardPool< abacus::Constraint, abacus::Variable > * | m_cutKuraPool |
Kuratowski Cuts. | |
const Graph * | m_G |
double | m_heuristicFractionalBound |
int | m_heuristicLevel |
List< NodePair > | m_inactiveVariables |
double | m_kuratowskiBoundHigh |
double | m_kuratowskiBoundLow |
string * | m_maxCpuTime |
Time threshold for optimization. | |
bool | m_mpHeuristic |
Indicates if simple max planar subgraph heuristic should be used to derive lower bound if only root cluster exists. | |
int | m_nCConsAdded |
int | m_nHeuristicPermutationLists |
int | m_nHeuristicRuns |
int | m_nKConsAdded |
int | m_nKuratowskiIterations |
int | m_nKuratowskiSupportGraphs |
Keeps track of created variables. | |
int | m_nMaxVars |
int | m_nSubdivisions |
int | m_numAddVariables |
ArrayBuffer< int > | m_repairStat |
GraphCopy * | m_solutionGraph |
int | m_solvesLP |
double | m_strongConstraintViolation |
double | m_strongVariableViolation |
bool | m_usePerturbation |
NodeArray< NodeArray< bool > > | m_varCreated |
Keeps track of variables that are currently inactive during optimization. | |
int | m_varsAdded |
int | m_varsBranch |
int | m_varsCut |
int | m_varsInit |
int | m_varsKura |
int | m_varsMax |
int | m_varsPotential |
int | m_varsPrice |
Definition at line 49 of file CPlanarityMaster.h.
|
explicit |
|
virtual |
Destruction.
|
protected |
Create variables for external cluster connections in case we search only in the bag-reduced search space.
|
protected |
Adds inner cluster connection variables in bag-reduced search space.
|
inline |
Definition at line 124 of file CPlanarityMaster.h.
|
overrideprivatevirtual |
Is invoked by heuristicInitialLowerBound()
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
|
overrideprivatevirtual |
Creates variables for complete connectivity.
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
|
overrideprotectedvirtual |
All variables that have to be present at start of optimization are created here. Their number is returned.
Implements ogdf::cluster_planarity::CP_MasterBase.
|
inlineoverrideprivatevirtual |
Variable creation for nodePair.
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
Definition at line 351 of file CPlanarityMaster.h.
|
inlineoverrideprivatevirtual |
Variable creation for pair of nodes which is not stored in m_inactiveVariables.
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
Definition at line 373 of file CPlanarityMaster.h.
|
inlineprivatevirtual |
Variable creation for pair of nodes with lower bound.
Definition at line 362 of file CPlanarityMaster.h.
|
overridevirtual |
Should return a pointer to the first subproblem of the optimization, i.e., the root node of the enumeration tree.
This is a pure virtual function since a pointer to a problem specific subproblem should be returned, which is derived from the class Sub.
Implements abacus::Master.
|
privatevirtual |
|
inline |
Definition at line 88 of file CPlanarityMaster.h.
|
inline |
Returns reference to cluster nodes member list for c
.
Definition at line 213 of file CPlanarityMaster.h.
|
inline |
Copies cluster nodes from member list to parameter list. Should be used if node list needs to be altered.
Definition at line 217 of file CPlanarityMaster.h.
|
overrideprivatevirtual |
writes coefficients of all orig and connect variables in constraint con into emptied list coeffs
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
|
overridevirtual |
Returns nodePairs of connecting optimal solution edges in list edges
.
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
Definition at line 85 of file CPlanarityMaster.h.
|
inline |
Definition at line 126 of file CPlanarityMaster.h.
|
inline |
Definition at line 114 of file CPlanarityMaster.h.
|
inline |
Definition at line 116 of file CPlanarityMaster.h.
|
inline |
Definition at line 118 of file CPlanarityMaster.h.
|
inline |
Definition at line 120 of file CPlanarityMaster.h.
|
inline |
Definition at line 108 of file CPlanarityMaster.h.
|
inline |
Definition at line 130 of file CPlanarityMaster.h.
|
inline |
Definition at line 112 of file CPlanarityMaster.h.
|
inline |
Definition at line 110 of file CPlanarityMaster.h.
|
inline |
Definition at line 132 of file CPlanarityMaster.h.
|
inline |
Definition at line 210 of file CPlanarityMaster.h.
The name of the file that contains the standard, i.e., non-cut, constraints (may be deleted by ABACUS and shouldn't be stored twice)
Definition at line 208 of file CPlanarityMaster.h.
|
inline |
Definition at line 134 of file CPlanarityMaster.h.
|
inline |
Definition at line 136 of file CPlanarityMaster.h.
Node pair is potential candidate for new edge variable.
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
|
overrideprotectedvirtual |
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
|
overrideprivatevirtual |
Computes a dual bound for the optimal solution. Tries to find as many edge-disjoint Kuratowski subdivisions as possible. If k edge-disjoint groups of subdivisions are found, the upper bound can be initialized with number of edges in underlying graph minus k.
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
Definition at line 158 of file CPlanarityMaster.h.
|
overrideprotectedvirtual |
The default implementation of initializeOptimization() does nothing.
This virtual function can be used as an entrance point to perform some initializations after optimize() is called.
Implements ogdf::cluster_planarity::CP_MasterBase.
|
inlineoverrideprotectedvirtual |
Derives and returns c-planarity property either directly or indirectly from computation results.
Implements ogdf::cluster_planarity::CP_MasterBase.
Definition at line 245 of file CPlanarityMaster.h.
|
inlineoverrideprivatevirtual |
Switch to minimization of additional edges, no delta necessary.
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
Definition at line 346 of file CPlanarityMaster.h.
|
inline |
Definition at line 82 of file CPlanarityMaster.h.
|
overrideprivatevirtual |
Computes the graphtheoretical distances of edges incident to node u
.
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
|
inline |
Definition at line 128 of file CPlanarityMaster.h.
|
inline |
Definition at line 122 of file CPlanarityMaster.h.
Definition at line 95 of file CPlanarityMaster.h.
Definition at line 164 of file CPlanarityMaster.h.
Definition at line 166 of file CPlanarityMaster.h.
Definition at line 160 of file CPlanarityMaster.h.
Definition at line 154 of file CPlanarityMaster.h.
Definition at line 156 of file CPlanarityMaster.h.
Definition at line 146 of file CPlanarityMaster.h.
Switches use of lower bound heuristic.
Definition at line 169 of file CPlanarityMaster.h.
Definition at line 152 of file CPlanarityMaster.h.
Definition at line 150 of file CPlanarityMaster.h.
Definition at line 148 of file CPlanarityMaster.h.
Definition at line 171 of file CPlanarityMaster.h.
Definition at line 162 of file CPlanarityMaster.h.
Toggles reduction of search space (using only some bag/satchel connections) on/off.
Definition at line 178 of file CPlanarityMaster.h.
Definition at line 173 of file CPlanarityMaster.h.
Definition at line 175 of file CPlanarityMaster.h.
|
inlineoverridevirtual |
Returns the optimal solution induced Clustergraph.
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
Definition at line 102 of file CPlanarityMaster.h.
|
overrideprotectedvirtual |
Function that is invoked at the end of the optimization. Does nothing but output in CP_MasterBase.
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
|
overridevirtual |
Updates the "best" Subgraph m_solutionGraph found so far and fills connection
with.
Reimplemented from ogdf::cluster_planarity::CP_MasterBase.
|
friend |
Definition at line 50 of file CPlanarityMaster.h.
|
private |
Used to check if variables are truly needed wrt to search space reduction (Chimani/Klein)
Definition at line 403 of file CPlanarityMaster.h.
|
private |
Static storage of cluster node lists to avoid repeated computation.
Definition at line 411 of file CPlanarityMaster.h.
|
private |
Stores number of separation calls.
Definition at line 410 of file CPlanarityMaster.h.
|
private |
If set to true, search space reduction is performed. Reduction is only feasible when only a single independent bag exists, which has to be assured by external partitioning.
Definition at line 408 of file CPlanarityMaster.h.
|
private |
Search space graph, input graph plus edges modelled by initial variables.
Definition at line 409 of file CPlanarityMaster.h.