Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
abacus::FixCand Class Reference

Candidates for fixing. More...

#include <ogdf/lib/abacus/fixcand.h>

+ Inheritance diagram for abacus::FixCand:

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 FixCandoperator= (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.
 
Mastermaster_
 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 charonOff (bool value)
 Converts a boolean variable to the strings "on" and "off".
 

Detailed Description

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.

Definition at line 63 of file fixcand.h.

Constructor & Destructor Documentation

◆ FixCand() [1/2]

abacus::FixCand::FixCand ( Master master)
inline

Creates an empty set of candidates for fixing.

Parameters
masterA pointer to the corresponding master of the optimization.

Definition at line 74 of file fixcand.h.

◆ ~FixCand()

abacus::FixCand::~FixCand ( )
inline

The destructor.

Definition at line 82 of file fixcand.h.

◆ FixCand() [2/2]

abacus::FixCand::FixCand ( const FixCand rhs)
private

Member Function Documentation

◆ allocate()

void abacus::FixCand::allocate ( int  nCand)
private

Allocates memory to store nCand candidates for fixing.

◆ deleteAll()

void abacus::FixCand::deleteAll ( )
private

Deletes all allocated memory of members.

The member pointers are set to 0 that multiple deletion cannot cause any error.

◆ fixByRedCost()

void abacus::FixCand::fixByRedCost ( CutBuffer< Variable, Constraint > *  addVarBuffer)
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.

Parameters
addVarBufferInactive variables which are fixed to a nonzero value are added to addVarBuffer to be activated in the next iteration.

◆ operator=()

const FixCand & abacus::FixCand::operator= ( const FixCand rhs)
private

◆ saveCandidates()

void abacus::FixCand::saveCandidates ( Sub sub)
private

Memorizes suitable variables for fixing.

Parameters
subA pointer to the root node of the remaining branch-and-cut tree.

Friends And Related Symbol Documentation

◆ Master

Definition at line 66 of file fixcand.h.

◆ Sub

friend class Sub
friend

Definition at line 65 of file fixcand.h.

Member Data Documentation

◆ candidates_

ArrayBuffer<PoolSlotRef<Variable, Constraint>*>* abacus::FixCand::candidates_
private

The candidates for fixing.

Definition at line 120 of file fixcand.h.

◆ fsVarStat_

ArrayBuffer<FSVarStat*>* abacus::FixCand::fsVarStat_
private

The fixing status of the candidates.

Definition at line 122 of file fixcand.h.

◆ lhs_

ArrayBuffer<double>* abacus::FixCand::lhs_
private

The left hand side of the expression evaluated for fixing.

Definition at line 124 of file fixcand.h.

◆ master_

Master* abacus::FixCand::master_
private

A pointer to the corresponding master of the optimization.

Definition at line 118 of file fixcand.h.


The documentation for this class was generated from the following file: