49 template<
class BaseType,
class CoType>
class Active;
87 :
ConVar(master, sub, dynamic, local),
88 fsVarStat_(master), obj_(obj), lBound_(lBound), uBound_(uBound), type_(type)
104 bool binary()
const {
return type_.binary(); }
108 bool integer()
const {
return type_.integer(); }
112 virtual double obj()
const {
return obj_; }
116 double uBound()
const {
return uBound_; }
123 void uBound(
double newBound) { uBound_ = newBound; }
127 double lBound()
const {
return lBound_; }
134 void lBound(
double newBound) { lBound_ = newBound; }
164 virtual bool valid(
const Sub *sub)
const;
189 return con->
coeff(
this);
202 virtual bool violated(
double rc)
const;
218 double *y,
double *slack =
nullptr)
const;
258 void printCol(std::ostream &out,
274 return (!local_ || sub->
ancestor(sub_));
virtual double obj() const
Returns the objective function coefficient.
The master of the optimization.
double lBound() const
Returns the lower bound of the variable.
Implements the sets of active constraints and variables which are associated with each subproblem...
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Common base class for constraints (Constraint) and variables (Variable).
double uBound_
The upper bound of the variable.
status of fixed and set variables.
Representation of variables in column format.
bool discrete() const
Returns true if the type of the variable is Integer or Binary, false otherwise.
double lBound_
The lower bound of the variable.
Status of fixed and set variables.
bool binary() const
Returns true If the type of the variable is Binary, false otherwise.
double uBound() const
Returns the upper bound of the variable.
const FSVarStat * fsVarStat() const
the master of the optimization.
virtual bool valid(const Sub *sub) const
Returns true if the variable is valid, false otherwise.
FSVarStat fsVarStat_
The global status of fixing and setting of the variable.
Forms the virtual base class for all possible constraints given in pool format.
void lBound(double newBound)
Sets the lower bound of the variable to newBound.
constraints and variables.
bool integer() const
Returns true If the type of the variable is Integer, false otherwise.
bool ancestor(const Sub *sub) const
Returns true if this subproblem is an ancestor of the subproblem sub, false otherwise.
double obj_
The objective function coefficient of the variable.
Forms the virtual base class for all possible variables given in pool format.
VarType type_
The type of the variable.
VarType::TYPE varType() const
Returns the type of the variable.
void uBound(double newBound)
Sets the upper bound of the variable to newBound.
TYPE
The enumeration with the different variable types.
Variable(Master *master, const Sub *sub, bool dynamic, bool local, double obj, double lBound, double uBound, VarType::TYPE type)
Initializes a variable.
virtual double coeff(const Variable *v) const =0
Returns the coefficient of the variable v in the constraint.
virtual double coeff(const Constraint *con) const
Computes the coefficient of the variable in the constraint con.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.