|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
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,
Implements the sets of active constraints and variables which are associated with each subproblem.
VarType::TYPE varType() const
Returns the type of the variable.
Variable(Master *master, const Sub *sub, bool dynamic, bool local, double obj, double lBound, double uBound, VarType::TYPE type)
Initializes a variable.
const Sub * sub() const
Returns a const pointer to the subproblem associated with the constraint/variable.
bool integer() const
Returns true If the type of the variable is Integer, false otherwise.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
status of fixed and set variables.
constraints and variables.
bool discrete() const
Returns true if the type of the variable is Integer or Binary, false otherwise.
virtual double obj() const
Returns the objective function coefficient.
Status of fixed and set variables.
VarType type_
The type of the variable.
double lBound() const
Returns the lower bound of the variable.
const Sub * sub_
A pointer to the subproblem associated with the constraint/variable.
FSVarStat fsVarStat_
The global status of fixing and setting of the variable.
Common base class for constraints (Constraint) and variables (Variable).
virtual bool valid(const Sub *sub) const
Returns true if the variable is valid, false otherwise.
double obj_
The objective function coefficient of the variable.
Forms the virtual base class for all possible variables given in pool format.
bool binary() const
Returns true If the type of the variable is Binary, false otherwise.
virtual double coeff(const Constraint *con) const
Computes the coefficient of the variable in the constraint con.
Representation of variables in column format.
bool local_
true if the constraint/variable is only locally valid
virtual double coeff(const Variable *v) const =0
Returns the coefficient of the variable v in the constraint.
the master of the optimization.
double lBound_
The lower bound of the variable.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
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.
double uBound_
The upper bound of the variable.
TYPE
The enumeration with the different variable types.
void uBound(double newBound)
Sets the upper bound of the variable to newBound.
bool ancestor(const Sub *sub) const
Returns true if this subproblem is an ancestor of the subproblem sub, false otherwise.
const FSVarStat * fsVarStat() const
The master of the optimization.
double uBound() const
Returns the upper bound of the variable.