Implements the branching by adding a constraint to the set of active constraints.
More...
#include <ogdf/lib/abacus/conbranchrule.h>

static bool  ascii2bool (const string &str) 
 Converts the string str to a boolean value. More...


static bool  endsWith (const string &str, const string &end) 
 Returns true if str ends with end, false otherwise. More...


static double  fracPart (double x) 
 Returns the absolute value of the fractional part of x. More...


static const char *  onOff (bool value) 
 Converts a boolean variable to the strings "on" and "off". More...


Master *  master_ 
 A pointer to the corresponding master of the optimization. More...


Implements the branching by adding a constraint to the set of active constraints.
Definition at line 44 of file conbranchrule.h.
◆ ConBranchRule()
Creates a branching constraint.
 Note
 The subproblem associated with the branching constraint will be modified in the constructor of the subproblem generated with this branching rule such that later the check for local validity of the branching constraint is performed correcly.
 Parameters

master  A pointer to the corresponding master of the optimization. 
poolSlot  A pointer to the pool slot of the branching constraint. 
Definition at line 57 of file conbranchrule.h.
◆ ~ConBranchRule()
virtual abacus::ConBranchRule::~ConBranchRule 
( 
 ) 


inlinevirtual 
◆ constraint() [1/2]
Returns a pointer to the branching constraint, or a 0pointer if this constraint is not available.
Definition at line 102 of file conbranchrule.h.
◆ constraint() [2/2]
const Constraint* abacus::ConBranchRule::constraint 
( 
 ) 
const 

inline 
Returns a const pointer to the branching constraint, or a 0pointer if this constraint is not available.
Definition at line 107 of file conbranchrule.h.
◆ extract() [1/2]
virtual void abacus::ConBranchRule::extract 
( 
LpSub * 
lp  ) 


overridevirtual 
Overloaded to modify directly the linear programming relaxation.
This required to evaluate the quality of a branching rule.
Reimplemented from abacus::BranchRule.
◆ extract() [2/2]
virtual int abacus::ConBranchRule::extract 
( 
Sub * 
sub  ) 


overridevirtual 
Adds the branching constraint to the subproblem.
Instead of adding it directly to the set of active constraints it is added to the cut buffer.
 Parameters

sub  The subproblem being modified. 
 Returns
 Always 0, since there cannot be a contractiction.
Implements abacus::BranchRule.
◆ initialize()
virtual void abacus::ConBranchRule::initialize 
( 
Sub * 
sub  ) 


overridevirtual 
Initializes the subproblem associated with the branching constraint.
 Parameters

sub  A pointer to the subproblem that is associated with the branching constraint. 
Reimplemented from abacus::BranchRule.
◆ operator=()
◆ unExtract()
virtual void abacus::ConBranchRule::unExtract 
( 
LpSub * 
lp  ) 


overridevirtual 
Should undo the modifictions of the linear programming relaxtion lp.
This function has to be redefined in a derived class if extract(LpSub*) is redefined there.
 Parameters

lp  A pointer to a the linear programming relaxtion of a subproblem. 
Reimplemented from abacus::BranchRule.
◆ operator<<
std::ostream& operator<< 
( 
std::ostream & 
out, 


const ConBranchRule & 
rhs 

) 
 

friend 
Output operator for branching constraints.
 Parameters

out  The output stream. 
rhs  The branch rule being output. 
 Returns
 A reference to the output stream.
◆ poolSlotRef_
A reference to the pool slot of the branching constraints.
Definition at line 113 of file conbranchrule.h.
The documentation for this class was generated from the following file: