45namespace cluster_planarity {
58 const char*
time =
"00:05:00" );
310 + 360000 * act->
hours();
311 return ((
double)
tempo) / 100.0;
316 const int m_fastHeuristicRuns;
334 double m_largestConnectionCoeff;
Declaration and implementation of ArrayBuffer class.
Declaration of the variable class for the Branch&Cut algorithm for the Maximum C-Planar SubGraph prob...
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...
Forms the virtual base class for all possible constraints given in pool format.
The master of the optimization.
virtual Sub * firstSub()=0
Should return a pointer to the first subproblem of the optimization, i.e., the root node of the enume...
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.
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.
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
virtual void nodeDistances(node u, NodeArray< NodeArray< int > > &dist)
bool perturbation() const
void setHeuristicFractionalBound(double b)
void setMPHeuristic(bool b)
Switches use of lower bound heuristic.
double m_heuristicFractionalBound
double getDoubleTime(const Stopwatch *act)
virtual void updateBestSubGraph(List< NodePair > &connection)
Updates the "best" Subgraph m_solutionGraph found so far and fills connection with.
void setKIterations(int n)
const char * getStdConstraintsFileName()
The name of the file that contains the standard, i.e., non-cut, constraints (may be deleted by ABACUS...
string * m_maxCpuTime
Time threshold for optimization.
int getNKuratowskiSupportGraphs() const
void updateAddedKCons(int n)
int m_nHeuristicPermutationLists
virtual ~CP_MasterBase()
Destruction.
NodeArray< NodeArray< bool > > m_varCreated
Keeps track of variables that are currently inactive during optimization.
List< NodePair > m_inactiveVariables
void setNHeuristicRuns(int n)
double m_strongVariableViolation
virtual CPlanarEdgeVar * createVariable(ListIterator< NodePair > &it)
Variable creation for nodePair.
List< NodePair > m_connectionOneEdges
stores optimization success state
void setStrongConstraintViolation(double d)
virtual bool goodVar(node a, node b)
int getNSubdivisions() const
double getStrongConstraintViolation() const
void clearActiveRepairs()
double getKBoundLow() const
GraphCopy * m_solutionGraph
int numberOfHeuristicPermutationLists() const
bool m_useDefaultCutPool
Defines if the ABACUS default cut pool or the separate Connectivity and Kuratowski constraint pools a...
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.
void setNKuratowskiSupportGraphs(int n)
int m_nKuratowskiIterations
int addedCConstraints() const
double getHeuristicFractionalBound() const
virtual bool isCP()=0
Derives and returns c-planarity property either directly or indirectly from computation results.
const ClusterGraph * getClusterGraph() const
Returns a pointer to the given Clustergraph.
virtual CPlanarEdgeVar * createVariable(node a, node b)
Variable creation for pair of nodes which is not stored in m_inactiveVariables.
virtual void createCompConnVars(List< CPlanarEdgeVar * > &initVars)
Creates variables for complete connectivity.
void setTimeLimit(const char *s)
double epsilon() const
Returns the objective function coefficient of C-edges.
void setHeuristicPermutationLists(int n)
int getKIterations() const
void setPortaFile(bool b)
If set to true, PORTA output is written in a file.
bool & useDefaultCutPool()
Returns true if default cut pool is used. Otherwise, separate connectivity and Kuratowski pools are g...
int getNumAddVariables() const
virtual double heuristicInitialUpperBound()
int getHeuristicLevel() const
void setHeuristicRuns(int n)
void setNumAddVariables(int i)
virtual double nextConnectCoeff()
bool m_porta
If set to true, PORTA output is written in a file.
abacus::StandardPool< abacus::Constraint, abacus::Variable > * m_cutConnPool
Cut pools for connectivity and Kuratowski constraints.
virtual double clusterConnection(cluster c, GraphCopy &GC)
abacus::StandardPool< abacus::Constraint, abacus::Variable > * getCutKuraPool()
Returns cut pool for planarity.
void setKBoundLow(double n)
virtual double heuristicInitialLowerBound()
virtual void createInitialVariables(List< CPlanarEdgeVar * > &initVars)=0
All variables that have to be present at start of optimization are created here.
const Graph * getGraph() const
Returns a pointer to the underlying Graph.
virtual void initializeOptimization() override=0
The default implementation of initializeOptimization() does nothing.
void updateAddedCCons(int n)
int getHeuristicRuns() const
double m_kuratowskiBoundHigh
bool getMPHeuristic() const
int m_nKuratowskiSupportGraphs
Keeps track of created variables.
ArrayBuffer< int > m_repairStat
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
void setPertubation(bool b)
double getStrongVariableViolation() const
virtual void terminateOptimization() override
Function that is invoked at the end of the optimization. Does nothing but output in CP_MasterBase.
abacus::StandardPool< abacus::Constraint, abacus::Variable > * m_cutKuraPool
Kuratowski Cuts.
double getKBoundHigh() const
bool m_mpHeuristic
Indicates if simple max planar subgraph heuristic should be used to derive lower bound if only root c...
void setStrongVariableViolation(double d)
void heuristicLevel(int level)
double intGap()
Returns a value that allows to distinguish result values when connection edges (tiny negative cost) a...
double m_kuratowskiBoundLow
int addedKConstraints() const
virtual void getConnectionOptimalSolutionEdges(List< NodePair > &edges) const
Returns nodePairs of connecting optimal solution edges in list edges.
virtual Graph * solutionInducedGraph()
Returns the optimal solution induced Clustergraph.
void setNSubdivisions(int n)
int nMaxVars() const
Returns the number of variables.
void setKBoundHigh(double n)
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
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
the master of the optimization.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.