Candidates for fixing. More...
#include <ogdf/lib/abacus/fixcand.h>
Public Member Functions | |
FixCand (Master *master) | |
Creates an empty set of candidates for fixing. | |
~FixCand () | |
The destructor. | |
Public Member Functions inherited from abacus::AbacusRoot | |
virtual | ~AbacusRoot () |
The destructor. | |
Private Member Functions | |
FixCand (const FixCand &rhs) | |
void | allocate (int nCand) |
Allocates memory to store nCand candidates for fixing. | |
void | deleteAll () |
Deletes all allocated memory of members. | |
void | fixByRedCost (CutBuffer< Variable, Constraint > *addVarBuffer) |
Tries to fix as many candidates as possible. | |
const FixCand & | operator= (const FixCand &rhs) |
void | saveCandidates (Sub *sub) |
Memorizes suitable variables for fixing. | |
Private Attributes | |
ArrayBuffer< PoolSlotRef< Variable, Constraint > * > * | candidates_ |
The candidates for fixing. | |
ArrayBuffer< FSVarStat * > * | fsVarStat_ |
The fixing status of the candidates. | |
ArrayBuffer< double > * | lhs_ |
The left hand side of the expression evaluated for fixing. | |
Master * | master_ |
A pointer to the corresponding master of the optimization. | |
Friends | |
class | Master |
class | Sub |
Additional Inherited Members | |
Static Public Member Functions inherited from abacus::AbacusRoot | |
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". | |
Candidates for fixing.
Variables can be only fixed according to the reduced costs and statuses of variables of the root of the remaining branch-and-bound tree. However, if we store these values, we can repeat the fixing process also in any other node of the enumeration tree when we find a better global lower bound.
Possible candidates for fixing are all variables which have the status AtLowerBound or AtUpperBound. We store all these candidates together with their values in this class.
If we try to fix variables according to reduced cost criteria in nodes which are not the root of the remaining branch-and-cut tree, we always have to take the candidates and values from this class.
|
inline |
Allocates memory to store nCand candidates for fixing.
|
private |
Deletes all allocated memory of members.
The member pointers are set to 0 that multiple deletion cannot cause any error.
|
private |
Tries to fix as many candidates as possible.
The new variable status is both stored in the global variable status of the class Master and in the local variable status of Sub. Candidates which are fixed are removed from the candidate set.
We do not used the function Master::primalViolated() for checking of a variable can be fixed, because here we also have to be careful for integer objective function.
addVarBuffer | Inactive variables which are fixed to a nonzero value are added to addVarBuffer to be activated in the next iteration. |
Memorizes suitable variables for fixing.
sub | A pointer to the root node of the remaining branch-and-cut tree. |
|
private |
|
private |
|
private |
|
private |