Class managing the component-based subtour elimination LP relaxation for the Steiner tree problem and its solving. More...
#include <ogdf/graphalg/steiner_tree/LPRelaxationSER.h>
Public Member Functions | |
LPRelaxationSER (const EdgeWeightedGraph< T > &G, const List< node > &terminals, const NodeArray< bool > &isTerminal, FullComponentWithExtraStore< T, double > &fullCompStore, T upperBound=0, int cliqueSize=0, double eps=1e-8) | |
Initialize the LP. | |
~LPRelaxationSER () | |
bool | solve () |
Solve the LP. The solution will be written to the extra data of the full component store. | |
Private Member Functions | |
bool | addSubsetCoverConstraint (const ArrayBuffer< node > &subset) |
Add subset cover constraints to the LP for a given subset of terminals. | |
void | addTerminalCoverConstraint () |
Add terminal cover constraints to the LP. | |
void | addYConstraint (const node t) |
Add constraint that the sum of x_C over all components C spanning terminal t is at least 1 to ensure y_t >= 0. | |
double | generateMinCutSeparationGraph (const ArrayBuffer< int > &activeComponents, node &source, node &target, GraphCopy &G, EdgeArray< double > &capacity, int &cutsFound) |
Generates an auxiliary multi-graph for separation (during LP solving): directed, with special source and target, without Steiner vertices of degree 2. | |
void | generateProblem () |
Generate the basic LP model. | |
bool | separate () |
Perform all available separation algorithms. | |
bool | separateConnected (const ArrayBuffer< int > &activeComponents) |
Separate to ensure that the solution is connected. | |
bool | separateCycles (const ArrayBuffer< int > &activeComponents) |
Perform the separation algorithm for cycle constraints (to obtain stronger LP solution) | |
bool | separateMinCut (const ArrayBuffer< int > &activeComponents) |
Perform the general cut-based separation algorithm. | |
Private Attributes | |
const double | m_eps |
epsilon for double operations | |
FullComponentWithExtraStore< T, double > & | m_fullCompStore |
all enumerated full components, with solution | |
const EdgeWeightedGraph< T > & | m_G |
const NodeArray< bool > & | m_isTerminal |
double * | m_lowerBounds |
CoinPackedMatrix * | m_matrix |
double * | m_objective |
OsiSolverInterface * | m_osiSolver |
const int | m_separateCliqueSize |
int | m_separationStage |
const List< node > & | m_terminals |
List of terminals. | |
const T | m_upperBound |
double * | m_upperBounds |
Class managing the component-based subtour elimination LP relaxation for the Steiner tree problem and its solving.
Definition at line 52 of file LPRelaxationSER.h.
|
inline |
Initialize the LP.
G | edge-weighted input graph |
terminals | terminals of the Steiner instance |
isTerminal | incidence vector of terminals |
fullCompStore | the set of full components variables should be constructed for, augmented with extra for solution value |
upperBound | an upper bound to be applied during the LP solving (or 0 if no upper bound should be applied) |
cliqueSize | the maximal clique size for stronger LP constraints (or 0 if the original LP should be solved) |
eps | epsilon used for comparisons |
Definition at line 185 of file LPRelaxationSER.h.
|
inline |
Definition at line 213 of file LPRelaxationSER.h.
|
private |
Add subset cover constraints to the LP for a given subset of terminals.
Definition at line 262 of file LPRelaxationSER.h.
|
private |
Add terminal cover constraints to the LP.
Definition at line 297 of file LPRelaxationSER.h.
|
private |
Add constraint that the sum of x_C over all components C spanning terminal t
is at least 1 to ensure y_t >= 0.
Definition at line 248 of file LPRelaxationSER.h.
|
inlineprivate |
Generates an auxiliary multi-graph for separation (during LP solving): directed, with special source and target, without Steiner vertices of degree 2.
Definition at line 99 of file LPRelaxationSER.h.
|
private |
Generate the basic LP model.
Definition at line 227 of file LPRelaxationSER.h.
|
private |
Perform all available separation algorithms.
Definition at line 355 of file LPRelaxationSER.h.
|
private |
Separate to ensure that the solution is connected.
Definition at line 381 of file LPRelaxationSER.h.
|
private |
Perform the separation algorithm for cycle constraints (to obtain stronger LP solution)
Definition at line 468 of file LPRelaxationSER.h.
|
private |
Perform the general cut-based separation algorithm.
Definition at line 419 of file LPRelaxationSER.h.
bool ogdf::steiner_tree::LPRelaxationSER< T >::solve | ( | ) |
Solve the LP. The solution will be written to the extra data of the full component store.
Definition at line 311 of file LPRelaxationSER.h.
|
private |
epsilon for double operations
Definition at line 70 of file LPRelaxationSER.h.
|
private |
all enumerated full components, with solution
Definition at line 56 of file LPRelaxationSER.h.
|
private |
Definition at line 53 of file LPRelaxationSER.h.
|
private |
Definition at line 54 of file LPRelaxationSER.h.
|
private |
Definition at line 61 of file LPRelaxationSER.h.
|
private |
Definition at line 59 of file LPRelaxationSER.h.
|
private |
Definition at line 60 of file LPRelaxationSER.h.
|
private |
Definition at line 58 of file LPRelaxationSER.h.
|
private |
Definition at line 65 of file LPRelaxationSER.h.
|
private |
Definition at line 67 of file LPRelaxationSER.h.
|
private |
List of terminals.
Definition at line 55 of file LPRelaxationSER.h.
|
private |
Definition at line 64 of file LPRelaxationSER.h.
|
private |
Definition at line 62 of file LPRelaxationSER.h.