|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
53 template<
class BaseType,
class CoType>
58 namespace cluster_planarity {
67 int heuristicLevel = 1,
int heuristicRuns = 2,
double heuristicOEdgeBound = 0.3,
68 int heuristicNPermLists = 5,
int kuratowskiIterations = 3,
int subdivisions = 10,
69 int kSupportGraphs = 3,
double kuratowskiHigh = 0.7,
double kuratowskiLow = 0.3,
71 const char* time =
"00:05:00" );
262 virtual bool isCP() = 0;
323 + 360000 * act->
hours();
324 return ((
double)tempo) / 100.0;
329 const int m_fastHeuristicRuns;
347 double m_largestConnectionCoeff;
368 CPlanarEdgeVar* v =
new CPlanarEdgeVar(
this,
nextConnectCoeff(), (*it).source, (*it).target);
void setKIterations(int n)
virtual void createCompConnVars(List< CPlanarEdgeVar * > &initVars)
Creates variables for complete connectivity.
The namespace for all OGDF objects.
Declaration and implementation of ArrayBuffer class.
Includes declaration of graph class.
void setPertubation(bool b)
int m_nKuratowskiSupportGraphs
Keeps track of created variables.
int getNumAddVariables() const
abacus::StandardPool< abacus::Constraint, abacus::Variable > * m_cutConnPool
Cut pools for connectivity and Kuratowski constraints.
double m_kuratowskiBoundHigh
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
void updateAddedCCons(int n)
void setNKuratowskiSupportGraphs(int n)
void clearActiveRepairs()
void setTimeLimit(const char *s)
const ClusterGraph * m_C
Pointers to the given Clustergraph and underlying Graph are stored.
virtual Sub * firstSub()=0
Should return a pointer to the first subproblem of the optimization, i.e., the root node of the enume...
virtual Graph * solutionInducedGraph()
Returns the optimal solution induced Clustergraph.
ArrayBuffer< int > m_repairStat
bool getMPHeuristic() const
bool m_mpHeuristic
Indicates if simple max planar subgraph heuristic should be used to derive lower bound if only root c...
void setStrongConstraintViolation(double d)
NodeArray< NodeArray< bool > > m_varCreated
Keeps track of variables that are currently inactive during optimization.
Copies of graphs supporting edge splitting.
virtual bool isCP()=0
Derives and returns c-planarity property either directly or indirectly from computation results.
void setNHeuristicRuns(int n)
int getNSubdivisions() const
void heuristicLevel(int level)
void printMe(std::ostream &out) override
double m_kuratowskiBoundLow
int nMaxVars() const
Returns the number of variables.
void printGraph(const Graph &G)
abacus::StandardPool< abacus::Constraint, abacus::Variable > * getCutKuraPool()
Returns cut pool for planarity.
double m_heuristicFractionalBound
virtual double heuristicInitialLowerBound()
int64_t hours() const
Returns the currently elapsed time in hours.
double epsilon() const
Returns the objective function coefficient of C-edges.
abacus::StandardPool< abacus::Constraint, abacus::Variable > * getCutConnPool()
Returns cut pool for connectivity.
void setStrongVariableViolation(double d)
Contains logging functionality.
Representation of clusters in a clustered graph.
void setNSubdivisions(int n)
int64_t seconds() const
Returns the currently elapsed time in seconds.
virtual void getConnectionOptimalSolutionEdges(List< NodePair > &edges) const
Returns nodePairs of connecting optimal solution edges in list edges.
virtual CPlanarEdgeVar * createVariable(ListIterator< NodePair > &it)
Variable creation for nodePair.
bool m_useDefaultCutPool
Defines if the ABACUS default cut pool or the separate Connectivity and Kuratowski constraint pools a...
virtual void getCoefficients(abacus::Constraint *con, const List< CPlanarEdgeVar * > &connect, List< double > &coeffs)
writes coefficients of all orig and connect variables in constraint con into emptied list coeffs
double getKBoundHigh() const
double getHeuristicFractionalBound() const
Declaration of the variable class for the Branch&Cut algorithm for the Maximum C-Planar SubGraph prob...
double getStrongConstraintViolation() const
bool m_porta
If set to true, PORTA output is written in a file.
int addedCConstraints() const
List< NodePair > m_connectionOneEdges
stores optimization success state
void setHeuristicRuns(int n)
int getHeuristicLevel() const
int getNKuratowskiSupportGraphs() const
CP_MasterBase(const ClusterGraph &C, 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:05:00")
Construction and default values.
double getDoubleTime(const Stopwatch *act)
void push(E e)
Puts a new element in the buffer.
int addedKConstraints() const
Declaration of stopwatch classes.
int m_nHeuristicPermutationLists
int64_t minutes() const
Returns the currently elapsed time in minutes.
Declaration of graph copy classes.
List< NodePair > m_inactiveVariables
int64_t centiSeconds() const
Returns the currently elapsed time in 1/100-seconds.
Doubly linked lists (maintaining the length of the list).
RegisteredArray for nodes, edges and adjEntries of a graph.
Data type for general directed graphs (adjacency list representation).
void setKBoundLow(double n)
virtual double heuristicInitialUpperBound()
void updateAddedKCons(int n)
virtual void nodeDistances(node u, NodeArray< NodeArray< int >> &dist)
virtual CPlanarEdgeVar * createVariable(node a, node b)
Variable creation for pair of nodes which is not stored in m_inactiveVariables.
void setPortaFile(bool b)
If set to true, PORTA output is written in a file.
void setHeuristicPermutationLists(int n)
void setNumAddVariables(int i)
const char * getStdConstraintsFileName()
The name of the file that contains the standard, i.e., non-cut, constraints (may be deleted by ABACUS...
virtual void terminateOptimization() override
Function that is invoked at the end of the optimization. Does nothing but output in CP_MasterBase.
int m_nKuratowskiIterations
virtual void createInitialVariables(List< CPlanarEdgeVar * > &initVars)=0
All variables that have to be present at start of optimization are created here.
double getKBoundLow() const
Basic declarations, included by all source files.
const Graph * getGraph() const
Returns a pointer to the underlying Graph.
Realizes a stopwatch for measuring elapsed time.
virtual bool goodVar(node a, node b)
Forms the virtual base class for all possible constraints given in pool format.
GraphCopy * m_solutionGraph
void setHeuristicFractionalBound(double b)
const ClusterGraph * getClusterGraph() const
Returns a pointer to the given Clustergraph.
virtual double clusterConnection(cluster c, GraphCopy &GC)
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...
int getKIterations() const
Declaration of doubly linked lists and iterators.
void setKBoundHigh(double n)
abacus::StandardPool< abacus::Constraint, abacus::Variable > * m_cutKuraPool
Kuratowski Cuts.
Encapsulates a pointer to a list element.
virtual void initializeOptimization() override=0
The default implementation of initializeOptimization() does nothing.
bool & useDefaultCutPool()
Returns true if default cut pool is used. Otherwise, separate connectivity and Kuratowski pools are g...
double m_strongConstraintViolation
double intGap()
Returns a value that allows to distinguish result values when connection edges (tiny negative cost) a...
Representation of clustered graphs.
Class for the representation of nodes.
int numberOfHeuristicPermutationLists() const
virtual double nextConnectCoeff()
virtual ~CP_MasterBase()
Destruction.
static std::ostream & slout(Level level=Level::Default)
stream for logging-output (global)
bool perturbation() const
double getStrongVariableViolation() const
void setMPHeuristic(bool b)
Switches use of lower bound heuristic.
The master of the optimization.
string * m_maxCpuTime
Time threshold for optimization.
int getHeuristicRuns() const
virtual void updateBestSubGraph(List< NodePair > &connection)
Updates the "best" Subgraph m_solutionGraph found so far and fills connection with.