48 namespace cluster_planarity {
74 double heuristicOEdgeBound=0.3,
75 int heuristicNPermLists=5,
76 int kuratowskiIterations=3,
79 double kuratowskiHigh=0.75,
80 double kuratowskiLow=0.3,
82 double branchingGap=0.4,
83 const char *time=
"00:20:00" );
179 bool m_solByHeuristic;
184 void printGraph(
const Graph &G);
191 return "StdConstraints.txt";
283 double m_largestConnectionCoeff;
300 if(m_activeRepairs) {
301 m_repairStat.
push(m_activeRepairs);
311 return ((
double) tempo)/ 100.0;
315 const int m_fastHeuristicRuns;
virtual CPlanarEdgeVar * createVariable(node a, node b, double lbound)
Variable creation for pair of nodes with lower bound.
int m_nKuratowskiIterations
void setNHeuristicRuns(int n)
int getNKuratowskiSupportGraphs() const
void addExternalConnections(cluster c, List< CPlanarEdgeVar *> &connectVars)
Create variables for external cluster connections in case we search only in the bag-reduced search sp...
double heuristicInitialLowerBound() override
double m_heuristicFractionalBound
void setNumAddVariables(int i)
void setHeuristicFractionalBound(double b)
void printMe(ostream &out) override
bool perturbation() const
const ClusterGraph * m_C
Pointers to the given Clustergraph and underlying Graph are stored.
void addInnerConnections(cluster c, List< CPlanarEdgeVar *> &connectVars)
Adds inner cluster connection variables in bag-reduced search space.
iterator pushBack(const E &x)
Adds element x at the end of the list.
const GraphCopy * searchSpaceGraph() const
Data type for general directed graphs (adjacency list representation).
void setKIterations(int n)
virtual double nextConnectCoeff() override
Switch to minimization of additional edges, no delta necessary.
Declaration and implementation of ArrayBuffer class.
void updateAddedCCons(int n)
bool m_mpHeuristic
Indicates if simple max planar subgraph heuristic.
int m_nSep
Stores number of separation calls.
void setHeuristicRuns(int n)
void setStrongVariableViolation(double d)
double m_strongConstraintViolation
double getKBoundHigh() const
void setHeuristicPermutationLists(int n)
double m_kuratowskiBoundHigh
int64_t minutes() const
Returns the currently elapsed time in minutes.
double getDoubleTime(const Stopwatch *act)
int getNSubdivisions() const
void push(E e)
Puts a new element in the buffer.
void heuristicLevel(int level)
int getNumAddVariables() const
const List< node > & getClusterNodes(cluster c) const
Returns reference to cluster nodes member list for c.
int64_t centiSeconds() const
Returns the currently elapsed time in 1/100-seconds.
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")
abacus::StandardPool< abacus::Constraint, abacus::Variable > * getCutConnPool()
Returns cut pool for connectivity.
virtual void initializeOptimization() override
The default implementation of initializeOptimization() does nothing.
void updateAddedKCons(int n)
void createInitialVariables(List< CPlanarEdgeVar *> &initVars) override
All variables that have to be present at start of optimization are created here. Their number is retu...
virtual ~CPlanarityMaster()
Destruction.
ClusterAnalysis * m_ca
Used to check if variables are truly needed wrt to search space reduction (Chimani/Klein) ...
int getHeuristicRuns() const
abacus::StandardPool< abacus::Constraint, abacus::Variable > * getCutKuraPool()
Returns cut pool for planarity.
virtual abacus::Sub * firstSub() override
Should return a pointer to the first subproblem of the optimization, i.e., the root node of the enume...
void getConnectionOptimalSolutionEdges(List< NodePair > &egdes) const override
Returns nodePairs of connecting optimal solution edges in list edges.
void setNKuratowskiSupportGraphs(int n)
double heuristicInitialUpperBound() override
Computes a dual bound for the optimal solution. Tries to find as many edge-disjoint Kuratowski subdiv...
Forms the virtual base class for all possible constraints given in pool format.
bool m_useDefaultCutPool
Defines if the ABACUS default cut pool or the separate Connectivity and Kuratowski constraint pools a...
Representation of clustered graphs.
ArrayBuffer< int > m_repairStat
int numberOfHeuristicPermutationLists() const
Dynamic arrays indexed with nodes.
Declaration of the ClusterAnalysis class for the Branch&Cut algorithm for c-planarity testing via an ...
const ClusterGraph * getClusterGraph() const
void setKBoundLow(double n)
Contains logging functionality.
virtual CPlanarEdgeVar * createVariable(ListIterator< NodePair > &it) override
Variable creation for nodePair.
const char * getStdConstraintsFileName()
The name of the file that contains the standard, i.e., non-cut, constraints (may be deleted by ABACUS...
void nodeDistances(node u, NodeArray< NodeArray< int > > &dist) override
Computes the graphtheoretical distances of edges incident to node u.
bool feasibleFound() const
We use this function, e.g., to adapt the enumeration strategy in the DiveAndBest-Strategy.
Doubly linked lists (maintaining the length of the list).
void setStrongConstraintViolation(double d)
Declaration of base class for master of Branch&Cut based algorithms for c-planarity testing via an ex...
Declaration of graph copy classes.
double m_kuratowskiBoundLow
double m_strongVariableViolation
void setPertubation(bool b)
abacus::StandardPool< abacus::Constraint, abacus::Variable > * m_cutConnPool
Cut pools for connectivity and Kuratowski constraints.
Dynamic arrays indexed with clusters.
void setKBoundHigh(double n)
Copies of graphs supporting edge splitting.
double getStrongConstraintViolation() const
Declaration of the variable class for the Branch&Cut algorithm for the Maximum C-Planar SubGraph prob...
List< NodePair > m_connectionOneEdges
stores optimization success state
bool getMPHeuristic() const
Class for the representation of nodes.
ClusterArray< List< node > > m_cNodes
Static storage of cluster node lists to avoid repeated computation.
bool isCP() override
Derives and returns c-planarity property either directly or indirectly from computation results...
Encapsulates a pointer to a list element.
virtual void generateVariablesForFeasibility(const List< ChunkConnection *> &ccons, List< CPlanarEdgeVar *> &connectVars)
void updateBestSubGraph(List< NodePair > &connection) override
Updates the "best" Subgraph m_solutionGraph found so far and fills connection with.
double getHeuristicFractionalBound() const
int getKIterations() const
static std::ostream & slout(Level l=Level::Default)
stream for logging-output (global)
double getStrongVariableViolation() const
const Graph * getGraph() const
int getHeuristicLevel() const
int m_nHeuristicPermutationLists
double clusterConnection(cluster c, GraphCopy &GC) override
Is invoked by heuristicInitialLowerBound()
GraphCopy * m_solutionGraph
Representation of clusters in a clustered graph.
GraphCopy * m_ssg
Search space graph, input graph plus edges modelled by initial variables.
NodeArray< NodeArray< bool > > m_varCreated
Keeps track of variables that are currently inactive during optimization.
virtual void terminateOptimization() override
Function that is invoked at the end of the optimization. Does nothing but output in CP_MasterBase...
int addedCConstraints() const
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...
virtual CPlanarEdgeVar * createVariable(node a, node b) override
Variable creation for pair of nodes which is not stored in m_inactiveVariables.
int64_t seconds() const
Returns the currently elapsed time in seconds.
abacus::StandardPool< abacus::Constraint, abacus::Variable > * m_cutKuraPool
Kuratowski Cuts.
bool goodVar(node a, node b) override
Node pair is potential candidate for new edge variable.
int m_nKuratowskiSupportGraphs
Keeps track of created variables.
void clearActiveRepairs()
int64_t hours() const
Returns the currently elapsed time in hours.
int addedKConstraints() const
bool & useDefaultCutPool()
Returns true if default cut pool is used. Otherwise, separate connectivity and Kuratowski pools are g...
The namespace for all OGDF objects.
void createCompConnVars(List< CPlanarEdgeVar *> &initVars) override
Creates variables for complete connectivity.
Graph * solutionInducedGraph() override
Returns the optimal solution induced Clustergraph.
double branchingOEdgeSelectGap() const
void setMPHeuristic(bool b)
Switches use of lower bound heuristic.
bool m_shrink
If set to true, search space reduction is performed. Reduction is only feasible when only a single in...
List< NodePair > m_inactiveVariables
void setNSubdivisions(int n)
void setSearchSpaceShrinking(bool b)
Toggles reduction of search space (using only some bag/satchel connections) on/off.
Declaration of the master class for the Branch&Cut algorithm for the Maximum C-Planar SubGraph proble...
string * m_maxCpuTime
Time threshold for optimization.
bool valid() const
Returns true iff the iterator points to an element.
Realizes a stopwatch for measuring elapsed time.
double getKBoundLow() const
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
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 ...