ABA_VARIABLE Class Reference

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

#include <variable.h>

Inheritance diagram for ABA_VARIABLE:

ABA_CONVAR ABA_ABACUSROOT ABA_COLVAR ABA_NUMVAR List of all members.

Public Member Functions

 ABA_VARIABLE (ABA_MASTER *master, const ABA_SUB *sub, bool dynamic, bool local, double obj, double lBound, double uBound, ABA_VARTYPE::TYPE type)
virtual ~ABA_VARIABLE ()
 The destructor.
ABA_VARTYPE::TYPE varType () const
bool discrete ()
bool binary ()
bool integer ()
virtual double obj ()
double uBound () const
void uBound (double newValue)
 This version of the function uBound() sets the upper bound of the variable.
double lBound () const
void lBound (double newValue)
 This version of the function lBound() sets the lower bound of the variable.
ABA_FSVARSTATfsVarStat ()
virtual bool valid (ABA_SUB *sub)
virtual int genColumn (ABA_ACTIVE< ABA_CONSTRAINT, ABA_VARIABLE > *actCon, ABA_COLUMN &col)
 Computes the column col of the variable associated with the active constraints *actCon.
virtual double coeff (ABA_CONSTRAINT *con)
virtual bool violated (double rc) const
 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.
virtual bool violated (ABA_ACTIVE< ABA_CONSTRAINT, ABA_VARIABLE > *constraints, double *y, double *slack=0)
 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.
virtual double redCost (ABA_ACTIVE< ABA_CONSTRAINT, ABA_VARIABLE > *actCon, double *y)
 Computes the reduced cost of the variable corresponding the constraint set actCon and the dual variables y.
virtual bool useful (ABA_ACTIVE< ABA_CONSTRAINT, ABA_VARIABLE > *actCon, double *y, double lpVal)
 An (inactive) discrete variable is considered as useful() if its activation might not produce only solutions worse than the best known feasible solution.
void printCol (ostream &out, ABA_ACTIVE< ABA_CONSTRAINT, ABA_VARIABLE > *constraints)
 Writes the column of the variable corresponding to the constraints on the stream out.

Protected Attributes

ABA_FSVARSTAT fsVarStat_
double obj_
double lBound_
double uBound_
ABA_VARTYPE type_

Detailed Description

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

Definition at line 55 of file variable.h.


Constructor & Destructor Documentation

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.

virtual ABA_VARIABLE::~ABA_VARIABLE (  )  [virtual]

The destructor.


Member Function Documentation

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

Returns:
The type of the variable.

Definition at line 302 of file variable.h.

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.

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.

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.

virtual double ABA_VARIABLE::obj (  )  [virtual]

Returns:
The objective function coefficient.

double ABA_VARIABLE::uBound (  )  const [inline]

Returns:
The upper bound of the variable.

Definition at line 332 of file variable.h.

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.

double ABA_VARIABLE::lBound (  )  const [inline]

Returns:
The lower bound of the variable.

Definition at line 322 of file variable.h.

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.

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.

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.

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.

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.

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.

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.

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 $c_e$, column $a_{.e}$ are defined as $c_e - y^{\mathrm{T}} a_{.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.

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.

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.


Member Data Documentation

ABA_FSVARSTAT ABA_VARIABLE::fsVarStat_ [protected]

The global status of fixing and setting of the variable.

Definition at line 282 of file variable.h.

double ABA_VARIABLE::obj_ [protected]

The objective function coefficient of the variable.

Definition at line 286 of file variable.h.

double ABA_VARIABLE::lBound_ [protected]

The lower bound of the variable.

Definition at line 290 of file variable.h.

double ABA_VARIABLE::uBound_ [protected]

The upper bound of the variable.

Definition at line 294 of file variable.h.

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:
Generated on Tue Aug 14 18:10:00 2007 for ABACUS by  doxygen 1.5.1