#include <variable.h>
Inheritance diagram for ABA_VARIABLE:
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_FSVARSTAT * | fsVarStat () |
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_ |
Definition at line 55 of file variable.h.
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.
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.
ABA_VARTYPE::TYPE ABA_VARIABLE::varType | ( | ) | const [inline] |
bool ABA_VARIABLE::discrete | ( | ) | [inline] |
false otherwise.
Definition at line 307 of file variable.h.
bool ABA_VARIABLE::binary | ( | ) | [inline] |
false otherwise.
Definition at line 312 of file variable.h.
bool ABA_VARIABLE::integer | ( | ) | [inline] |
false otherwise.
Definition at line 317 of file variable.h.
virtual double ABA_VARIABLE::obj | ( | ) | [virtual] |
double ABA_VARIABLE::uBound | ( | ) | const [inline] |
void ABA_VARIABLE::uBound | ( | double | newValue | ) | [inline] |
This version of the function uBound() sets the upper bound of the variable.
newBound | The new value of the upper bound. |
Definition at line 337 of file variable.h.
double ABA_VARIABLE::lBound | ( | ) | const [inline] |
void ABA_VARIABLE::lBound | ( | double | newValue | ) | [inline] |
This version of the function lBound() sets the lower bound of the variable.
newBound | The new value of the lower bound. |
Definition at line 327 of file variable.h.
ABA_FSVARSTAT * ABA_VARIABLE::fsVarStat | ( | ) | [inline] |
Definition at line 342 of file variable.h.
virtual bool ABA_VARIABLE::valid | ( | ABA_SUB * | sub | ) | [virtual] |
false otherwise.
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.
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.
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.
false otherwise.
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.
false otherwise.
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 , then the reduced cost of a variable with objective function coefficient
, column
are defined as
.
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.
false otherwise.
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.
out | The output stream. | |
constraints | The constraints for which the column should be written. |
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.