|
| Variable () |
| Default constructor.
|
|
| Variable (UInt id, UInt index, double lb, double ub, VariableType vtype, std::string name) |
| Construct a variable with an id, lb, ub, type and name.
|
|
virtual | ~Variable () |
| Destroy.
|
|
VariablePtr | clone (UInt id) const |
| Create a copy.
|
|
UInt | getId () const |
| Get the unique id.
|
|
UInt | getIndex () const |
|
double | getInitVal () const |
| Get starting or initial value.
|
|
double | getLb () const |
| Get lowerbound.
|
|
double | getUb () const |
| Get upperbound.
|
|
VariableType | getType () const |
| Get the type (binary, integer, continuous).
|
|
FunctionType | getFunType () const |
| Get the function type of constraints that this variable is in.
|
|
VarSrcType | getSrcType () const |
| Get the type of origin of this variable.
|
|
VarState | getState () const |
| Get the state (fixed, deleted, ...).
|
|
UInt | getNumCons () const |
|
UInt | getItmp () const |
|
ConstrSet::iterator | consBegin () |
| First iterator of constraints where this variable appears.
|
|
ConstrSet::iterator | consEnd () |
| Last iterator of constraints where this variable appears.
|
|
const std::string | getName () const |
| Get name of the variable.
|
|
void | setItmp (UInt itmp) |
|
void | write (std::ostream &out) const |
| Write the full description of the variable including name, bounds, type etc.
|
|
void | writeConstraintMap (std::ostream &out) const |
| Write the list of constraints in which this variable occurs.
|
|
|
void | setFunType_ (FunctionType ftype) |
| Change the function type to a new value.
|
|
void | setId_ (UInt n) |
| Change the id to a new value.
|
|
void | setIndex_ (UInt n) |
| Change the index to a new value.
|
|
void | setInitVal_ (double val) |
| Change starting value.
|
|
void | setLb_ (double newLb) |
| Change the lowerbound to a new value.
|
|
void | setName_ (std::string newName) |
| Change the name to a new value.
|
|
void | setSrcType (VarSrcType stype) |
| Change the type of the origin of this variable.
|
|
void | setState_ (VarState state) |
| Change the state to a new value.
|
|
void | setType_ (VariableType vtype) |
| Change the type to a new value.
|
|
void | setUb_ (double newUb) |
| Change the upperbound to a new value.
|
|
void | outOfConstraint_ (ConstraintPtr cPtr) |
| Remove the constraint from the list of constraints this variable belongs to.
|
|
void | inConstraint_ (ConstraintPtr c) |
| Add the constraint to the list of constraints this variable belongs to.
|
|
void | clearConstraints_ () |
| Clear the list of constraints this variable belongs to.
|
|
Variable class contains methods for defining and changing variables of a Problem. A variable has bounds (lb, ub), a type (binary, integer, continuous), a name, and an id which is unique for the variable and is usually generated by the Problem.