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