Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

CPlanarityMaster.h
Go to the documentation of this file.
1 
36 #pragma once
37 
38 #include <ogdf/basic/Graph.h>
39 #include <ogdf/basic/GraphCopy.h>
40 #include <ogdf/basic/List.h>
41 #include <ogdf/basic/Logger.h>
42 #include <ogdf/basic/basic.h>
47 
48 namespace abacus {
49 class Constraint;
50 class Sub;
51 } // namespace abacus
52 
53 namespace ogdf::cluster_planarity {
54 class ChunkConnection;
55 } // namespace ogdf::cluster_planarity
56 
57 namespace ogdf {
58 class ClusterAnalysis;
59 
60 namespace cluster_planarity {
61 
63  friend class CPlanaritySub;
64 
65 #if 0
66  const ClusterGraph *m_C;
68  const Graph *m_G;
69 
70 
74 
75  List<nodePair> m_connectionOneEdges; //<! Contains connection nodePairs whose variable is set to 1.0
76 #endif
77 
78 public:
79  // Construction and default values
80  explicit CPlanarityMaster(const ClusterGraph& C,
81  //Check what we really still need here
82  int heuristicLevel = 0, int heuristicRuns = 2, double heuristicOEdgeBound = 0.3,
83  int heuristicNPermLists = 5, int kuratowskiIterations = 3, int subdivisions = 10,
84  int kSupportGraphs = 3, double kuratowskiHigh = 0.75, double kuratowskiLow = 0.3,
85  bool perturbation = false, double branchingGap = 0.4,
86  const char* time = "00:20:00" /* maximum computation time */);
87 
89  virtual ~CPlanarityMaster();
90 
91  // Initialization of the first Subproblem
92  virtual abacus::Sub* firstSub() override;
93 
94  // Returns the number of variables
95  int nMaxVars() const { return m_nMaxVars; }
96 
97  // Returns a pointer to the underlying Graph
98  const Graph* getGraph() const { return m_G; }
99 
100  // Returns a pointer to the given Clustergraph.
101  const ClusterGraph* getClusterGraph() const { return m_C; }
102 
103  // Returns a pointer on the search space graph, which is
104  // a copy of the input graph with all edges added that
105  // correspond to variables add at initialization.
106  // Be aware that this is not dynamically updated, e.g. for pricing.
107 
108  const GraphCopy* searchSpaceGraph() const { return m_ssg; }
109 
110  // Updates the "best" Subgraph #m_solutionGraph found so far and fills edge lists with
111  // corresponding edges (nodePairs).
112  void updateBestSubGraph(List<NodePair>& connection) override;
113 
114  // Returns the optimal solution induced Clustergraph
115  Graph* solutionInducedGraph() override { return static_cast<Graph*>(m_solutionGraph); }
116 
117  // Returns nodePairs of connecting optimal solution edges in list \p edges.
118  void getConnectionOptimalSolutionEdges(List<NodePair>& egdes) const override;
119 
120  // Get parameters
121  int getKIterations() const { return m_nKuratowskiIterations; }
122 
123  int getNSubdivisions() const { return m_nSubdivisions; }
124 
126 
127  int getHeuristicLevel() const { return m_heuristicLevel; }
128 
129  int getHeuristicRuns() const { return m_nHeuristicRuns; }
130 
131  double getKBoundHigh() const { return m_kuratowskiBoundHigh; }
132 
133  double getKBoundLow() const { return m_kuratowskiBoundLow; }
134 
135  bool perturbation() const { return m_usePerturbation; }
136 
137  double branchingOEdgeSelectGap() const { return m_branchingGap; }
138 
140 
142 
143  bool getMPHeuristic() const { return m_mpHeuristic; }
144 
145  int getNumAddVariables() const { return m_numAddVariables; }
146 
148 
150 
151 #if 0
152  // Read global constraint counter, i.e. the number of added constraints of specific type.
153  int addedKConstraints() const {return m_nKConsAdded;}
154  int addedCConstraints() const {return m_nCConsAdded;}
155 #endif
156 
157 
158  // Set parameters
160 
161  void setNSubdivisions(int n) { m_nSubdivisions = n; }
162 
164 
165  void setNHeuristicRuns(int n) { m_nHeuristicRuns = n; }
166 
167  void setKBoundHigh(double n) { m_kuratowskiBoundHigh = ((n > 0.0 && n < 1.0) ? n : 0.8); }
168 
169  void setKBoundLow(double n) { m_kuratowskiBoundLow = ((n > 0.0 && n < 1.0) ? n : 0.2); }
170 
171  void heuristicLevel(int level) { m_heuristicLevel = level; }
172 
173  void setHeuristicRuns(int n) { m_nHeuristicRuns = n; }
174 
175  void setPertubation(bool b) { m_usePerturbation = b; }
176 
178 
180 
182  void setMPHeuristic(bool b) { m_mpHeuristic = b; }
183 
185 
187 
189 
191  void setSearchSpaceShrinking(bool b) { m_shrink = b; }
192 
193 #if 0
194  void updateAddedCCons(int n) {m_nCConsAdded += n;}
196  void updateAddedKCons(int n) {m_nKConsAdded += n;}
197 
199  double getPrimalBound() {return globalPrimalBound;}
200  double getDualBound() {return globalDualBound;}
201 
202  // Cut pools for connectivity and planarity
204  StandardPool<Constraint, Variable> *getCutConnPool() {return m_cutConnPool;}
206  StandardPool<Constraint, Variable> *getCutKuraPool() {return m_cutKuraPool;}
207 
210  bool &useDefaultCutPool() { return m_useDefaultCutPool;}
211 #endif
212 
213 #ifdef OGDF_DEBUG
214  void printGraph(const Graph& G);
217 #endif
218 
221  const char* getStdConstraintsFileName() { return "StdConstraints.txt"; }
222 
223  int getNumInactiveVars() { return m_inactiveVariables.size(); }
224 
226  const List<node>& getClusterNodes(cluster c) const { return m_cNodes[c]; }
227 
230  void getClusterNodes(cluster c, List<node>& nodeList) const {
231  ListConstIterator<node> it = m_cNodes[c].begin();
232  while (it.valid()) {
233  nodeList.pushBack(*it);
234  ++it;
235  }
236  }
237 
238 protected:
239  // Initializes constraints and variables and an initial dual bound.
240  virtual void initializeOptimization() override;
241 
242  // Function that is invoked at the end of the optimization
243  virtual void terminateOptimization() override;
244 
245  double heuristicInitialLowerBound() override;
246 
249  void createInitialVariables(List<CPlanarEdgeVar*>& initVars) override;
250 
252  void addInnerConnections(cluster c, List<CPlanarEdgeVar*>& connectVars);
253 
257 
258  bool isCP() override {
259 #if 1
260  return feasibleFound();
261 #else
262  return dualBound() != -infinity();
263 #endif
264  }
265 
267  bool goodVar(node a, node b) override;
268 
269 private:
274  double heuristicInitialUpperBound() override;
275 
277  double clusterConnection(cluster c, GraphCopy& GC) override;
278 
280  void createCompConnVars(List<CPlanarEdgeVar*>& initVars) override;
281 
283  void nodeDistances(node u, NodeArray<NodeArray<int>>& dist) override;
284 
285 
286  // Parameters
287 #if 0
288  int m_nKuratowskiSupportGraphs; // Maximal number of times the Kuratowski support graph is computed
289  int m_nKuratowskiIterations; // Maximal number of times BoyerMyrvold is invoked
290  int m_nSubdivisions; // Maximal number of extracted Kuratowski subdivisions
291  int m_nMaxVars; // Max Number of variables
292  int m_heuristicLevel; // Indicates if primal heuristic shall be used or not
293  int m_nHeuristicRuns; // Counts how often the primal heuristic has been called
294 
295  bool m_usePerturbation; // Indicates whether C-variables should be perturbated or not
296  double m_branchingGap; // Modifies the branching behaviour
298  int m_nHeuristicPermutationLists; // The number of permutation lists used in the primal heuristic
299  bool m_mpHeuristic;
300 
301  double m_kuratowskiBoundHigh; // Upper bound for deterministic edge addition in computation of the Supportgraph
302  double m_kuratowskiBoundLow; // Lower bound for deterministic edge deletion in computation of the Supportgraph
303 
304  int m_numAddVariables; // how many variables should i add maximally per pricing round?
305  double m_strongConstraintViolation; // when do i consider a constraint strongly violated -> separate in first stage
306  double m_strongVariableViolation; // when do i consider a variable strongly violated (red.cost) -> separate in first stage
307 
308  AbaString *m_maxCpuTime; // Time threshold for optimization
309 
312  double m_largestConnectionCoeff;
313 
314  // Counters for the number of added constraints
315  int m_nCConsAdded;
316  int m_nKConsAdded;
317  int m_solvesLP;
318  int m_varsInit;
319  int m_varsAdded;
320  int m_varsPotential;
321  int m_varsMax;
322  int m_varsCut;
323  int m_varsKura;
324  int m_varsPrice;
325  int m_varsBranch;
326  int m_activeRepairs;
328  inline void clearActiveRepairs() {
329  if(m_activeRepairs) {
331  m_activeRepairs = 0;
332  }
333  }
334 
335  double globalPrimalBound;
336  double globalDualBound;
337 
338  inline double getDoubleTime(const Stopwatch* act) {
339  long tempo = act->centiSeconds()+100*act->seconds()+6000*act->minutes()+360000*act->hours();
340  return ((double) tempo)/ 100.0;
341  }
342 
344  const int m_fastHeuristicRuns;
345 
347  StandardPool< Constraint, Variable > *m_cutConnPool;
348  StandardPool< Constraint, Variable > *m_cutKuraPool;
349 
352  bool m_useDefaultCutPool;
353 
354  double m_delta;
355  double m_deltaCount;
356 #endif
357 
359  virtual double nextConnectCoeff() override { return 1.0; }
360 #if 0
361  double nextConnectCoeff() { return -1 + m_deltaCount--*m_delta; };
362 #endif
363  virtual CPlanarEdgeVar* createVariable(ListIterator<NodePair>& it) override {
365  ++m_varsAdded;
366  CPlanarEdgeVar* v = new CPlanarEdgeVar(this, nextConnectCoeff(), (*it).source, (*it).target);
367  v->printMe(Logger::slout());
368  m_inactiveVariables.del(it);
369  //we don't need to check symmetry
370  m_varCreated[(*it).source][(*it).target] = true;
371  return v;
372  }
373 
375  virtual CPlanarEdgeVar* createVariable(node a, node b, double lbound) {
376  OGDF_ASSERT(!(m_varCreated[a][b] || m_varCreated[b][a]));
377  ++m_varsAdded;
378  CPlanarEdgeVar* v = new CPlanarEdgeVar(this, nextConnectCoeff(), lbound, a, b);
379  v->printMe(Logger::slout());
380  //we don't need to check symmetry
381  m_varCreated[a][b] = true;
382  return v;
383  }
384 
386  virtual CPlanarEdgeVar* createVariable(node a, node b) override {
387  OGDF_ASSERT(!(m_varCreated[a][b] || m_varCreated[b][a]));
388  ++m_varsAdded;
389  CPlanarEdgeVar* v = new CPlanarEdgeVar(this, nextConnectCoeff(), a, b);
390  v->printMe(Logger::slout());
391  //we don't need to check symmetry
392  m_varCreated[a][b] = true;
393  return v;
394  }
395 
396 #if 0
398 #endif
399 
400  //used in initialization
402  List<CPlanarEdgeVar*>& connectVars);
403 
404 #if 0
407 #endif
408 
411  virtual void getCoefficients(abacus::Constraint* con, const List<CPlanarEdgeVar*>& connect,
412  List<double>& coeffs) override;
413 
417 
421  bool m_shrink;
423  int m_nSep;
425 };
426 
427 }
428 }
ogdf::ArrayBuffer< int >
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::cluster_planarity::CPlanarityMaster::m_shrink
bool m_shrink
If set to true, search space reduction is performed. Reduction is only feasible when only a single in...
Definition: CPlanarityMaster.h:421
ogdf::cluster_planarity::CPlanaritySub
Definition: CPlanaritySub.h:60
Graph.h
Includes declaration of graph class.
ogdf::cluster_planarity::CPlanarityMaster::setKIterations
void setKIterations(int n)
Definition: CPlanarityMaster.h:159
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::m_cutConnPool
abacus::StandardPool< abacus::Constraint, abacus::Variable > * m_cutConnPool
Cut pools for connectivity and Kuratowski constraints.
Definition: CP_MasterBase.h:236
ogdf::cluster_planarity::CPlanarityMaster::getNumAddVariables
int getNumAddVariables() const
Definition: CPlanarityMaster.h:145
ogdf::cluster_planarity::CP_MasterBase::m_kuratowskiBoundHigh
double m_kuratowskiBoundHigh
Definition: CP_MasterBase.h:289
ogdf::cluster_planarity::CPlanarityMaster::getMPHeuristic
bool getMPHeuristic() const
Definition: CPlanarityMaster.h:143
ogdf::cluster_planarity::CPlanarityMaster::createInitialVariables
void createInitialVariables(List< CPlanarEdgeVar * > &initVars) override
All variables that have to be present at start of optimization are created here. Their number is retu...
ogdf::ClusterAnalysis
Definition: ClusterAnalysis.h:62
OGDF_ASSERT
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Definition: basic.h:66
ogdf::cluster_planarity::CPlanarityMaster::m_cNodes
ClusterArray< List< node > > m_cNodes
Static storage of cluster node lists to avoid repeated computation.
Definition: CPlanarityMaster.h:424
ogdf::cluster_planarity::CP_MasterBase::updateAddedCCons
void updateAddedCCons(int n)
Definition: CP_MasterBase.h:180
ogdf::cluster_planarity::CPlanarityMaster::setNSubdivisions
void setNSubdivisions(int n)
Definition: CPlanarityMaster.h:161
ogdf::cluster_planarity::CP_MasterBase::clearActiveRepairs
void clearActiveRepairs()
Definition: CP_MasterBase.h:311
ogdf::cluster_planarity::CPlanarityMaster::m_ssg
GraphCopy * m_ssg
Search space graph, input graph plus edges modelled by initial variables.
Definition: CPlanarityMaster.h:422
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
ogdf::cluster_planarity::CP_MasterBase::m_repairStat
ArrayBuffer< int > m_repairStat
Definition: CP_MasterBase.h:309
ogdf::cluster_planarity::CPlanarityMaster::isCP
bool isCP() override
Derives and returns c-planarity property either directly or indirectly from computation results.
Definition: CPlanarityMaster.h:258
ogdf::cluster_planarity::CPlanarityMaster::setStrongVariableViolation
void setStrongVariableViolation(double d)
Definition: CPlanarityMaster.h:188
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::ClusterArrayBase
RegisteredArray for labeling the clusters of a ClusterGraph.
Definition: ClusterGraph.h:311
ogdf::cluster_planarity::CPlanarityMaster::getClusterNodes
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 alte...
Definition: CPlanarityMaster.h:230
ogdf::cluster_planarity::CPlanarityMaster::getStdConstraintsFileName
const char * getStdConstraintsFileName()
The name of the file that contains the standard, i.e., non-cut, constraints (may be deleted by ABACUS...
Definition: CPlanarityMaster.h:221
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::CPlanarityMaster::setSearchSpaceShrinking
void setSearchSpaceShrinking(bool b)
Toggles reduction of search space (using only some bag/satchel connections) on/off.
Definition: CPlanarityMaster.h:191
ogdf::cluster_planarity::CPlanarityMaster::printGraph
void printGraph(const Graph &G)
Simple output function to print the given graph to the console. Used for debugging only.
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::ListIteratorBase::valid
bool valid() const
Returns true iff the iterator points to an element.
Definition: List.h:153
ogdf::cluster_planarity::CP_MasterBase::m_varsMax
int m_varsMax
Definition: CP_MasterBase.h:303
ogdf::cluster_planarity::CPlanarityMaster::CPlanarityMaster
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")
ogdf::cluster_planarity::CPlanarityMaster::setPertubation
void setPertubation(bool b)
Definition: CPlanarityMaster.h:175
ogdf::cluster_planarity::CPlanarityMaster::solutionInducedGraph
Graph * solutionInducedGraph() override
Returns the optimal solution induced Clustergraph.
Definition: CPlanarityMaster.h:115
ogdf::cluster_planarity::CPlanarityMaster::setHeuristicPermutationLists
void setHeuristicPermutationLists(int n)
Definition: CPlanarityMaster.h:179
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::CPlanarityMaster::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::CPlanarityMaster::getHeuristicFractionalBound
double getHeuristicFractionalBound() const
Definition: CPlanarityMaster.h:139
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::CPlanarityMaster::nextConnectCoeff
virtual double nextConnectCoeff() override
Switch to minimization of additional edges, no delta necessary.
Definition: CPlanarityMaster.h:359
ogdf::cluster_planarity::CPlanarityMaster::nMaxVars
int nMaxVars() const
Definition: CPlanarityMaster.h:95
ogdf::cluster_planarity::CP_MasterBase::getCutConnPool
abacus::StandardPool< abacus::Constraint, abacus::Variable > * getCutConnPool()
Returns cut pool for connectivity.
Definition: CP_MasterBase.h:191
Logger.h
Contains logging functionality.
ogdf::cluster_planarity::CP_MasterBase::m_varsPotential
int m_varsPotential
Definition: CP_MasterBase.h:302
ogdf::cluster_planarity::CPlanarityMaster::setKBoundLow
void setKBoundLow(double n)
Definition: CPlanarityMaster.h:169
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::cluster_planarity::CPlanarityMaster::branchingOEdgeSelectGap
double branchingOEdgeSelectGap() const
Definition: CPlanarityMaster.h:137
ogdf::cluster_planarity::CPlanarityMaster::addInnerConnections
void addInnerConnections(cluster c, List< CPlanarEdgeVar * > &connectVars)
Adds inner cluster connection variables in bag-reduced search space.
ogdf::ClusterElement
Representation of clusters in a clustered graph.
Definition: ClusterGraph.h:62
ogdf::cluster_planarity::CPlanarityMaster::getKIterations
int getKIterations() const
Definition: CPlanarityMaster.h:121
ogdf::cluster_planarity::CPlanarityMaster::createVariable
virtual CPlanarEdgeVar * createVariable(ListIterator< NodePair > &it) override
Variable creation for nodePair.
Definition: CPlanarityMaster.h:364
ogdf::cluster_planarity::CPlanarityMaster::goodVar
bool goodVar(node a, node b) override
Node pair is potential candidate for new edge variable.
ogdf::AlgorithmFailureCode::Constraint
@ Constraint
ogdf::cluster_planarity::CPlanarityMaster::~CPlanarityMaster
virtual ~CPlanarityMaster()
Destruction.
ogdf::cluster_planarity::CPlanarityMaster::addExternalConnections
void addExternalConnections(cluster c, List< CPlanarEdgeVar * > &connectVars)
Create variables for external cluster connections in case we search only in the bag-reduced search sp...
ogdf::cluster_planarity::CP_MasterBase::m_G
const Graph * m_G
Definition: CP_MasterBase.h:228
ogdf::cluster_planarity::CPlanarityMaster::setMPHeuristic
void setMPHeuristic(bool b)
Switches use of lower bound heuristic.
Definition: CPlanarityMaster.h:182
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
CPlanarEdgeVar.h
Declaration of the variable class for the Branch&Cut algorithm for the Maximum C-Planar SubGraph prob...
ogdf::cluster_planarity::CPlanarityMaster::getHeuristicRuns
int getHeuristicRuns() const
Definition: CPlanarityMaster.h:129
ogdf::cluster_planarity::CPlanarityMaster::getHeuristicLevel
int getHeuristicLevel() const
Definition: CPlanarityMaster.h:127
ogdf::cluster_planarity::CPlanarityMaster::getStrongConstraintViolation
double getStrongConstraintViolation() const
Definition: CPlanarityMaster.h:147
ogdf::cluster_planarity::CPlanarityMaster::setKBoundHigh
void setKBoundHigh(double n)
Definition: CPlanarityMaster.h:167
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::getDoubleTime
double getDoubleTime(const Stopwatch *act)
Definition: CP_MasterBase.h:321
ogdf::cluster_planarity::CPlanarityMaster::m_nSep
int m_nSep
Stores number of separation calls.
Definition: CPlanarityMaster.h:423
ogdf::cluster_planarity::CP_MasterBase::globalDualBound
double globalDualBound
Definition: CP_MasterBase.h:319
ogdf::cluster_planarity::CPlanarityMaster::getGraph
const Graph * getGraph() const
Definition: CPlanarityMaster.h:98
ogdf::cluster_planarity::CPlanarityMaster::m_ca
ClusterAnalysis * m_ca
Used to check if variables are truly needed wrt to search space reduction (Chimani/Klein)
Definition: CPlanarityMaster.h:416
ogdf::ArrayBuffer::push
void push(E e)
Puts a new element in the buffer.
Definition: ArrayBuffer.h:217
ogdf::cluster_planarity::CPlanarityMaster::generateVariablesForFeasibility
virtual void generateVariablesForFeasibility(const List< ChunkConnection * > &ccons, List< CPlanarEdgeVar * > &connectVars)
ogdf::cluster_planarity::CPlanarityMaster::getClusterGraph
const ClusterGraph * getClusterGraph() const
Definition: CPlanarityMaster.h:101
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
ogdf::cluster_planarity::CPlanarityMaster::getClusterNodes
const List< node > & getClusterNodes(cluster c) const
Returns reference to cluster nodes member list for c.
Definition: CPlanarityMaster.h:226
ogdf::cluster_planarity::CPlanarityMaster::getNumInactiveVars
int getNumInactiveVars()
Definition: CPlanarityMaster.h:223
ogdf::cluster_planarity::CP_MasterBase::m_nHeuristicPermutationLists
int m_nHeuristicPermutationLists
Definition: CP_MasterBase.h:286
GraphCopy.h
Declaration of graph copy classes.
ogdf::cluster_planarity::CP_MasterBase::m_inactiveVariables
List< NodePair > m_inactiveVariables
Definition: CP_MasterBase.h:267
abacus::Master::dualBound
double dualBound() const
Returns the value of the dual bound.
Definition: master.h:293
ogdf::cluster_planarity::CPlanarityMaster::getKBoundLow
double getKBoundLow() const
Definition: CPlanarityMaster.h:133
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::cluster_planarity::CPlanarityMaster::createVariable
virtual CPlanarEdgeVar * createVariable(node a, node b, double lbound)
Variable creation for pair of nodes with lower bound.
Definition: CPlanarityMaster.h:375
ogdf::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::cluster_planarity::CP_MasterBase::updateAddedKCons
void updateAddedKCons(int n)
Definition: CP_MasterBase.h:182
ogdf::cluster_planarity::CPlanarityMaster::heuristicLevel
void heuristicLevel(int level)
Definition: CPlanarityMaster.h:171
ogdf::cluster_planarity::CP_MasterBase::m_varsKura
int m_varsKura
Definition: CP_MasterBase.h:305
ogdf::cluster_planarity::CPlanarityMaster::firstSub
virtual abacus::Sub * firstSub() override
Should return a pointer to the first subproblem of the optimization, i.e., the root node of the enume...
ogdf::cluster_planarity::CPlanarityMaster::getNSubdivisions
int getNSubdivisions() const
Definition: CPlanarityMaster.h:123
ogdf::cluster_planarity::CP_MasterBase::m_activeRepairs
int m_activeRepairs
Definition: CP_MasterBase.h:308
abacus::AbacusGlobal::infinity
double infinity() const
Provides a floating point value of "infinite" size.
Definition: global.h:159
ogdf::cluster_planarity::CP_MasterBase
Definition: CP_MasterBase.h:60
abacus::Master::feasibleFound
bool feasibleFound() const
We use this function, e.g., to adapt the enumeration strategy in the DiveAndBest-Strategy.
ogdf::cluster_planarity::CP_MasterBase::getPrimalBound
double getPrimalBound()
Definition: CP_MasterBase.h:185
ogdf::cluster_planarity::CPlanarityMaster::getStrongVariableViolation
double getStrongVariableViolation() const
Definition: CPlanarityMaster.h:149
ogdf::cluster_planarity::CPlanarityMaster::getConnectionOptimalSolutionEdges
void getConnectionOptimalSolutionEdges(List< NodePair > &egdes) const override
Returns nodePairs of connecting optimal solution edges in list edges.
ogdf::cluster_planarity::CPlanarityMaster::searchSpaceGraph
const GraphCopy * searchSpaceGraph() const
Definition: CPlanarityMaster.h:108
ogdf::cluster_planarity::CP_MasterBase::m_nKuratowskiIterations
int m_nKuratowskiIterations
Definition: CP_MasterBase.h:277
ogdf::cluster_planarity::CPlanarityMaster::numberOfHeuristicPermutationLists
int numberOfHeuristicPermutationLists() const
Definition: CPlanarityMaster.h:141
ogdf::cluster_planarity::CPlanarityMaster
Definition: CPlanarityMaster.h:62
ogdf::cluster_planarity::CPlanarityMaster::updateBestSubGraph
void updateBestSubGraph(List< NodePair > &connection) override
Updates the "best" Subgraph m_solutionGraph found so far and fills connection with.
basic.h
Basic declarations, included by all source files.
ogdf::cluster_planarity::CPlanarityMaster::getNKuratowskiSupportGraphs
int getNKuratowskiSupportGraphs() const
Definition: CPlanarityMaster.h:125
abacus::Sub
The subproblem.
Definition: sub.h:68
ogdf::cluster_planarity::CPlanarityMaster::getKBoundHigh
double getKBoundHigh() const
Definition: CPlanarityMaster.h:131
abacus::Constraint
Forms the virtual base class for all possible constraints given in pool format.
Definition: constraint.h:56
ogdf::cluster_planarity::CPlanarityMaster::createVariable
virtual CPlanarEdgeVar * createVariable(node a, node b) override
Variable creation for pair of nodes which is not stored in m_inactiveVariables.
Definition: CPlanarityMaster.h:386
ogdf::cluster_planarity::CPlanarityMaster::setHeuristicFractionalBound
void setHeuristicFractionalBound(double b)
Definition: CPlanarityMaster.h:177
ogdf::cluster_planarity::CP_MasterBase::m_solutionGraph
GraphCopy * m_solutionGraph
Definition: CP_MasterBase.h:233
ogdf::cluster_planarity::CPlanarityMaster::clusterConnection
double clusterConnection(cluster c, GraphCopy &GC) override
Is invoked by heuristicInitialLowerBound()
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::CPlanarityMaster::setNHeuristicRuns
void setNHeuristicRuns(int n)
Definition: CPlanarityMaster.h:165
ogdf::cluster_planarity::CPlanarityMaster::perturbation
bool perturbation() const
Definition: CPlanarityMaster.h:135
List.h
Declaration of doubly linked lists and iterators.
ogdf::cluster_planarity::CP_MasterBase::m_nKConsAdded
int m_nKConsAdded
Definition: CP_MasterBase.h:298
ogdf::cluster_planarity::CPlanarityMaster::heuristicInitialLowerBound
double heuristicInitialLowerBound() override
ogdf::cluster_planarity::CPlanarityMaster::initializeOptimization
virtual void initializeOptimization() override
The default implementation of initializeOptimization() does nothing.
ogdf::cluster_planarity::CP_MasterBase::m_numAddVariables
int m_numAddVariables
Definition: CP_MasterBase.h:292
ogdf::cluster_planarity
Definition: basics.h:42
ogdf::cluster_planarity::CPlanarityMaster::setNKuratowskiSupportGraphs
void setNKuratowskiSupportGraphs(int n)
Definition: CPlanarityMaster.h:163
ogdf::cluster_planarity::CP_MasterBase::m_cutKuraPool
abacus::StandardPool< abacus::Constraint, abacus::Variable > * m_cutKuraPool
Kuratowski Cuts.
Definition: CP_MasterBase.h:237
ogdf::cluster_planarity::CPlanarityMaster::setNumAddVariables
void setNumAddVariables(int i)
Definition: CPlanarityMaster.h:184
ogdf::ListIteratorBase
Encapsulates a pointer to a list element.
Definition: List.h:51
ogdf::cluster_planarity::CPlanarEdgeVar
Definition: CPlanarEdgeVar.h:47
ogdf::cluster_planarity::CPlanarityMaster::setStrongConstraintViolation
void setStrongConstraintViolation(double d)
Definition: CPlanarityMaster.h:186
ogdf::cluster_planarity::CPlanarityMaster::heuristicInitialUpperBound
double heuristicInitialUpperBound() override
Computes a dual bound for the optimal solution. Tries to find as many edge-disjoint Kuratowski subdiv...
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::CPlanarityMaster::getCoefficients
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
ogdf::cluster_planarity::CPlanarityMaster::createCompConnVars
void createCompConnVars(List< CPlanarEdgeVar * > &initVars) override
Creates variables for complete connectivity.
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
CP_MasterBase.h
Declaration of base class for master of Branch&Cut based algorithms for c-planarity testing via an ex...
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::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::Logger::slout
static std::ostream & slout(Level level=Level::Default)
stream for logging-output (global)
Definition: Logger.h:193
ogdf::cluster_planarity::CPlanarityMaster::setHeuristicRuns
void setHeuristicRuns(int n)
Definition: CPlanarityMaster.h:173
ogdf::cluster_planarity::CP_MasterBase::getDualBound
double getDualBound()
Definition: CP_MasterBase.h:187
ogdf::List::pushBack
iterator pushBack(const E &x)
Adds element x at the end of the list.
Definition: List.h:1547
ogdf::cluster_planarity::CP_MasterBase::m_maxCpuTime
string * m_maxCpuTime
Time threshold for optimization.
Definition: CP_MasterBase.h:239
ogdf::cluster_planarity::CPlanarityMaster::nodeDistances
void nodeDistances(node u, NodeArray< NodeArray< int >> &dist) override
Computes the graphtheoretical distances of edges incident to node u.