Implements a branching rule for modifying the lower and the upper bound of a variable.
More...
#include <ogdf/lib/abacus/boundbranchrule.h>
|
| | 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.
|
| |
| virtual | ~BoundBranchRule () |
| |
| virtual void | extract (LpSub *lp) |
| | Pverloaded to modify directly the linear programming relaxation.
|
| |
| virtual int | extract (Sub *sub) |
| | Modifies a subproblem by changing the lower and the upper bound of the branching variable.
|
| |
| double | lBound () const |
| | Returns the lower bound of the branching variable.
|
| |
| double | uBound () const |
| | Returns the upper bound of the branching variable.
|
| |
| virtual void | unExtract (LpSub *lp) |
| | Should undo the modifictions of the linear programming relaxtion |lp|.
|
| |
| int | variable () const |
| | Returns the number of the branching variable.
|
| |
| | BranchRule (Master *master) |
| | Initializes a branching rule.
|
| |
| virtual | ~BranchRule () |
| |
| virtual bool | branchOnSetVar () |
| | Should indicate if the branching is performed by setting a binary variable.
|
| |
| virtual void | initialize (Sub *sub) |
| | Called from the constructor of a subproblem.
|
| |
| virtual | ~AbacusRoot () |
| | The destructor.
|
| |
|
| static bool | ascii2bool (const string &str) |
| | Converts the string str to a boolean value.
|
| |
| static bool | endsWith (const string &str, const string &end) |
| | Returns true if str ends with end, false otherwise.
|
| |
| static double | fracPart (double x) |
| | Returns the absolute value of the fractional part of x.
|
| |
| static const char * | onOff (bool value) |
| | Converts a boolean variable to the strings "on" and "off".
|
| |
| Master * | master_ |
| | A pointer to the corresponding master of the optimization.
|
| |
Implements a branching rule for modifying the lower and the upper bound of a variable.
Definition at line 41 of file boundbranchrule.h.
◆ BoundBranchRule()
| abacus::BoundBranchRule::BoundBranchRule |
( |
Master * |
master, |
|
|
int |
variable, |
|
|
double |
lBound, |
|
|
double |
uBound |
|
) |
| |
|
inline |
Creates a bound branch rule for given branching variable, lower bound lBound and upper bound uBound.
- Parameters
-
| master | A pointer to the corresponding master of the optimization. |
| variable | The branching variable. |
| lBound | The lower bound of the branching variable. |
| uBound | The upper bound of the branching variable. |
Definition at line 51 of file boundbranchrule.h.
◆ ~BoundBranchRule()
| virtual abacus::BoundBranchRule::~BoundBranchRule |
( |
| ) |
|
|
inlinevirtual |
◆ extract() [1/2]
| virtual void abacus::BoundBranchRule::extract |
( |
LpSub * |
lp | ) |
|
|
inlinevirtual |
Pverloaded to modify directly the linear programming relaxation.
This required to evaluate the quality of a branching rule.
Reimplemented from abacus::BranchRule.
Definition at line 95 of file boundbranchrule.h.
◆ extract() [2/2]
| virtual int abacus::BoundBranchRule::extract |
( |
Sub * |
sub | ) |
|
|
inlinevirtual |
Modifies a subproblem by changing the lower and the upper bound of the branching variable.
- Parameters
-
| sub | The subproblem being modified. |
- Returns
- 0 If the subproblem is successfully modified.
-
1 If the modification causes a contradiction.
Implements abacus::BranchRule.
Definition at line 80 of file boundbranchrule.h.
◆ lBound()
| double abacus::BoundBranchRule::lBound |
( |
| ) |
const |
|
inline |
Returns the lower bound of the branching variable.
Definition at line 116 of file boundbranchrule.h.
◆ uBound()
| double abacus::BoundBranchRule::uBound |
( |
| ) |
const |
|
inline |
Returns the upper bound of the branching variable.
Definition at line 121 of file boundbranchrule.h.
◆ unExtract()
| virtual void abacus::BoundBranchRule::unExtract |
( |
LpSub * |
lp | ) |
|
|
inlinevirtual |
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.
Definition at line 104 of file boundbranchrule.h.
◆ variable()
| int abacus::BoundBranchRule::variable |
( |
| ) |
const |
|
inline |
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & |
out, |
|
|
const BoundBranchRule & |
rhs |
|
) |
| |
|
friend |
Output operator for bound branch rules.
Writes the branching variable together with its lower and upper bound to an output stream.
- Parameters
-
| out | The output stream. |
| rhs | The branch rule being output. |
- Returns
- A reference to the output stream.
Definition at line 134 of file boundbranchrule.h.
◆ lBound_
| double abacus::BoundBranchRule::lBound_ |
|
private |
◆ oldLpLBound_
| double abacus::BoundBranchRule::oldLpLBound_ |
|
private |
◆ oldLpUBound_
| double abacus::BoundBranchRule::oldLpUBound_ |
|
private |
◆ uBound_
| double abacus::BoundBranchRule::uBound_ |
|
private |
◆ variable_
| int abacus::BoundBranchRule::variable_ |
|
private |
The documentation for this class was generated from the following file: