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