This class implements the Directed Cut Integer Linear Program for the Steiner tree problem. More...
#include <ogdf/graphalg/MinSteinerTreeDirectedCut.h>
Classes | |
class | DegreeConstraint |
Constraint for nodes, e.g., in/outdegree stuff. More... | |
class | DegreeEdgeConstraint |
Constraint for relating the indegree and one outgoing edge of a node. More... | |
class | DirectedCutConstraint |
Class for directed cuts (i.e., separated Steiner cuts) More... | |
class | EdgeConstraint |
Constraint for edges, e.g., subtour elimination constraints of size 2 ((G)SEC2) More... | |
class | EdgeVariable |
Variable for directed edges. More... | |
class | Master |
Master problem of Steiner tree branch&cut algorithm More... | |
class | Sub |
Subproblem of Steiner tree algorithm. More... | |
Public Member Functions | |
MinSteinerTreeDirectedCut () | |
void | setConfigFile (const char *configfile) |
Set a configuration file to use. The contents of the configuration file can override all other used options. More... | |
void | setEpsilon (double eps) |
Set the epsilon for the LP. More... | |
void | setMaxFlowModule (MaxFlowModule< double > *module) |
Set the maximum flow module to be used for separation. More... | |
void | setMaxNumberAddedCuttingPlanes (int b) |
Set maximum number of added cutting planes per iteration. More... | |
void | setPoolSizeInitFactor (int b) |
Set factor for the initial size of the cutting pool. More... | |
void | setPrimalHeuristic (MinSteinerTreeModule< double > *b) |
Set the module option for the primal heuristic (use MinSteinerTreeModule<double> types). Default: MinSteinerTreeModuleTakahashi. More... | |
void | setPrimalHeuristicCallStrategy (int b) |
Set primal heuristic call strategy. More... | |
void | setSaturationStrategy (int b) |
Set saturation strategy for nested cuts. More... | |
void | setSeparationStrategy (int b) |
Set separation strategy for nested cuts. More... | |
void | useBackCuts (bool b) |
Switch computation of back-cuts on or off. More... | |
void | useDegreeConstraints (bool b) |
Switch usage of degree constraints (like indeg <= 1) on or off. More... | |
void | useFlowBalanceConstraints (bool b) |
Switch usage of flow balance constraints on or off. More... | |
void | useGSEC2Constraints (bool b) |
Switch usage of constraints x_uv + x_vu <= 1 on or off. More... | |
void | useIndegreeEdgeConstraints (bool b) |
Switch usage of indegree edge constraints (indeg(v) >= outgoing edge(v,x) for all x) on or off. More... | |
void | useMinCardinalityCuts (bool b) |
Switch usage of the cardinality heuristic (minimum-cardinality cuts) on or off. More... | |
void | useNestedCuts (bool b) |
Switch computation of nested cuts on or off. More... | |
void | useTerminalShuffle (bool b) |
Switch terminal shuffling before separation on or off. More... | |
Public Member Functions inherited from ogdf::MinSteinerTreeModule< T > | |
virtual | ~MinSteinerTreeModule () |
Do nothing on destruction. More... | |
virtual T | call (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, EdgeWeightedGraphCopy< T > *&finalSteinerTree) |
Calls the Steiner tree algorithm for nontrivial cases but handles trivial cases directly. More... | |
Protected Member Functions | |
virtual T | computeSteinerTree (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, EdgeWeightedGraphCopy< T > *&finalSteinerTree) override |
Computes the actual Steiner tree. More... | |
Protected Attributes | |
bool | m_addDegreeConstraints |
bool | m_addFlowBalanceConstraints |
bool | m_addGSEC2Constraints |
bool | m_addIndegreeEdgeConstraints |
bool | m_backCutComputation |
int | m_callPrimalHeuristic |
const char * | m_configFile |
double | m_eps |
std::unique_ptr< MaxFlowModule< double > > | m_maxFlowModuleOption |
int | m_maxNrAddedCuttingPlanes |
bool | m_minCardinalityCuts |
bool | m_nestedCutComputation |
int | m_poolSizeInitFactor |
MinSteinerTreeModule< double > * | m_primalHeuristic |
int | m_saturationStrategy |
int | m_separationStrategy |
bool | m_shuffleTerminals |
Additional Inherited Members | |
Static Public Member Functions inherited from ogdf::MinSteinerTreeModule< T > | |
static void | getNonterminals (ArrayBuffer< node > &nonterminals, const EdgeWeightedGraph< T > &G, const NodeArray< bool > &isTerminal) |
Generates a list (as ArrayBuffer<node>) of all nonterminals. More... | |
static void | getTerminals (List< node > &terminals, const EdgeWeightedGraph< T > &G, const NodeArray< bool > &isTerminal) |
Generates a list (as List<node>) of all terminals. More... | |
static bool | isQuasiBipartite (const EdgeWeightedGraph< T > &G, const NodeArray< bool > &isTerminal) |
Checks in O(n + m) time if a given Steiner tree problem instance is quasi-bipartite. More... | |
static bool | isSteinerTree (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, const EdgeWeightedGraphCopy< T > &steinerTree) |
Checks in O(n) time if a given tree is acually a Steiner Tree. More... | |
static void | sortTerminals (List< node > &terminals) |
Sort terminals by index. More... | |
static T | pruneAllDanglingSteinerPaths (EdgeWeightedGraphCopy< T > &steinerTree, const NodeArray< bool > &isTerminal) |
Prunes nonterminal leaves and their paths to terminal or branching nodes. More... | |
static T | pruneDanglingSteinerPathFrom (EdgeWeightedGraphCopy< T > &steinerTree, const NodeArray< bool > &isTerminal, node start) |
Prunes the dangling Steiner path beginning at a given nonterminal leaf only. More... | |
static T | pruneDanglingSteinerPathsFrom (EdgeWeightedGraphCopy< T > &steinerTree, const NodeArray< bool > &isTerminal, const List< node > &start) |
Prunes dangling Steiner paths beginning at given nonterminal leaves only. More... | |
static T | removeCyclesFrom (EdgeWeightedGraphCopy< T > &steinerTree, const NodeArray< bool > &isTerminal) |
Remove remaining cycles from a Steiner "almost" tree. More... | |
static void | singleSourceShortestPathsPreferringTerminals (const EdgeWeightedGraph< T > &G, node source, const NodeArray< bool > &isTerminal, NodeArray< T > &distance, NodeArray< edge > &pred) |
Modified single-source-shortest-paths (Dijkstra) with heuristic to prefer paths over terminals. More... | |
static void | singleSourceShortestPathsStandard (const EdgeWeightedGraph< T > &G, node source, const NodeArray< bool > &, NodeArray< T > &distance, NodeArray< edge > &pred) |
Standard single-source-shortest-paths algoritm (Dijkstra) More... | |
static void | singleSourceShortestPaths (const EdgeWeightedGraph< T > &G, node source, const NodeArray< bool > &isTerminal, NodeArray< T > &distance, NodeArray< edge > &pred) |
The default single-source-shortest-paths algorithm. More... | |
static void | allTerminalShortestPathsStandard (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, NodeArray< NodeArray< T >> &distance, NodeArray< NodeArray< edge >> &pred) |
Runs singleSourceShortestPathsStandard from all terminals. More... | |
static void | allTerminalShortestPathsPreferringTerminals (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, NodeArray< NodeArray< T >> &distance, NodeArray< NodeArray< edge >> &pred) |
Runs singleSourceShortestPathsPreferringTerminals from all terminals. More... | |
static void | allTerminalShortestPaths (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, NodeArray< NodeArray< T >> &distance, NodeArray< NodeArray< edge >> &pred, std::function< void(const EdgeWeightedGraph< T > &, node, const NodeArray< bool > &, NodeArray< T > &, NodeArray< edge > &)> ssspFunc=singleSourceShortestPaths) |
Runs a given (or the default) single-source-shortest-paths function from all terminals. More... | |
static void | allNodeShortestPathsStandard (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, NodeArray< NodeArray< T >> &distance, NodeArray< NodeArray< edge >> &pred) |
Runs singleSourceShortestPathsStandard from all nodes. More... | |
static void | allNodeShortestPathsPreferringTerminals (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, NodeArray< NodeArray< T >> &distance, NodeArray< NodeArray< edge >> &pred) |
Runs singleSourceShortestPathsPreferringTerminals from all nodes. More... | |
static void | allNodeShortestPaths (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, NodeArray< NodeArray< T >> &distance, NodeArray< NodeArray< edge >> &pred, std::function< void(const EdgeWeightedGraph< T > &, node, const NodeArray< bool > &, NodeArray< T > &, NodeArray< edge > &)> ssspFunc=singleSourceShortestPaths) |
Runs a given (or the default) single-source-shortest-paths function from all nodes. More... | |
static void | allPairShortestPathsPreferringTerminals (const EdgeWeightedGraph< T > &G, const NodeArray< bool > &isTerminal, NodeArray< NodeArray< T >> &distance, NodeArray< NodeArray< edge >> &pred) |
Modified all-pair-shortest-paths algorithm (Floyd-Warshall) with heuristic to prefer paths over terminals. More... | |
static void | allPairShortestPathsStandard (const EdgeWeightedGraph< T > &G, const NodeArray< bool > &, NodeArray< NodeArray< T >> &distance, NodeArray< NodeArray< edge >> &pred) |
Standard all-pair-shortest-paths algorithm (Floyd-Warshall) More... | |
static void | allPairShortestPaths (const EdgeWeightedGraph< T > &G, const NodeArray< bool > &isTerminal, NodeArray< NodeArray< T >> &distance, NodeArray< NodeArray< edge >> &pred) |
The default all-pair-shortest-paths algorithm. More... | |
static void | drawSVG (const EdgeWeightedGraph< T > &G, const NodeArray< bool > &isTerminal, const EdgeWeightedGraphCopy< T > &steinerTree, const char *filename) |
Writes an SVG file of a minimum Steiner tree in the original graph. More... | |
static void | drawSVG (const EdgeWeightedGraph< T > &G, const NodeArray< bool > &isTerminal, const char *filename) |
Writes an SVG file of the instance graph. More... | |
static void | drawSteinerTreeSVG (const EdgeWeightedGraphCopy< T > &steinerTree, const NodeArray< bool > &isTerminal, const char *filename) |
Writes a SVG that shows only the given Steiner tree. More... | |
This class implements the Directed Cut Integer Linear Program for the Steiner tree problem.
Definition at line 82 of file MinSteinerTreeDirectedCut.h.
|
inline |
Definition at line 176 of file MinSteinerTreeDirectedCut.h.
|
overrideprotectedvirtual |
Computes the actual Steiner tree.
Implements ogdf::MinSteinerTreeModule< T >.
Definition at line 2079 of file MinSteinerTreeDirectedCut.h.
|
inline |
Set a configuration file to use. The contents of the configuration file can override all other used options.
Definition at line 122 of file MinSteinerTreeDirectedCut.h.
|
inline |
Set the epsilon for the LP.
Definition at line 119 of file MinSteinerTreeDirectedCut.h.
|
inline |
Set the maximum flow module to be used for separation.
Definition at line 128 of file MinSteinerTreeDirectedCut.h.
|
inline |
Set maximum number of added cutting planes per iteration.
Definition at line 143 of file MinSteinerTreeDirectedCut.h.
|
inline |
Set factor for the initial size of the cutting pool.
Definition at line 174 of file MinSteinerTreeDirectedCut.h.
|
inline |
Set the module option for the primal heuristic (use MinSteinerTreeModule<double> types). Default: MinSteinerTreeModuleTakahashi.
Definition at line 164 of file MinSteinerTreeDirectedCut.h.
|
inline |
Set primal heuristic call strategy.
Definition at line 167 of file MinSteinerTreeDirectedCut.h.
|
inline |
Set saturation strategy for nested cuts.
Definition at line 158 of file MinSteinerTreeDirectedCut.h.
|
inline |
Set separation strategy for nested cuts.
Definition at line 155 of file MinSteinerTreeDirectedCut.h.
|
inline |
Switch computation of back-cuts on or off.
Definition at line 149 of file MinSteinerTreeDirectedCut.h.
|
inline |
Switch usage of degree constraints (like indeg <= 1) on or off.
Definition at line 131 of file MinSteinerTreeDirectedCut.h.
|
inline |
Switch usage of flow balance constraints on or off.
Definition at line 140 of file MinSteinerTreeDirectedCut.h.
|
inline |
Switch usage of constraints x_uv + x_vu <= 1 on or off.
Definition at line 137 of file MinSteinerTreeDirectedCut.h.
|
inline |
Switch usage of indegree edge constraints (indeg(v) >= outgoing edge(v,x) for all x) on or off.
Definition at line 134 of file MinSteinerTreeDirectedCut.h.
|
inline |
Switch usage of the cardinality heuristic (minimum-cardinality cuts) on or off.
Definition at line 161 of file MinSteinerTreeDirectedCut.h.
|
inline |
Switch computation of nested cuts on or off.
Definition at line 152 of file MinSteinerTreeDirectedCut.h.
|
inline |
Switch terminal shuffling before separation on or off.
Definition at line 146 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 91 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 94 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 93 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 92 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 97 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 102 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 85 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 86 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 90 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 95 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 101 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 98 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 104 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 103 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 100 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 99 of file MinSteinerTreeDirectedCut.h.
|
protected |
Definition at line 96 of file MinSteinerTreeDirectedCut.h.