Implements a branching rule for modifying the lower and the upper bound of a variable.
More...
#include <ogdf/lib/abacus/boundbranchrule.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 a branching rule for modifying the lower and the upper bound of a variable.
Definition at line 40 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 50 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 94 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 79 of file boundbranchrule.h.
◆ lBound()
double abacus::BoundBranchRule::lBound |
( |
| ) |
const |
|
inline |
Returns the lower bound of the branching variable.
Definition at line 115 of file boundbranchrule.h.
◆ uBound()
double abacus::BoundBranchRule::uBound |
( |
| ) |
const |
|
inline |
Returns the upper bound of the branching variable.
Definition at line 120 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 103 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 133 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: