6.8 ABA_VARIABLE Class Reference

class forms the virtual base class for all possible variables given in pool format

#include <variable.h>

Inheritance diagram for ABA_VARIABLE::


PIC


Public Member Functions

Protected Attributes

6.8.1 Detailed Description

class forms the virtual base class for all possible variables given in pool format

Definition at line 55 of file variable.h.

6.8.2 Constructor & Destructor Documentation

6.8.2.1 ABA_VARIABLE::ABA_VARIABLE (ABA_MASTER * master, const ABA_SUB * sub, bool dynamic, bool local, double obj, double lBound, double uBound, ABA_VARTYPE::TYPE type)

The constructor.

Parameters:

master
A pointer to the corresponding master of the optimization.
sub
A pointer to the subproblem associated with the variable. This can also be the 0-pointer.
dynamic
If this argument is true, then the variable can also be removed again from the set of active variables after it is added once.
local
If this argument is true, then the variable is only locally valid, otherwise it is globally valid. As a locally valid variable is always associated with a subproblem, the argument sub must not be 0 if local is true.
obj
The objective function coefficient.
lBound
The lower bound of the variable.
uBound
The upper bound of the variable.
type
The type of the variable.

6.8.2.2 virtual ABA_VARIABLE::~ABA_VARIABLE () [virtual]

The destructor.

6.8.3 Member Function Documentation

6.8.3.1 ABA_VARTYPE::TYPE ABA_VARIABLE::varType () const [inline]

Returns:

The type of the variable.

Definition at line 302 of file variable.h.

6.8.3.2 bool ABA_VARIABLE::discrete () [inline]

Returns:

true If the type of the variable is Integer or Binary,

false otherwise.

Definition at line 307 of file variable.h.

6.8.3.3 bool ABA_VARIABLE::binary () [inline]

Returns:

true If the type of the variable is Binary,

false otherwise.

Definition at line 312 of file variable.h.

6.8.3.4 bool ABA_VARIABLE::integer () [inline]

Returns:

true If the type of the variable is Integer,

false otherwise.

Definition at line 317 of file variable.h.

6.8.3.5 virtual double ABA_VARIABLE::obj () [virtual]

Returns:

The objective function coefficient.

6.8.3.6 double ABA_VARIABLE::uBound () const [inline]

Returns:

The upper bound of the variable.

Definition at line 332 of file variable.h.

6.8.3.7 void ABA_VARIABLE::uBound (double newValue) [inline]

This version of the function uBound() sets the upper bound of the variable.

Parameters:

newBound
The new value of the upper bound.

Definition at line 337 of file variable.h.

6.8.3.8 double ABA_VARIABLE::lBound () const [inline]

Returns:

The lower bound of the variable.

Definition at line 322 of file variable.h.

6.8.3.9 void ABA_VARIABLE::lBound (double newValue) [inline]

This version of the function lBound() sets the lower bound of the variable.

Parameters:

newBound
The new value of the lower bound.

Definition at line 327 of file variable.h.

6.8.3.10 ABA_FSVARSTAT * ABA_VARIABLE::fsVarStat () [inline]

Returns:

A pointer to the global status of fixing and setting of the variable.

Note:

This is the global status of fixing/setting that might differ from the local status of fixing/setting a variable returned by the function ABA_SUB::fsVarStat().

Definition at line 342 of file variable.h.

6.8.3.11 virtual bool ABA_VARIABLE::valid (ABA_SUB * sub) [virtual]

Returns:

true If the variable is globally valid, or the subproblem sub is an ancestor in the enumeration tree of the subproblem associated with the variable,

false otherwise.

Parameters:

sub
The subproblem for which validity of the variable is checked.

6.8.3.12 virtual int ABA_VARIABLE::genColumn (ABA_ACTIVE< ABA_CONSTRAINT, ABA_VARIABLE > * actCon, ABA_COLUMN & col) [virtual]

Computes the column col of the variable associated with the active constraints *actCon.

Note:

The upper and lower bound of the column are initialized with the global upper and lower bound of the variable. Therefore, an adaption with the local bounds might be required.

Returns:

The number of nonzero entries in col.

Parameters:

actCon
The constraints for which the column of the variable should be computed.
col
Stores the column when the function terminates.

6.8.3.13 virtual double ABA_VARIABLE::coeff (ABA_CONSTRAINT * con) [virtual]

Computes the coefficient of the variable in the constraint con.

Per default the coefficient of a variable is computed indirectly via the coefficient of a constraint. Problem specific redefinitions might be required.

Returns:

The coefficient of the variable in the constraint con.

Parameters:

con
The constraint of which the coefficient should be computed.

Reimplemented in ABA_COLVAR.

6.8.3.14 virtual bool ABA_VARIABLE::violated (double rc) const [virtual]

Checks, if a variable does not price out correctly, i.e., if the reduced cost rc is positive for a maximization problem and negative for a minimization problem, respectively.

Returns:

true If the variable does not price out correctly.

false otherwise.

Parameters:

rc
The reduced cost of the variable.

6.8.3.15 virtual bool ABA_VARIABLE::violated (ABA_ACTIVE< ABA_CONSTRAINT, ABA_VARIABLE > * constraints, double * y, double * slack = 0) [virtual]

This version of the function violated() checks if the variable does not price out correctly, i.e., if the reduced cost of the variable associated with the constraint set constraints and the dual variables y are positive for a maximization problem and negative for a minimization problem, respectively.

Returns:

true If the variable does not price out correctly.

false otherwise.

Parameters:

constraints
The constraints associated with the dual variables y.
y
The dual variables of the constraint.
r
If r is not the 0-pointer, it will store the reduced cost after the function call. Per default r is 0.

6.8.3.16 virtual double ABA_VARIABLE::redCost (ABA_ACTIVE< ABA_CONSTRAINT, ABA_VARIABLE > * actCon, double * y) [virtual]

Computes the reduced cost of the variable corresponding the constraint set actCon and the dual variables y.

Given the dual variables y, then the reduced cost of a variable with objective function coefficient ce, column a.e are defined as ce - yTa.e.

Returns:

The reduced cost of the variable.

Parameters:

actCon
The constraints associated with the dual variables y.
y
The dual variables of the constraint.

6.8.3.17 virtual bool ABA_VARIABLE::useful (ABA_ACTIVE< ABA_CONSTRAINT, ABA_VARIABLE > * actCon, double * y, double lpVal) [virtual]

An (inactive) discrete variable is considered as useful() if its activation might not produce only solutions worse than the best known feasible solution.

This is the same criterion for fixing inactive variables by reduced cost criteria.

Returns:

true If the variable is considered as useful,

false otherwise.

Parameters:

actCon
The active constraints.
y
The dual variables of these constraints.
lpVal
The value of the linear program.

6.8.3.18 void ABA_VARIABLE::printCol (ostream & out, ABA_ACTIVE< ABA_CONSTRAINT, ABA_VARIABLE > * constraints)

Writes the column of the variable corresponding to the constraints on the stream out.

Parameters:

out
The output stream.
constraints
The constraints for which the column should be written.

6.8.4 Member Data Documentation

6.8.4.1 ABA_FSVARSTAT ABA_VARIABLE::fsVarStat_ [protected]

The global status of fixing and setting of the variable.

Definition at line 282 of file variable.h.

6.8.4.2 double ABA_VARIABLE::obj_ [protected]

The objective function coefficient of the variable.

Definition at line 286 of file variable.h.

6.8.4.3 double ABA_VARIABLE::lBound_ [protected]

The lower bound of the variable.

Definition at line 290 of file variable.h.

6.8.4.4 double ABA_VARIABLE::uBound_ [protected]

The upper bound of the variable.

Definition at line 294 of file variable.h.

6.8.4.5 ABA_VARTYPE ABA_VARIABLE::type_ [protected]

The type of the variable.

Definition at line 298 of file variable.h.

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