Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

MaxCPlanarMaster.h
Go to the documentation of this file.
1 
37 #pragma once
38 
39 #include <ogdf/basic/ArrayBuffer.h>
40 #include <ogdf/basic/Graph.h>
41 #include <ogdf/basic/GraphCopy.h>
42 #include <ogdf/basic/List.h>
43 #include <ogdf/basic/Logger.h>
44 #include <ogdf/basic/Stopwatch.h>
45 #include <ogdf/basic/basic.h>
49 
50 #include <ogdf/external/abacus.h>
51 
52 #include <cstdint>
53 #include <string>
54 
55 namespace abacus {
56 template<class BaseType, class CoType>
57 class StandardPool;
58 } // namespace abacus
59 
60 namespace ogdf::cluster_planarity {
61 class ChunkConnection;
62 } // namespace ogdf::cluster_planarity
63 
64 namespace ogdf {
65 namespace cluster_planarity {
66 
68  friend class MaxCPlanarSub;
69 
70  // Pointers to the given Clustergraph and underlying Graph are stored.
71  const ClusterGraph* m_C;
72  const Graph* m_G;
74 
75 
76  // Each time the primal bound is improved, the integer solution induced Graph is built.
77  // \#m_solutionGraph is a pointer to the currently best solution induced Graph.
79 
80  List<NodePair> m_allOneEdges; //<! Contains all nodePairs whose variable is set to 1.0
81  List<NodePair> m_originalOneEdges; //<! Contains original nodePairs whose variable is set to 1.0
82  List<NodePair> m_connectionOneEdges; //<! Contains connection nodePairs whose variable is set to 1.0
83  List<edge> m_deletedOriginalEdges; //<! Contains original edges whose variable is set to 0.0
84 
85 public:
86  // Construction and default values
87  MaxCPlanarMaster(const ClusterGraph& C, const EdgeArray<double>* pCost, int heuristicLevel = 1,
88  int heuristicRuns = 2, double heuristicOEdgeBound = 0.3, int heuristicNPermLists = 5,
89  int kuratowskiIterations = 3, int subdivisions = 10, int kSupportGraphs = 3,
90  double kuratowskiHigh = 0.7, double kuratowskiLow = 0.3, bool perturbation = false,
91  double branchingGap = 0.4,
92  const char* time = "00:20:00", //maximum computation time
93  bool dopricing = true,
94  bool checkCPlanar = false, //just check c-planarity
95  int numAddVariables = 15, double strongConstraintViolation = 0.3,
96  double strongVariableViolation = 0.3);
97 
99  virtual ~MaxCPlanarMaster();
100 
101  // Initialisation of the first Subproblem
102  virtual abacus::Sub* firstSub() override;
103 
104  // Returns the objective function coefficient of C-edges
105  double epsilon() const { return m_epsilon; }
106 
107  // Returns the number of variables
108  int nMaxVars() const { return m_nMaxVars; }
109 
110  // Returns a pointer to the underlying Graph
111  const Graph* getGraph() const { return m_G; }
112 
113  // Returns a pointer to the given Clustergraph.
114  const ClusterGraph* getClusterGraph() const { return m_C; }
115 
116  // Updates the "best" Subgraph #m_solutionGraph found so far and fills edge lists with
117  // corresponding edges (nodePairs).
118  void updateBestSubGraph(List<NodePair>& original, List<NodePair>& connection,
119  List<edge>& deleted);
120 
121  // Returns the optimal solution induced Clustergraph
122  Graph* solutionInducedGraph() { return static_cast<Graph*>(m_solutionGraph); }
123 
124  // Returns nodePairs of original, connection, deleted or all optimal solution edges in list \p edges.
125  void getAllOptimalSolutionEdges(List<NodePair>& edges) const;
128  void getDeletedEdges(List<edge>& edges) const;
129 
130  // Get parameters
131  int getKIterations() const { return m_nKuratowskiIterations; }
132 
133  int getNSubdivisions() const { return m_nSubdivisions; }
134 
136 
137  int getHeuristicLevel() const { return m_heuristicLevel; }
138 
139  int getHeuristicRuns() const { return m_nHeuristicRuns; }
140 
141  double getKBoundHigh() const { return m_kuratowskiBoundHigh; }
142 
143  double getKBoundLow() const { return m_kuratowskiBoundLow; }
144 
145  bool perturbation() const { return m_usePerturbation; }
146 
147  double branchingOEdgeSelectGap() const { return m_branchingGap; }
148 
150 
152 
153  bool getMPHeuristic() const { return m_mpHeuristic; }
154 
155  bool getCheckCPlanar() const { return m_checkCPlanar; }
156 
157  int getNumAddVariables() const { return m_numAddVariables; }
158 
160 
162 
163  // Read global constraint counter, i.e. the number of added constraints of specific type.
164  int addedKConstraints() const { return m_nKConsAdded; }
165 
166  int addedCConstraints() const { return m_nCConsAdded; }
167 
168  // Set parameters
170 
171  void setNSubdivisions(int n) { m_nSubdivisions = n; }
172 
174 
175  void setNHeuristicRuns(int n) { m_nHeuristicRuns = n; }
176 
177  void setKBoundHigh(double n) { m_kuratowskiBoundHigh = ((n > 0.0 && n < 1.0) ? n : 0.8); }
178 
179  void setKBoundLow(double n) { m_kuratowskiBoundLow = ((n > 0.0 && n < 1.0) ? n : 0.2); }
180 
181  void heuristicLevel(int level) { m_heuristicLevel = level; }
182 
183  void setHeuristicRuns(int n) { m_nHeuristicRuns = n; }
184 
185  void setPertubation(bool b) { m_usePerturbation = b; }
186 
188 
190 
192  void setMPHeuristic(bool b) { m_mpHeuristic = b; }
193 
195 
197 
199 
201  void setPortaFile(bool b) { m_porta = b; }
202 
203  // Updating global constraint counter
204  void updateAddedCCons(int n) { m_nCConsAdded += n; }
205 
206  void updateAddedKCons(int n) { m_nKConsAdded += n; }
207 
208  // Returns global primal and dual bounds.
209  double getPrimalBound() { return globalPrimalBound; }
210 
211  double getDualBound() { return globalDualBound; }
212 
213  // Cut pools for connectivity and planarity
216  return m_cutConnPool;
217  }
218 
221  return m_cutKuraPool;
222  }
223 
227 
228 #ifdef OGDF_DEBUG
229  bool m_solByHeuristic; //solution computed by heuristic or ILP
230  // Simple output function to print the given graph to the console.
231  // Used for debugging only.
232  void printGraph(const Graph& G);
233 #endif
234 
237  const char* getStdConstraintsFileName() { return "StdConstraints.txt"; }
238 
239  int getNumInactiveVars() { return m_inactiveVariables.size(); }
240 
241 protected:
242  // Initializes constraints and variables and an initial dual bound.
243  virtual void initializeOptimization() override;
244 
245  // Function that is invoked at the end of the optimization
246  virtual void terminateOptimization() override;
247 
249 
250 private:
251  // Computes a dual bound for the optimal solution.
252  // Tries to find as many edge-disjoint Kuratowski subdivisions as possible.
253  // If k edge-disjoint groups of subdivisions are found, the upper bound can be
254  // initialized with number of edges in underlying graph minus k.
256 
257  // Is invoked by heuristicInitialUpperBound()
258  void clusterConnection(cluster c, GraphCopy& GC, double& upperBound);
259 
260  // Computes the graphtheoretical distances of edges incident to node \p u.
261  void nodeDistances(node u, NodeArray<NodeArray<int>>& dist);
262 
263 
264  // Parameters
265  int m_nKuratowskiSupportGraphs; // Maximal number of times the Kuratowski support graph is computed
266  int m_nKuratowskiIterations; // Maximal number of times BoyerMyrvold is invoked
267  int m_nSubdivisions; // Maximal number of extracted Kuratowski subdivisions
268  int m_nMaxVars; // Max Number of variables
269  int m_heuristicLevel; // Indicates if primal heuristic shall be used or not
270  int m_nHeuristicRuns; // Counts how often the primal heuristic has been called
271 
272  bool m_usePerturbation; // Indicates whether C-variables should be perturbated or not
273  double m_branchingGap; // Modifies the branching behaviour
275  int m_nHeuristicPermutationLists; // The number of permutation lists used in the primal heuristic
277 
278  double m_kuratowskiBoundHigh; // Upper bound for deterministic edge addition in computation of the Supportgraph
279  double m_kuratowskiBoundLow; // Lower bound for deterministic edge deletion in computation of the Supportgraph
280 
281  int m_numAddVariables; // how many variables should i add maximally per pricing round?
282  double m_strongConstraintViolation; // when do i consider a constraint strongly violated -> separate in first stage
283  double m_strongVariableViolation; // when do i consider a variable strongly violated (red.cost) -> separate in first stage
284 
285  string* m_maxCpuTime; // Time threshold for optimization
286 
287 
288  // The basic objective function coefficient for connection edges.
289  double m_epsilon;
290  // If pertubation is used, this variable stores the largest occuring coeff,
291  // i.e. the one closest to 0. Otherwise it corresponds to #m_epsilon
293 
294  // Counters for the number of added constraints
308 
309  inline void clearActiveRepairs() {
310  if (m_activeRepairs) {
312  m_activeRepairs = 0;
313  }
314  }
315 
318 
319  inline double getDoubleTime(const Stopwatch* act) {
320  int64_t tempo = act->centiSeconds() + 100 * act->seconds() + 6000 * act->minutes()
321  + 360000 * act->hours();
322  return ((double)tempo) / 100.0;
323  }
324 
325  //number of calls of the fast max planar subgraph heuristic
327 
331 
335 
340 
341  double m_delta;
342  double m_deltaCount;
343 
344  double nextConnectCoeff() {
345  // TODO: Test whether this implementation is working.
346  return (m_checkCPlanar ? -1 : -m_epsilon) + m_deltaCount-- * m_delta;
347  }
348 
350  ++m_varsAdded;
351  EdgeVar* v = new EdgeVar(this, nextConnectCoeff(), EdgeVar::EdgeType::Connect, (*it).source,
352  (*it).target);
353  v->printMe(Logger::slout());
354  m_inactiveVariables.del(it);
355  return v;
356  }
357 
360  List<EdgeVar*>& connectVars);
361 
362  bool goodVar(node a, node b);
363 
365  bool m_porta;
368  void getCoefficients(abacus::Constraint* con, const List<EdgeVar*>& orig,
369  const List<EdgeVar*>& connect, List<double>& coeffs);
370 };
371 
372 }
373 }
ogdf::ArrayBuffer< int >
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::cluster_planarity::MaxCPlanarMaster::getMPHeuristic
bool getMPHeuristic() const
Definition: MaxCPlanarMaster.h:153
ArrayBuffer.h
Declaration and implementation of ArrayBuffer class.
ogdf::cluster_planarity::MaxCPlanarMaster::m_inactiveVariables
List< NodePair > m_inactiveVariables
Definition: MaxCPlanarMaster.h:358
ogdf::cluster_planarity::MaxCPlanarMaster::getConnectionOptimalSolutionEdges
void getConnectionOptimalSolutionEdges(List< NodePair > &egdes) const
ogdf::cluster_planarity::MaxCPlanarMaster::perturbation
bool perturbation() const
Definition: MaxCPlanarMaster.h:145
Graph.h
Includes declaration of graph class.
ogdf::cluster_planarity::MaxCPlanarMaster::m_checkCPlanar
bool m_checkCPlanar
Defines if only clustered planarity is checked, i.e., all edges of the original graph need to be fixe...
Definition: MaxCPlanarMaster.h:339
ogdf::cluster_planarity::MaxCPlanarMaster::printGraph
void printGraph(const Graph &G)
ogdf::cluster_planarity::MaxCPlanarSub
Definition: MaxCPlanarSub.h:60
ogdf::cluster_planarity::MaxCPlanarMaster::heuristicInitialLowerBound
double heuristicInitialLowerBound()
ogdf::cluster_planarity::MaxCPlanarMaster::updateAddedKCons
void updateAddedKCons(int n)
Definition: MaxCPlanarMaster.h:206
ogdf::cluster_planarity::MaxCPlanarMaster::m_G
const Graph * m_G
Definition: MaxCPlanarMaster.h:72
ogdf::cluster_planarity::MaxCPlanarMaster::createVariable
EdgeVar * createVariable(ListIterator< NodePair > &it)
Definition: MaxCPlanarMaster.h:349
ogdf::cluster_planarity::MaxCPlanarMaster::m_repairStat
ArrayBuffer< int > m_repairStat
Definition: MaxCPlanarMaster.h:307
abacus.h
Includes Abacus.
ogdf::cluster_planarity::MaxCPlanarMaster::setNKuratowskiSupportGraphs
void setNKuratowskiSupportGraphs(int n)
Definition: MaxCPlanarMaster.h:173
ogdf::cluster_planarity::MaxCPlanarMaster::m_epsilon
double m_epsilon
Definition: MaxCPlanarMaster.h:289
ogdf::cluster_planarity::MaxCPlanarMaster::m_varsAdded
int m_varsAdded
Definition: MaxCPlanarMaster.h:299
ogdf::cluster_planarity::MaxCPlanarMaster::m_connectionOneEdges
List< NodePair > m_connectionOneEdges
Definition: MaxCPlanarMaster.h:82
ogdf::cluster_planarity::MaxCPlanarMaster::getHeuristicLevel
int getHeuristicLevel() const
Definition: MaxCPlanarMaster.h:137
ogdf::cluster_planarity::MaxCPlanarMaster::m_numAddVariables
int m_numAddVariables
Definition: MaxCPlanarMaster.h:281
ogdf::cluster_planarity::MaxCPlanarMaster::m_deltaCount
double m_deltaCount
Definition: MaxCPlanarMaster.h:342
ogdf::cluster_planarity::MaxCPlanarMaster::m_delta
double m_delta
Definition: MaxCPlanarMaster.h:341
ogdf::cluster_planarity::MaxCPlanarMaster::m_nKConsAdded
int m_nKConsAdded
Definition: MaxCPlanarMaster.h:296
ogdf::cluster_planarity::MaxCPlanarMaster::m_deletedOriginalEdges
List< edge > m_deletedOriginalEdges
Definition: MaxCPlanarMaster.h:83
abacus
Definition: ILPClusterPlanarity.h:50
ogdf::cluster_planarity::MaxCPlanarMaster::m_strongVariableViolation
double m_strongVariableViolation
Definition: MaxCPlanarMaster.h:283
ogdf::GraphCopy
Copies of graphs supporting edge splitting.
Definition: GraphCopy.h:391
ogdf::cluster_planarity::MaxCPlanarMaster::m_usePerturbation
bool m_usePerturbation
Definition: MaxCPlanarMaster.h:272
ogdf::cluster_planarity::MaxCPlanarMaster::solutionInducedGraph
Graph * solutionInducedGraph()
Definition: MaxCPlanarMaster.h:122
ogdf::cluster_planarity::MaxCPlanarMaster::setHeuristicPermutationLists
void setHeuristicPermutationLists(int n)
Definition: MaxCPlanarMaster.h:189
ogdf::cluster_planarity::MaxCPlanarMaster::m_solvesLP
int m_solvesLP
Definition: MaxCPlanarMaster.h:297
ogdf::cluster_planarity::MaxCPlanarMaster::getKIterations
int getKIterations() const
Definition: MaxCPlanarMaster.h:131
ogdf::cluster_planarity::MaxCPlanarMaster::m_varsMax
int m_varsMax
Definition: MaxCPlanarMaster.h:301
ogdf::cluster_planarity::MaxCPlanarMaster::getDoubleTime
double getDoubleTime(const Stopwatch *act)
Definition: MaxCPlanarMaster.h:319
ogdf::cluster_planarity::MaxCPlanarMaster::addedKConstraints
int addedKConstraints() const
Definition: MaxCPlanarMaster.h:164
ogdf::cluster_planarity::MaxCPlanarMaster::m_varsKura
int m_varsKura
Definition: MaxCPlanarMaster.h:303
ogdf::cluster_planarity::MaxCPlanarMaster::m_heuristicLevel
int m_heuristicLevel
Definition: MaxCPlanarMaster.h:269
ogdf::cluster_planarity::MaxCPlanarMaster::m_originalOneEdges
List< NodePair > m_originalOneEdges
Definition: MaxCPlanarMaster.h:81
ogdf::cluster_planarity::MaxCPlanarMaster::nextConnectCoeff
double nextConnectCoeff()
Definition: MaxCPlanarMaster.h:344
ogdf::cluster_planarity::MaxCPlanarMaster::m_nMaxVars
int m_nMaxVars
Definition: MaxCPlanarMaster.h:268
ogdf::cluster_planarity::MaxCPlanarMaster::getCutKuraPool
abacus::StandardPool< abacus::Constraint, abacus::Variable > * getCutKuraPool()
Returns cut pool for planarity.
Definition: MaxCPlanarMaster.h:220
ogdf::cluster_planarity::MaxCPlanarMaster::m_nKuratowskiIterations
int m_nKuratowskiIterations
Definition: MaxCPlanarMaster.h:266
ogdf::Stopwatch::hours
int64_t hours() const
Returns the currently elapsed time in hours.
Definition: Stopwatch.h:126
ogdf::cluster_planarity::MaxCPlanarMaster::m_strongConstraintViolation
double m_strongConstraintViolation
Definition: MaxCPlanarMaster.h:282
ogdf::cluster_planarity::MaxCPlanarMaster::globalPrimalBound
double globalPrimalBound
Definition: MaxCPlanarMaster.h:316
ogdf::cluster_planarity::MaxCPlanarMaster::getNumInactiveVars
int getNumInactiveVars()
Definition: MaxCPlanarMaster.h:239
ogdf::cluster_planarity::MaxCPlanarMaster::getStdConstraintsFileName
const char * getStdConstraintsFileName()
The name of the file that contains the standard, i.e., non-cut, constraints (may be deleted by ABACUS...
Definition: MaxCPlanarMaster.h:237
ogdf::cluster_planarity::MaxCPlanarMaster::setKBoundLow
void setKBoundLow(double n)
Definition: MaxCPlanarMaster.h:179
ogdf::cluster_planarity::MaxCPlanarMaster::m_solutionGraph
GraphCopy * m_solutionGraph
Definition: MaxCPlanarMaster.h:78
ogdf::cluster_planarity::MaxCPlanarMaster::getNKuratowskiSupportGraphs
int getNKuratowskiSupportGraphs() const
Definition: MaxCPlanarMaster.h:135
abacus::StandardPool< abacus::Constraint, abacus::Variable >
ogdf::cluster_planarity::MaxCPlanarMaster::setNSubdivisions
void setNSubdivisions(int n)
Definition: MaxCPlanarMaster.h:171
Logger.h
Contains logging functionality.
ogdf::cluster_planarity::MaxCPlanarMaster::m_nSubdivisions
int m_nSubdivisions
Definition: MaxCPlanarMaster.h:267
ogdf::cluster_planarity::MaxCPlanarMaster::m_cutKuraPool
abacus::StandardPool< abacus::Constraint, abacus::Variable > * m_cutKuraPool
Kuratowski Cuts.
Definition: MaxCPlanarMaster.h:330
ogdf::ClusterElement
Representation of clusters in a clustered graph.
Definition: ClusterGraph.h:62
ogdf::cluster_planarity::MaxCPlanarMaster
Definition: MaxCPlanarMaster.h:67
ogdf::cluster_planarity::MaxCPlanarMaster::initializeOptimization
virtual void initializeOptimization() override
The default implementation of initializeOptimization() does nothing.
ogdf::cluster_planarity::MaxCPlanarMaster::setStrongConstraintViolation
void setStrongConstraintViolation(double d)
Definition: MaxCPlanarMaster.h:196
ogdf::cluster_planarity::MaxCPlanarMaster::m_heuristicFractionalBound
double m_heuristicFractionalBound
Definition: MaxCPlanarMaster.h:274
ogdf::cluster_planarity::MaxCPlanarMaster::m_mpHeuristic
bool m_mpHeuristic
Indicates if simple max planar subgraph heuristic should be used to derive lower bound if only root c...
Definition: MaxCPlanarMaster.h:276
ogdf::cluster_planarity::MaxCPlanarMaster::setNumAddVariables
void setNumAddVariables(int i)
Definition: MaxCPlanarMaster.h:194
ogdf::cluster_planarity::MaxCPlanarMaster::m_nHeuristicRuns
int m_nHeuristicRuns
Definition: MaxCPlanarMaster.h:270
ogdf::Stopwatch::seconds
int64_t seconds() const
Returns the currently elapsed time in seconds.
Definition: Stopwatch.h:112
ogdf::cluster_planarity::MaxCPlanarMaster::setNHeuristicRuns
void setNHeuristicRuns(int n)
Definition: MaxCPlanarMaster.h:175
ogdf::cluster_planarity::MaxCPlanarMaster::generateVariablesForFeasibility
void generateVariablesForFeasibility(const List< ChunkConnection * > &ccons, List< EdgeVar * > &connectVars)
ogdf::cluster_planarity::MaxCPlanarMaster::nMaxVars
int nMaxVars() const
Definition: MaxCPlanarMaster.h:108
ogdf::cluster_planarity::MaxCPlanarMaster::getHeuristicRuns
int getHeuristicRuns() const
Definition: MaxCPlanarMaster.h:139
ogdf::cluster_planarity::MaxCPlanarMaster::m_varsPotential
int m_varsPotential
Definition: MaxCPlanarMaster.h:300
ogdf::cluster_planarity::EdgeVar::EdgeType::Connect
@ Connect
ogdf::cluster_planarity::MaxCPlanarMaster::updateAddedCCons
void updateAddedCCons(int n)
Definition: MaxCPlanarMaster.h:204
ogdf::cluster_planarity::MaxCPlanarMaster::m_branchingGap
double m_branchingGap
Definition: MaxCPlanarMaster.h:273
ogdf::cluster_planarity::MaxCPlanarMaster::m_pCost
const EdgeArray< double > * m_pCost
Definition: MaxCPlanarMaster.h:73
ogdf::cluster_planarity::MaxCPlanarMaster::setPortaFile
void setPortaFile(bool b)
If set to true, PORTA output is written in a file.
Definition: MaxCPlanarMaster.h:201
EdgeVar.h
Declaration of the variable class for the Branch&Cut algorithm for the Maximum C-Planar SubGraph prob...
ogdf::cluster_planarity::MaxCPlanarMaster::~MaxCPlanarMaster
virtual ~MaxCPlanarMaster()
Destruction.
ogdf::cluster_planarity::MaxCPlanarMaster::heuristicLevel
void heuristicLevel(int level)
Definition: MaxCPlanarMaster.h:181
ogdf::cluster_planarity::MaxCPlanarMaster::getCheckCPlanar
bool getCheckCPlanar() const
Definition: MaxCPlanarMaster.h:155
ogdf::cluster_planarity::MaxCPlanarMaster::m_porta
bool m_porta
If set to true, PORTA output is written in a file.
Definition: MaxCPlanarMaster.h:365
ogdf::cluster_planarity::MaxCPlanarMaster::m_varsPrice
int m_varsPrice
Definition: MaxCPlanarMaster.h:304
ogdf::cluster_planarity::MaxCPlanarMaster::m_varsCut
int m_varsCut
Definition: MaxCPlanarMaster.h:302
ogdf::ArrayBuffer::push
void push(E e)
Puts a new element in the buffer.
Definition: ArrayBuffer.h:217
ogdf::cluster_planarity::MaxCPlanarMaster::setMPHeuristic
void setMPHeuristic(bool b)
Switches use of lower bound heuristic.
Definition: MaxCPlanarMaster.h:192
ogdf::cluster_planarity::MaxCPlanarMaster::m_largestConnectionCoeff
double m_largestConnectionCoeff
Definition: MaxCPlanarMaster.h:292
ogdf::cluster_planarity::MaxCPlanarMaster::goodVar
bool goodVar(node a, node b)
ogdf::cluster_planarity::MaxCPlanarMaster::getCutConnPool
abacus::StandardPool< abacus::Constraint, abacus::Variable > * getCutConnPool()
Returns cut pool for connectivity.
Definition: MaxCPlanarMaster.h:215
Stopwatch.h
Declaration of stopwatch classes.
ogdf::cluster_planarity::MaxCPlanarMaster::m_varsBranch
int m_varsBranch
Definition: MaxCPlanarMaster.h:305
ogdf::Stopwatch::minutes
int64_t minutes() const
Returns the currently elapsed time in minutes.
Definition: Stopwatch.h:119
ogdf::cluster_planarity::MaxCPlanarMaster::setHeuristicFractionalBound
void setHeuristicFractionalBound(double b)
Definition: MaxCPlanarMaster.h:187
GraphCopy.h
Declaration of graph copy classes.
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::Graph
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:869
ogdf::cluster_planarity::MaxCPlanarMaster::getStrongConstraintViolation
double getStrongConstraintViolation() const
Definition: MaxCPlanarMaster.h:159
ogdf::cluster_planarity::MaxCPlanarMaster::addedCConstraints
int addedCConstraints() const
Definition: MaxCPlanarMaster.h:166
ogdf::cluster_planarity::MaxCPlanarMaster::branchingOEdgeSelectGap
double branchingOEdgeSelectGap() const
Definition: MaxCPlanarMaster.h:147
ogdf::cluster_planarity::MaxCPlanarMaster::setStrongVariableViolation
void setStrongVariableViolation(double d)
Definition: MaxCPlanarMaster.h:198
ogdf::cluster_planarity::MaxCPlanarMaster::setPertubation
void setPertubation(bool b)
Definition: MaxCPlanarMaster.h:185
ogdf::cluster_planarity::MaxCPlanarMaster::useDefaultCutPool
bool & useDefaultCutPool()
Returns true if default cut pool is used. Otherwise, separate connectivity and Kuratowski pools are g...
Definition: MaxCPlanarMaster.h:226
ogdf::cluster_planarity::MaxCPlanarMaster::setHeuristicRuns
void setHeuristicRuns(int n)
Definition: MaxCPlanarMaster.h:183
ogdf::cluster_planarity::MaxCPlanarMaster::terminateOptimization
virtual void terminateOptimization() override
The default implementation of terminateOptimization() does nothing.
ogdf::cluster_planarity::MaxCPlanarMaster::MaxCPlanarMaster
MaxCPlanarMaster(const ClusterGraph &C, const EdgeArray< double > *pCost, 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:20:00", bool dopricing=true, bool checkCPlanar=false, int numAddVariables=15, double strongConstraintViolation=0.3, double strongVariableViolation=0.3)
ogdf::cluster_planarity::MaxCPlanarMaster::m_nCConsAdded
int m_nCConsAdded
Definition: MaxCPlanarMaster.h:295
ogdf::cluster_planarity::MaxCPlanarMaster::m_kuratowskiBoundLow
double m_kuratowskiBoundLow
Definition: MaxCPlanarMaster.h:279
ogdf::cluster_planarity::MaxCPlanarMaster::m_useDefaultCutPool
bool m_useDefaultCutPool
Defines if the ABACUS default cut pool or the separate Connectivity and Kuratowski constraint pools a...
Definition: MaxCPlanarMaster.h:334
ogdf::cluster_planarity::MaxCPlanarMaster::epsilon
double epsilon() const
Definition: MaxCPlanarMaster.h:105
ogdf::cluster_planarity::MaxCPlanarMaster::getPrimalBound
double getPrimalBound()
Definition: MaxCPlanarMaster.h:209
ogdf::cluster_planarity::MaxCPlanarMaster::m_activeRepairs
int m_activeRepairs
Definition: MaxCPlanarMaster.h:306
ogdf::cluster_planarity::MaxCPlanarMaster::getHeuristicFractionalBound
double getHeuristicFractionalBound() const
Definition: MaxCPlanarMaster.h:149
basic.h
Basic declarations, included by all source files.
ogdf::cluster_planarity::EdgeVar::printMe
virtual void printMe(std::ostream &out)
Definition: EdgeVar.h:70
abacus::Sub
The subproblem.
Definition: sub.h:68
ogdf::Stopwatch
Realizes a stopwatch for measuring elapsed time.
Definition: Stopwatch.h:45
abacus::Constraint
Forms the virtual base class for all possible constraints given in pool format.
Definition: constraint.h:56
ogdf::cluster_planarity::MaxCPlanarMaster::numberOfHeuristicPermutationLists
int numberOfHeuristicPermutationLists() const
Definition: MaxCPlanarMaster.h:151
ogdf::cluster_planarity::MaxCPlanarMaster::getKBoundHigh
double getKBoundHigh() const
Definition: MaxCPlanarMaster.h:141
ogdf::cluster_planarity::MaxCPlanarMaster::clusterConnection
void clusterConnection(cluster c, GraphCopy &GC, double &upperBound)
ogdf::cluster_planarity::MaxCPlanarMaster::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::MaxCPlanarMaster::m_nKuratowskiSupportGraphs
int m_nKuratowskiSupportGraphs
Definition: MaxCPlanarMaster.h:265
ogdf::cluster_planarity::MaxCPlanarMaster::m_kuratowskiBoundHigh
double m_kuratowskiBoundHigh
Definition: MaxCPlanarMaster.h:278
ogdf::cluster_planarity::MaxCPlanarMaster::nodeDistances
void nodeDistances(node u, NodeArray< NodeArray< int >> &dist)
ogdf::cluster_planarity::MaxCPlanarMaster::m_varsInit
int m_varsInit
Definition: MaxCPlanarMaster.h:298
ogdf::cluster_planarity::MaxCPlanarMaster::m_cutConnPool
abacus::StandardPool< abacus::Constraint, abacus::Variable > * m_cutConnPool
Cut pools for connectivity and Kuratowski constraints.
Definition: MaxCPlanarMaster.h:329
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::MaxCPlanarMaster::m_allOneEdges
List< NodePair > m_allOneEdges
Definition: MaxCPlanarMaster.h:80
List.h
Declaration of doubly linked lists and iterators.
ogdf::cluster_planarity::MaxCPlanarMaster::getNumAddVariables
int getNumAddVariables() const
Definition: MaxCPlanarMaster.h:157
ogdf::cluster_planarity::MaxCPlanarMaster::getNSubdivisions
int getNSubdivisions() const
Definition: MaxCPlanarMaster.h:133
ogdf::cluster_planarity::MaxCPlanarMaster::setKIterations
void setKIterations(int n)
Definition: MaxCPlanarMaster.h:169
abacus::Master::upperBound
double upperBound() const
Returns the value of the global upper bound.
Definition: master.h:1530
ogdf::cluster_planarity::MaxCPlanarMaster::globalDualBound
double globalDualBound
Definition: MaxCPlanarMaster.h:317
ogdf::cluster_planarity::MaxCPlanarMaster::getGraph
const Graph * getGraph() const
Definition: MaxCPlanarMaster.h:111
ogdf::cluster_planarity::MaxCPlanarMaster::getDualBound
double getDualBound()
Definition: MaxCPlanarMaster.h:211
ogdf::AlgorithmFailureCode::StandardPool
@ StandardPool
ogdf::cluster_planarity
Definition: basics.h:42
ogdf::cluster_planarity::MaxCPlanarMaster::m_maxCpuTime
string * m_maxCpuTime
Definition: MaxCPlanarMaster.h:285
ogdf::ListIteratorBase
Encapsulates a pointer to a list element.
Definition: List.h:51
ogdf::cluster_planarity::MaxCPlanarMaster::getKBoundLow
double getKBoundLow() const
Definition: MaxCPlanarMaster.h:143
ogdf::cluster_planarity::MaxCPlanarMaster::m_C
const ClusterGraph * m_C
Definition: MaxCPlanarMaster.h:71
ogdf::cluster_planarity::MaxCPlanarMaster::getClusterGraph
const ClusterGraph * getClusterGraph() const
Definition: MaxCPlanarMaster.h:114
ogdf::cluster_planarity::MaxCPlanarMaster::m_solByHeuristic
bool m_solByHeuristic
Definition: MaxCPlanarMaster.h:229
ogdf::cluster_planarity::MaxCPlanarMaster::m_fastHeuristicRuns
const int m_fastHeuristicRuns
Definition: MaxCPlanarMaster.h:326
ogdf::ClusterGraph
Representation of clustered graphs.
Definition: ClusterGraph.h:346
ogdf::cluster_planarity::MaxCPlanarMaster::setKBoundHigh
void setKBoundHigh(double n)
Definition: MaxCPlanarMaster.h:177
ogdf::cluster_planarity::MaxCPlanarMaster::m_nHeuristicPermutationLists
int m_nHeuristicPermutationLists
Definition: MaxCPlanarMaster.h:275
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240
ogdf::cluster_planarity::EdgeVar
Definition: EdgeVar.h:45
ogdf::cluster_planarity::MaxCPlanarMaster::getCoefficients
void getCoefficients(abacus::Constraint *con, const List< EdgeVar * > &orig, const List< EdgeVar * > &connect, List< double > &coeffs)
writes coefficients of all orig and connect variables in constraint con into emptied list coeffs
ogdf::Logger::slout
static std::ostream & slout(Level level=Level::Default)
stream for logging-output (global)
Definition: Logger.h:193
ogdf::cluster_planarity::MaxCPlanarMaster::clearActiveRepairs
void clearActiveRepairs()
Definition: MaxCPlanarMaster.h:309
ogdf::cluster_planarity::MaxCPlanarMaster::getDeletedEdges
void getDeletedEdges(List< edge > &edges) const
ogdf::cluster_planarity::MaxCPlanarMaster::getStrongVariableViolation
double getStrongVariableViolation() const
Definition: MaxCPlanarMaster.h:161
ogdf::cluster_planarity::MaxCPlanarMaster::heuristicInitialUpperBound
double heuristicInitialUpperBound()
abacus::Master
The master of the optimization.
Definition: master.h:69
ogdf::internal::EdgeArrayBase2
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.
Definition: Graph_d.h:716
ogdf::cluster_planarity::MaxCPlanarMaster::updateBestSubGraph
void updateBestSubGraph(List< NodePair > &original, List< NodePair > &connection, List< edge > &deleted)
ogdf::cluster_planarity::MaxCPlanarMaster::getOriginalOptimalSolutionEdges
void getOriginalOptimalSolutionEdges(List< NodePair > &edges) const
ogdf::cluster_planarity::MaxCPlanarMaster::getAllOptimalSolutionEdges
void getAllOptimalSolutionEdges(List< NodePair > &edges) const