55 :
BranchRule(master), variable_(variable), lBound_(lBound), uBound_(uBound) { }
69 friend std::ostream &operator<<(std::ostream &out,
const BoundBranchRule &rhs);
83 sub->
lBound(variable_, lBound_);
84 sub->
uBound(variable_, uBound_);
95 oldLpLBound_ = lp->
lBound(variable_);
96 oldLpUBound_ = lp->
uBound(variable_);
Base class for branching rules.
Implements a branching rule for modifying the lower and the upper bound of a variable.
int variable() const
Returns the number of the branching variable.
double uBound() const
Returns the upper bound of the branching variable.
double lBound() const
Returns the lower bound of the branching variable.
virtual ~BoundBranchRule()
virtual int extract(Sub *sub)
Modifies a subproblem by changing the lower and the upper bound of the branching variable.
virtual void extract(LpSub *lp)
Pverloaded to modify directly the linear programming relaxation.
double uBound_
The upper bound of the branching variable.
virtual void unExtract(LpSub *lp)
Should undo the modifictions of the linear programming relaxtion |lp|.
BoundBranchRule(Master *master, int variable, double lBound, double uBound)
Creates a bound branch rule for given branching variable, lower bound lBound and upper bound uBound.
int variable_
The branching variable.
double lBound_
The lower bound of the branching variable.
Abstract base class for all branching rules.
bool fixedOrSet() const
Returns false if the status is Free, true otherwise.
The linear program of a subproblem.
double uBound(int i) const
We have to redefine the function uBound(i) since variables may have been eliminated.
double lBound(int i) const
We have to redefine the function lBound(i) since variables may have been eliminated.
virtual void changeUBound(int i, double newUb) override
Sets the upper bound of variable i to newUb.
virtual void changeLBound(int i, double newLb) override
Sets the lower bound of variable i to newLb.
The master of the optimization.
double uBound(int i) const
Can be used to access the upper of an active variable of the subproblem.
double lBound(int i) const
Can be used to access the lower of an active variable of the subproblem.
FSVarStat * fsVarStat(int i) const
Returns a pointer to the status of fixing/setting of the i-th variable.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
std::ostream & operator<<(std::ostream &out, const Active< BaseType, CoType > &rhs)