Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

CP_MasterBase.h
Go to the documentation of this file.
1 
34 #pragma once
35 
36 #include <ogdf/basic/ArrayBuffer.h>
37 #include <ogdf/basic/Graph.h>
38 #include <ogdf/basic/GraphCopy.h>
39 #include <ogdf/basic/List.h>
40 #include <ogdf/basic/Logger.h>
41 #include <ogdf/basic/Stopwatch.h>
42 #include <ogdf/basic/basic.h>
46 
47 #include <ogdf/external/abacus.h>
48 
49 #include <cstdint>
50 #include <string>
51 
52 namespace abacus {
53 template<class BaseType, class CoType>
54 class StandardPool;
55 } // namespace abacus
56 
57 namespace ogdf {
58 namespace cluster_planarity {
59 
60 class CP_MasterBase : public abacus::Master {
61 public:
63 
65  explicit CP_MasterBase(const ClusterGraph& C,
66  //Check what we really still need here
67  int heuristicLevel = 1, int heuristicRuns = 2, double heuristicOEdgeBound = 0.3,
68  int heuristicNPermLists = 5, int kuratowskiIterations = 3, int subdivisions = 10,
69  int kSupportGraphs = 3, double kuratowskiHigh = 0.7, double kuratowskiLow = 0.3,
70  bool perturbation = false, double branchingGap = 0.4,
71  const char* time = "00:05:00" /* maximum computation time */);
72 
74  virtual ~CP_MasterBase();
75 
76 #if 0
77  // Initialization of the first Subproblem
78  virtual Sub *firstSub();
79 #endif
80 
82  double epsilon() const { return m_epsilon; }
83 
85  int nMaxVars() const { return m_nMaxVars; }
86 
88  const Graph* getGraph() const { return m_G; }
89 
91  const ClusterGraph* getClusterGraph() const { return m_C; }
92 
94  // corresponding edges (::nodePair).
95  virtual void updateBestSubGraph(List<NodePair>& connection);
96 
98  virtual Graph* solutionInducedGraph() { return static_cast<Graph*>(m_solutionGraph); }
99 
101  virtual void getConnectionOptimalSolutionEdges(List<NodePair>& edges) const;
102 
103  void setTimeLimit(const char* s) {
104  delete m_maxCpuTime;
105  m_maxCpuTime = new string(s);
106  }
107 
108  // Get parameters
109  int getKIterations() const { return m_nKuratowskiIterations; }
110 
111  int getNSubdivisions() const { return m_nSubdivisions; }
112 
114 
115  int getHeuristicLevel() const { return m_heuristicLevel; }
116 
117  int getHeuristicRuns() const { return m_nHeuristicRuns; }
118 
119  double getKBoundHigh() const { return m_kuratowskiBoundHigh; }
120 
121  double getKBoundLow() const { return m_kuratowskiBoundLow; }
122 
123  bool perturbation() const { return m_usePerturbation; }
124 #if 0
125  double branchingOEdgeSelectGap() const {return m_branchingGap;}
126 #endif
128 
130 
131  bool getMPHeuristic() const { return m_mpHeuristic; }
132 
133  int getNumAddVariables() const { return m_numAddVariables; }
134 
136 
138 
139  // Read global constraint counter, i.e. the number of added constraints of specific type.
140  int addedKConstraints() const { return m_nKConsAdded; }
141 
142  int addedCConstraints() const { return m_nCConsAdded; }
143 
144  // Set parameters
146 
147  void setNSubdivisions(int n) { m_nSubdivisions = n; }
148 
150 
151  void setNHeuristicRuns(int n) { m_nHeuristicRuns = n; }
152 
153  void setKBoundHigh(double n) { m_kuratowskiBoundHigh = ((n > 0.0 && n < 1.0) ? n : 0.8); }
154 
155  void setKBoundLow(double n) { m_kuratowskiBoundLow = ((n > 0.0 && n < 1.0) ? n : 0.2); }
156 
157  void heuristicLevel(int level) { m_heuristicLevel = level; }
158 
159  void setHeuristicRuns(int n) { m_nHeuristicRuns = n; }
160 
161  void setPertubation(bool b) { m_usePerturbation = b; }
162 
164 
166 
168  void setMPHeuristic(bool b) { m_mpHeuristic = b; }
169 
171 
173 
175 
177  void setPortaFile(bool b) { m_porta = b; }
178 
179  // Updating global constraint counter
180  void updateAddedCCons(int n) { m_nCConsAdded += n; }
181 
182  void updateAddedKCons(int n) { m_nKConsAdded += n; }
183 
184  // Returns global primal and dual bounds.
185  double getPrimalBound() { return globalPrimalBound; }
186 
187  double getDualBound() { return globalDualBound; }
188 
189  // Cut pools for connectivity and planarity
192  return m_cutConnPool;
193  }
194 
197  return m_cutKuraPool;
198  }
199 
203 
206  double intGap() { return 0.79; }
207 
208 #ifdef OGDF_DEBUG
209  bool m_solByHeuristic; //solution computed by heuristic or ILP
210  // Simple output function to print the given graph to the console.
211  // Used for debugging only.
212  void printGraph(const Graph& G);
213 #endif
214 
217  const char* getStdConstraintsFileName() { return "StdConstraints.txt"; }
218 
219  int getNumInactiveVars() { return m_inactiveVariables.size(); }
220 
222 
223 protected:
224  List<NodePair> m_connectionOneEdges; //<! Contains connection nodePairs whose variable is set to 1.0
225 
228  const Graph* m_G;
229 
230  // Each time the primal bound is improved, the integer solution induced Graph is built.
231  // #m_solutionGraph is a pointer to the currently best solution induced Graph.
232  // #m_solutionGraph is deleted in the destructor.
234 
238 
239  string* m_maxCpuTime;
240 
241  // Initializes constraints and variables and an initial dual bound.
242  virtual void initializeOptimization() override = 0;
243 
246  virtual void terminateOptimization() override;
247 
248  virtual double heuristicInitialLowerBound();
249 
252  virtual void createInitialVariables(List<CPlanarEdgeVar*>& initVars) = 0;
253 
254  // Computes a dual bound for the optimal solution.
255  // Tries to find as many edge-disjoint Kuratowski subdivisions as possible.
256  // If k edge-disjoint groups of subdivisions are found, the upper bound can be
257  // initialized with number of edges in underlying graph minus k.
258  virtual double heuristicInitialUpperBound();
259 
262  virtual bool isCP() = 0;
263 
264  // Node pair is potential candidate for new edge variable
265  virtual bool goodVar(node a, node b) { return true; }
266 
268 #if 0
269  //used in initialization
270  void generateVariablesForFeasibility(const List<ChunkConnection*>& ccons, List<CPlanarEdgeVar*>& connectVars);
271 #endif
273 
274 
275  // Parameters
276  int m_nKuratowskiSupportGraphs; // Maximal number of times the Kuratowski support graph is computed
277  int m_nKuratowskiIterations; // Maximal number of times BoyerMyrvold is invoked
278  int m_nSubdivisions; // Maximal number of extracted Kuratowski subdivisions
279  int m_nMaxVars; // Max Number of variables
280  int m_heuristicLevel; // Indicates if primal heuristic shall be used or not
281  int m_nHeuristicRuns; // Counts how often the primal heuristic has been called
282 
283  bool m_usePerturbation; // Indicates whether C-variables should be perturbated or not
284  double m_branchingGap; // Modifies the branching behaviour
286  int m_nHeuristicPermutationLists; // The number of permutation lists used in the primal heuristic
288 
289  double m_kuratowskiBoundHigh; // Upper bound for deterministic edge addition in computation of the Supportgraph
290  double m_kuratowskiBoundLow; // Lower bound for deterministic edge deletion in computation of the Supportgraph
291 
292  int m_numAddVariables; // how many variables should i add maximally per pricing round?
293  double m_strongConstraintViolation; // when do i consider a constraint strongly violated -> separate in first stage
294  double m_strongVariableViolation; // when do i consider a variable strongly violated (red.cost) -> separate in first stage
295 
296  // Counters for the number of added constraints
310 
311  inline void clearActiveRepairs() {
312  if (m_activeRepairs) {
314  m_activeRepairs = 0;
315  }
316  }
317 
320 
321  inline double getDoubleTime(const Stopwatch* act) {
322  int64_t tempo = act->centiSeconds() + 100 * act->seconds() + 6000 * act->minutes()
323  + 360000 * act->hours();
324  return ((double)tempo) / 100.0;
325  }
326 
327 #if 0
328  //number of calls of the fast max planar subgraph heuristic
329  const int m_fastHeuristicRuns;
330 #endif
331 
332 private:
333  // Is invoked by heuristicInitialLowerBound()
334  virtual double clusterConnection(cluster c, GraphCopy& GC);
335 
337  virtual void createCompConnVars(List<CPlanarEdgeVar*>& initVars);
338 
339  // Computes the (here: graphtheoretical) distances of edges incident to node \p u.
340  virtual void nodeDistances(node u, NodeArray<NodeArray<int>>& dist);
341 
342  // The basic objective function coefficient for connection edges.
343  double m_epsilon;
344 #if 0
345  // If perturbation is used, this variable stores the largest occuring coeff,
346  // i.e. the one closest to 0. Otherwise it corresponds to #m_epsilon
347  double m_largestConnectionCoeff;
348 #endif
349 
353 
355 #if 0
356  double m_delta;
357  double m_deltaCount;
358 #endif
359  //Switch to minimization of additional edges, no delta necessary
360 #if 1
361  virtual double nextConnectCoeff() { return 1.0; }
362 #else
363  virtual double nextConnectCoeff() { return -1 + m_deltaCount-- * m_delta; }
364 #endif
365  virtual CPlanarEdgeVar* createVariable(ListIterator<NodePair>& it) {
367  ++m_varsAdded;
368  CPlanarEdgeVar* v = new CPlanarEdgeVar(this, nextConnectCoeff(), (*it).source, (*it).target);
369  v->printMe(Logger::slout());
370  m_inactiveVariables.del(it);
371  //we don't need to check symmetry
372  m_varCreated[(*it).source][(*it).target] = true;
373  return v;
374  }
375 
378  OGDF_ASSERT(!(m_varCreated[a][b] || m_varCreated[b][a]));
379  ++m_varsAdded;
380  CPlanarEdgeVar* v = new CPlanarEdgeVar(this, nextConnectCoeff(), a, b);
381  v->printMe(Logger::slout());
382  // we don't need to check symmetry
383  m_varCreated[a][b] = true;
384  return v;
385  }
386 #if 0
388 
389  //used in initialization
390  void generateVariablesForFeasibility(const List<ChunkConnection*>& ccons, List<CPlanarEdgeVar*>& connectVars);
391 
394 #endif
395 
397  bool m_porta;
400  virtual void getCoefficients(abacus::Constraint* con, const List<CPlanarEdgeVar*>& connect,
401  List<double>& coeffs);
402 };
403 
404 }
405 }
ogdf::ArrayBuffer< int >
ogdf::cluster_planarity::CP_MasterBase::setKIterations
void setKIterations(int n)
Definition: CP_MasterBase.h:145
ogdf::cluster_planarity::CP_MasterBase::createCompConnVars
virtual void createCompConnVars(List< CPlanarEdgeVar * > &initVars)
Creates variables for complete connectivity.
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ArrayBuffer.h
Declaration and implementation of ArrayBuffer class.
Graph.h
Includes declaration of graph class.
ogdf::cluster_planarity::CP_MasterBase::setPertubation
void setPertubation(bool b)
Definition: CP_MasterBase.h:161
ogdf::cluster_planarity::CP_MasterBase::m_nKuratowskiSupportGraphs
int m_nKuratowskiSupportGraphs
Keeps track of created variables.
Definition: CP_MasterBase.h:276
ogdf::cluster_planarity::CP_MasterBase::getNumAddVariables
int getNumAddVariables() const
Definition: CP_MasterBase.h:133
ogdf::cluster_planarity::CP_MasterBase::m_cutConnPool
abacus::StandardPool< abacus::Constraint, abacus::Variable > * m_cutConnPool
Cut pools for connectivity and Kuratowski constraints.
Definition: CP_MasterBase.h:236
abacus.h
Includes Abacus.
ogdf::cluster_planarity::CP_MasterBase::m_kuratowskiBoundHigh
double m_kuratowskiBoundHigh
Definition: CP_MasterBase.h:289
ogdf::cluster_planarity::CP_MasterBase::m_solByHeuristic
bool m_solByHeuristic
Definition: CP_MasterBase.h:209
OGDF_ASSERT
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Definition: basic.h:66
ogdf::cluster_planarity::CP_MasterBase::updateAddedCCons
void updateAddedCCons(int n)
Definition: CP_MasterBase.h:180
ogdf::cluster_planarity::CP_MasterBase::setNKuratowskiSupportGraphs
void setNKuratowskiSupportGraphs(int n)
Definition: CP_MasterBase.h:149
ogdf::cluster_planarity::CP_MasterBase::clearActiveRepairs
void clearActiveRepairs()
Definition: CP_MasterBase.h:311
ogdf::cluster_planarity::CP_MasterBase::setTimeLimit
void setTimeLimit(const char *s)
Definition: CP_MasterBase.h:103
ogdf::cluster_planarity::CP_MasterBase::m_C
const ClusterGraph * m_C
Pointers to the given Clustergraph and underlying Graph are stored.
Definition: CP_MasterBase.h:227
abacus::Master::firstSub
virtual Sub * firstSub()=0
Should return a pointer to the first subproblem of the optimization, i.e., the root node of the enume...
ogdf::cluster_planarity::CP_MasterBase::solutionInducedGraph
virtual Graph * solutionInducedGraph()
Returns the optimal solution induced Clustergraph.
Definition: CP_MasterBase.h:98
ogdf::cluster_planarity::CP_MasterBase::m_repairStat
ArrayBuffer< int > m_repairStat
Definition: CP_MasterBase.h:309
ogdf::cluster_planarity::CP_MasterBase::m_usePerturbation
bool m_usePerturbation
Definition: CP_MasterBase.h:283
ogdf::cluster_planarity::CP_MasterBase::m_varsInit
int m_varsInit
Definition: CP_MasterBase.h:300
ogdf::cluster_planarity::CP_MasterBase::m_varsAdded
int m_varsAdded
Definition: CP_MasterBase.h:301
ogdf::cluster_planarity::CP_MasterBase::getMPHeuristic
bool getMPHeuristic() const
Definition: CP_MasterBase.h:131
ogdf::cluster_planarity::CP_MasterBase::m_mpHeuristic
bool m_mpHeuristic
Indicates if simple max planar subgraph heuristic should be used to derive lower bound if only root c...
Definition: CP_MasterBase.h:287
abacus
Definition: ILPClusterPlanarity.h:50
ogdf::cluster_planarity::CP_MasterBase::m_nHeuristicRuns
int m_nHeuristicRuns
Definition: CP_MasterBase.h:281
ogdf::cluster_planarity::CP_MasterBase::setStrongConstraintViolation
void setStrongConstraintViolation(double d)
Definition: CP_MasterBase.h:172
ogdf::cluster_planarity::CP_MasterBase::m_varCreated
NodeArray< NodeArray< bool > > m_varCreated
Keeps track of variables that are currently inactive during optimization.
Definition: CP_MasterBase.h:272
ogdf::GraphCopy
Copies of graphs supporting edge splitting.
Definition: GraphCopy.h:391
ogdf::cluster_planarity::CP_MasterBase::m_epsilon
double m_epsilon
Definition: CP_MasterBase.h:343
ogdf::cluster_planarity::CP_MasterBase::m_varsMax
int m_varsMax
Definition: CP_MasterBase.h:303
ogdf::cluster_planarity::CP_MasterBase::isCP
virtual bool isCP()=0
Derives and returns c-planarity property either directly or indirectly from computation results.
ogdf::cluster_planarity::CP_MasterBase::setNHeuristicRuns
void setNHeuristicRuns(int n)
Definition: CP_MasterBase.h:151
ogdf::cluster_planarity::CP_MasterBase::getNSubdivisions
int getNSubdivisions() const
Definition: CP_MasterBase.h:111
ogdf::cluster_planarity::CP_MasterBase::heuristicLevel
void heuristicLevel(int level)
Definition: CP_MasterBase.h:157
ogdf::cluster_planarity::CPlanarEdgeVar::printMe
void printMe(std::ostream &out) override
Definition: CPlanarEdgeVar.h:59
ogdf::cluster_planarity::CP_MasterBase::m_kuratowskiBoundLow
double m_kuratowskiBoundLow
Definition: CP_MasterBase.h:290
ogdf::cluster_planarity::CP_MasterBase::nMaxVars
int nMaxVars() const
Returns the number of variables.
Definition: CP_MasterBase.h:85
ogdf::cluster_planarity::CP_MasterBase::printGraph
void printGraph(const Graph &G)
ogdf::cluster_planarity::CP_MasterBase::getCutKuraPool
abacus::StandardPool< abacus::Constraint, abacus::Variable > * getCutKuraPool()
Returns cut pool for planarity.
Definition: CP_MasterBase.h:196
ogdf::cluster_planarity::CP_MasterBase::m_heuristicFractionalBound
double m_heuristicFractionalBound
Definition: CP_MasterBase.h:285
ogdf::cluster_planarity::CP_MasterBase::heuristicInitialLowerBound
virtual double heuristicInitialLowerBound()
ogdf::Stopwatch::hours
int64_t hours() const
Returns the currently elapsed time in hours.
Definition: Stopwatch.h:126
ogdf::cluster_planarity::CP_MasterBase::epsilon
double epsilon() const
Returns the objective function coefficient of C-edges.
Definition: CP_MasterBase.h:82
ogdf::cluster_planarity::CP_MasterBase::getCutConnPool
abacus::StandardPool< abacus::Constraint, abacus::Variable > * getCutConnPool()
Returns cut pool for connectivity.
Definition: CP_MasterBase.h:191
abacus::StandardPool< abacus::Constraint, abacus::Variable >
ogdf::cluster_planarity::CP_MasterBase::setStrongVariableViolation
void setStrongVariableViolation(double d)
Definition: CP_MasterBase.h:174
Logger.h
Contains logging functionality.
ogdf::cluster_planarity::CP_MasterBase::m_varsPotential
int m_varsPotential
Definition: CP_MasterBase.h:302
ogdf::cluster_planarity::CP_MasterBase::m_heuristicLevel
int m_heuristicLevel
Definition: CP_MasterBase.h:280
ogdf::cluster_planarity::CP_MasterBase::m_varsBranch
int m_varsBranch
Definition: CP_MasterBase.h:307
ogdf::ClusterElement
Representation of clusters in a clustered graph.
Definition: ClusterGraph.h:62
ogdf::cluster_planarity::CP_MasterBase::setNSubdivisions
void setNSubdivisions(int n)
Definition: CP_MasterBase.h:147
ogdf::Stopwatch::seconds
int64_t seconds() const
Returns the currently elapsed time in seconds.
Definition: Stopwatch.h:112
ogdf::cluster_planarity::CP_MasterBase::getConnectionOptimalSolutionEdges
virtual void getConnectionOptimalSolutionEdges(List< NodePair > &edges) const
Returns nodePairs of connecting optimal solution edges in list edges.
ogdf::cluster_planarity::CP_MasterBase::createVariable
virtual CPlanarEdgeVar * createVariable(ListIterator< NodePair > &it)
Variable creation for nodePair.
Definition: CP_MasterBase.h:366
ogdf::cluster_planarity::CP_MasterBase::m_G
const Graph * m_G
Definition: CP_MasterBase.h:228
ogdf::cluster_planarity::CP_MasterBase::m_useDefaultCutPool
bool m_useDefaultCutPool
Defines if the ABACUS default cut pool or the separate Connectivity and Kuratowski constraint pools a...
Definition: CP_MasterBase.h:352
ogdf::cluster_planarity::CP_MasterBase::getCoefficients
virtual void getCoefficients(abacus::Constraint *con, const List< CPlanarEdgeVar * > &connect, List< double > &coeffs)
writes coefficients of all orig and connect variables in constraint con into emptied list coeffs
ogdf::cluster_planarity::CP_MasterBase::getKBoundHigh
double getKBoundHigh() const
Definition: CP_MasterBase.h:119
ogdf::cluster_planarity::CP_MasterBase::getHeuristicFractionalBound
double getHeuristicFractionalBound() const
Definition: CP_MasterBase.h:127
CPlanarEdgeVar.h
Declaration of the variable class for the Branch&Cut algorithm for the Maximum C-Planar SubGraph prob...
ogdf::cluster_planarity::CP_MasterBase::getStrongConstraintViolation
double getStrongConstraintViolation() const
Definition: CP_MasterBase.h:135
ogdf::cluster_planarity::CP_MasterBase::m_porta
bool m_porta
If set to true, PORTA output is written in a file.
Definition: CP_MasterBase.h:397
ogdf::cluster_planarity::CP_MasterBase::addedCConstraints
int addedCConstraints() const
Definition: CP_MasterBase.h:142
ogdf::cluster_planarity::CP_MasterBase::m_connectionOneEdges
List< NodePair > m_connectionOneEdges
stores optimization success state
Definition: CP_MasterBase.h:224
ogdf::cluster_planarity::CP_MasterBase::setHeuristicRuns
void setHeuristicRuns(int n)
Definition: CP_MasterBase.h:159
ogdf::cluster_planarity::CP_MasterBase::solutionState::CPlanar
@ CPlanar
ogdf::cluster_planarity::CP_MasterBase::getHeuristicLevel
int getHeuristicLevel() const
Definition: CP_MasterBase.h:115
ogdf::cluster_planarity::CP_MasterBase::getNKuratowskiSupportGraphs
int getNKuratowskiSupportGraphs() const
Definition: CP_MasterBase.h:113
ogdf::cluster_planarity::CP_MasterBase::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.
ogdf::cluster_planarity::CP_MasterBase::getDoubleTime
double getDoubleTime(const Stopwatch *act)
Definition: CP_MasterBase.h:321
ogdf::cluster_planarity::CP_MasterBase::getNumInactiveVars
int getNumInactiveVars()
Definition: CP_MasterBase.h:219
ogdf::cluster_planarity::CP_MasterBase::globalDualBound
double globalDualBound
Definition: CP_MasterBase.h:319
ogdf::ArrayBuffer::push
void push(E e)
Puts a new element in the buffer.
Definition: ArrayBuffer.h:217
ogdf::cluster_planarity::CP_MasterBase::addedKConstraints
int addedKConstraints() const
Definition: CP_MasterBase.h:140
ogdf::cluster_planarity::CP_MasterBase::globalPrimalBound
double globalPrimalBound
Definition: CP_MasterBase.h:318
Stopwatch.h
Declaration of stopwatch classes.
ogdf::cluster_planarity::CP_MasterBase::m_nHeuristicPermutationLists
int m_nHeuristicPermutationLists
Definition: CP_MasterBase.h:286
ogdf::Stopwatch::minutes
int64_t minutes() const
Returns the currently elapsed time in minutes.
Definition: Stopwatch.h:119
GraphCopy.h
Declaration of graph copy classes.
ogdf::cluster_planarity::CP_MasterBase::m_inactiveVariables
List< NodePair > m_inactiveVariables
Definition: CP_MasterBase.h:267
ogdf::Stopwatch::centiSeconds
int64_t centiSeconds() const
Returns the currently elapsed time in 1/100-seconds.
Definition: Stopwatch.h:105
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: DfsMakeBiconnected.h:40
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::cluster_planarity::CP_MasterBase::m_nCConsAdded
int m_nCConsAdded
Definition: CP_MasterBase.h:297
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::cluster_planarity::CP_MasterBase::setKBoundLow
void setKBoundLow(double n)
Definition: CP_MasterBase.h:155
ogdf::cluster_planarity::CP_MasterBase::heuristicInitialUpperBound
virtual double heuristicInitialUpperBound()
ogdf::cluster_planarity::CP_MasterBase::updateAddedKCons
void updateAddedKCons(int n)
Definition: CP_MasterBase.h:182
ogdf::cluster_planarity::CP_MasterBase::m_varsKura
int m_varsKura
Definition: CP_MasterBase.h:305
ogdf::cluster_planarity::CP_MasterBase::m_solState
solutionState m_solState
Definition: CP_MasterBase.h:221
ogdf::cluster_planarity::CP_MasterBase::nodeDistances
virtual void nodeDistances(node u, NodeArray< NodeArray< int >> &dist)
ogdf::cluster_planarity::CP_MasterBase::createVariable
virtual CPlanarEdgeVar * createVariable(node a, node b)
Variable creation for pair of nodes which is not stored in m_inactiveVariables.
Definition: CP_MasterBase.h:377
ogdf::cluster_planarity::CP_MasterBase::m_activeRepairs
int m_activeRepairs
Definition: CP_MasterBase.h:308
ogdf::cluster_planarity::CP_MasterBase::solutionState::Undefined
@ Undefined
ogdf::cluster_planarity::CP_MasterBase::setPortaFile
void setPortaFile(bool b)
If set to true, PORTA output is written in a file.
Definition: CP_MasterBase.h:177
ogdf::cluster_planarity::CP_MasterBase
Definition: CP_MasterBase.h:60
abacus::Master::Sub
friend class Sub
Definition: master.h:71
ogdf::cluster_planarity::CP_MasterBase::setHeuristicPermutationLists
void setHeuristicPermutationLists(int n)
Definition: CP_MasterBase.h:165
ogdf::cluster_planarity::CP_MasterBase::getPrimalBound
double getPrimalBound()
Definition: CP_MasterBase.h:185
ogdf::cluster_planarity::CP_MasterBase::setNumAddVariables
void setNumAddVariables(int i)
Definition: CP_MasterBase.h:170
ogdf::cluster_planarity::CP_MasterBase::getStdConstraintsFileName
const char * getStdConstraintsFileName()
The name of the file that contains the standard, i.e., non-cut, constraints (may be deleted by ABACUS...
Definition: CP_MasterBase.h:217
ogdf::cluster_planarity::CP_MasterBase::terminateOptimization
virtual void terminateOptimization() override
Function that is invoked at the end of the optimization. Does nothing but output in CP_MasterBase.
ogdf::cluster_planarity::CP_MasterBase::m_nKuratowskiIterations
int m_nKuratowskiIterations
Definition: CP_MasterBase.h:277
ogdf::cluster_planarity::CP_MasterBase::createInitialVariables
virtual void createInitialVariables(List< CPlanarEdgeVar * > &initVars)=0
All variables that have to be present at start of optimization are created here.
ogdf::cluster_planarity::CP_MasterBase::getKBoundLow
double getKBoundLow() const
Definition: CP_MasterBase.h:121
basic.h
Basic declarations, included by all source files.
ogdf::cluster_planarity::CP_MasterBase::getGraph
const Graph * getGraph() const
Returns a pointer to the underlying Graph.
Definition: CP_MasterBase.h:88
ogdf::Stopwatch
Realizes a stopwatch for measuring elapsed time.
Definition: Stopwatch.h:45
ogdf::cluster_planarity::CP_MasterBase::goodVar
virtual bool goodVar(node a, node b)
Definition: CP_MasterBase.h:265
abacus::Constraint
Forms the virtual base class for all possible constraints given in pool format.
Definition: constraint.h:56
ogdf::cluster_planarity::CP_MasterBase::m_solutionGraph
GraphCopy * m_solutionGraph
Definition: CP_MasterBase.h:233
ogdf::cluster_planarity::CP_MasterBase::setHeuristicFractionalBound
void setHeuristicFractionalBound(double b)
Definition: CP_MasterBase.h:163
ogdf::cluster_planarity::CP_MasterBase::getClusterGraph
const ClusterGraph * getClusterGraph() const
Returns a pointer to the given Clustergraph.
Definition: CP_MasterBase.h:91
ogdf::cluster_planarity::CP_MasterBase::clusterConnection
virtual double clusterConnection(cluster c, GraphCopy &GC)
ogdf::cluster_planarity::CP_MasterBase::m_strongVariableViolation
double m_strongVariableViolation
Definition: CP_MasterBase.h:294
ogdf::cluster_planarity::CP_MasterBase::m_nMaxVars
int m_nMaxVars
Definition: CP_MasterBase.h:279
ClusterGraph.h
Derived class of GraphObserver providing additional functionality to handle clustered graphs.
basics.h
Declaration of the master class for the Branch&Cut algorithm for the Maximum C-Planar SubGraph proble...
ogdf::cluster_planarity::CP_MasterBase::solutionState::NonCPlanar
@ NonCPlanar
ogdf::cluster_planarity::CP_MasterBase::getKIterations
int getKIterations() const
Definition: CP_MasterBase.h:109
List.h
Declaration of doubly linked lists and iterators.
ogdf::cluster_planarity::CP_MasterBase::setKBoundHigh
void setKBoundHigh(double n)
Definition: CP_MasterBase.h:153
ogdf::cluster_planarity::CP_MasterBase::m_nKConsAdded
int m_nKConsAdded
Definition: CP_MasterBase.h:298
ogdf::cluster_planarity::CP_MasterBase::m_numAddVariables
int m_numAddVariables
Definition: CP_MasterBase.h:292
ogdf::AlgorithmFailureCode::StandardPool
@ StandardPool
ogdf::cluster_planarity::CP_MasterBase::m_cutKuraPool
abacus::StandardPool< abacus::Constraint, abacus::Variable > * m_cutKuraPool
Kuratowski Cuts.
Definition: CP_MasterBase.h:237
ogdf::ListIteratorBase
Encapsulates a pointer to a list element.
Definition: List.h:51
ogdf::cluster_planarity::CPlanarEdgeVar
Definition: CPlanarEdgeVar.h:47
ogdf::cluster_planarity::CP_MasterBase::initializeOptimization
virtual void initializeOptimization() override=0
The default implementation of initializeOptimization() does nothing.
ogdf::cluster_planarity::CP_MasterBase::useDefaultCutPool
bool & useDefaultCutPool()
Returns true if default cut pool is used. Otherwise, separate connectivity and Kuratowski pools are g...
Definition: CP_MasterBase.h:202
ogdf::cluster_planarity::CP_MasterBase::m_strongConstraintViolation
double m_strongConstraintViolation
Definition: CP_MasterBase.h:293
ogdf::cluster_planarity::CP_MasterBase::m_varsCut
int m_varsCut
Definition: CP_MasterBase.h:304
ogdf::cluster_planarity::CP_MasterBase::intGap
double intGap()
Returns a value that allows to distinguish result values when connection edges (tiny negative cost) a...
Definition: CP_MasterBase.h:206
ogdf::ClusterGraph
Representation of clustered graphs.
Definition: ClusterGraph.h:346
ogdf::cluster_planarity::CP_MasterBase::m_nSubdivisions
int m_nSubdivisions
Definition: CP_MasterBase.h:278
ogdf::cluster_planarity::CP_MasterBase::m_solvesLP
int m_solvesLP
Definition: CP_MasterBase.h:299
ogdf::cluster_planarity::CP_MasterBase::solutionState
solutionState
Definition: CP_MasterBase.h:62
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::cluster_planarity::CP_MasterBase::m_branchingGap
double m_branchingGap
Definition: CP_MasterBase.h:284
ogdf::cluster_planarity::CP_MasterBase::m_varsPrice
int m_varsPrice
Definition: CP_MasterBase.h:306
ogdf::cluster_planarity::CP_MasterBase::numberOfHeuristicPermutationLists
int numberOfHeuristicPermutationLists() const
Definition: CP_MasterBase.h:129
ogdf::cluster_planarity::CP_MasterBase::nextConnectCoeff
virtual double nextConnectCoeff()
Definition: CP_MasterBase.h:361
ogdf::cluster_planarity::CP_MasterBase::~CP_MasterBase
virtual ~CP_MasterBase()
Destruction.
ogdf::Logger::slout
static std::ostream & slout(Level level=Level::Default)
stream for logging-output (global)
Definition: Logger.h:193
ogdf::cluster_planarity::CP_MasterBase::getDualBound
double getDualBound()
Definition: CP_MasterBase.h:187
ogdf::cluster_planarity::CP_MasterBase::perturbation
bool perturbation() const
Definition: CP_MasterBase.h:123
ogdf::cluster_planarity::CP_MasterBase::getStrongVariableViolation
double getStrongVariableViolation() const
Definition: CP_MasterBase.h:137
ogdf::cluster_planarity::CP_MasterBase::setMPHeuristic
void setMPHeuristic(bool b)
Switches use of lower bound heuristic.
Definition: CP_MasterBase.h:168
abacus::Master
The master of the optimization.
Definition: master.h:69
ogdf::cluster_planarity::CP_MasterBase::m_maxCpuTime
string * m_maxCpuTime
Time threshold for optimization.
Definition: CP_MasterBase.h:239
ogdf::cluster_planarity::CP_MasterBase::getHeuristicRuns
int getHeuristicRuns() const
Definition: CP_MasterBase.h:117
ogdf::cluster_planarity::CP_MasterBase::updateBestSubGraph
virtual void updateBestSubGraph(List< NodePair > &connection)
Updates the "best" Subgraph m_solutionGraph found so far and fills connection with.