49template<
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_; }
127 double lBound()
const {
return lBound_; }
164 virtual bool valid(
const Sub *sub)
const;
189 return con->coeff(
this);
218 double *y,
double *slack =
nullptr)
const;
Implements the sets of active constraints and variables which are associated with each subproblem.
Representation of variables in column format.
Common base class for constraints (Constraint) and variables (Variable).
const Sub * sub_
A pointer to the subproblem associated with the constraint/variable.
const Sub * sub() const
Returns a const pointer to the subproblem associated with the constraint/variable.
bool local_
true if the constraint/variable is only locally valid
Forms the virtual base class for all possible constraints given in pool format.
Status of fixed and set variables.
The master of the optimization.
bool ancestor(const Sub *sub) const
Returns true if this subproblem is an ancestor of the subproblem sub, false otherwise.
TYPE
The enumeration with the different variable types.
Forms the virtual base class for all possible variables given in pool format.
bool discrete() const
Returns true if the type of the variable is Integer or Binary, false otherwise.
virtual double redCost(Active< Constraint, Variable > *actCon, double *y) const
Computes the reduced cost of the variable corresponding the constraint set actCon and the dual variab...
double obj_
The objective function coefficient of the variable.
FSVarStat fsVarStat_
The global status of fixing and setting of the variable.
virtual double obj() const
Returns the objective function coefficient.
VarType::TYPE varType() const
Returns the type of the variable.
void lBound(double newBound)
Sets the lower bound of the variable to newBound.
void uBound(double newBound)
Sets the upper bound of the variable to newBound.
const FSVarStat * fsVarStat() const
virtual bool useful(Active< Constraint, Variable > *actCon, double *y, double lpVal) const
Returns whether an (inactive) discrete variable is useful.
virtual double coeff(const Constraint *con) const
Computes the coefficient of the variable in the constraint con.
virtual bool valid(const Sub *sub) const
Returns true if the variable is valid, false otherwise.
bool integer() const
Returns true If the type of the variable is Integer, false otherwise.
double uBound_
The upper bound 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.
virtual int genColumn(Active< Constraint, Variable > *actCon, Column &col) const
Computes the column col of the variable associated with the active constraints *actCon.
void printCol(std::ostream &out, Active< Constraint, Variable > *constraints) const
Writes the column of the variable corresponding to the constraints to output stream out.
double uBound() const
Returns the upper bound of the variable.
double lBound_
The lower bound of the variable.
double lBound() const
Returns the lower bound of the variable.
virtual bool violated(Active< Constraint, Variable > *constraints, double *y, double *slack=nullptr) const
Checks, if a variable does not price out correctly.
VarType type_
The type of the variable.
bool binary() const
Returns true If the type of the variable is Binary, false otherwise.
virtual bool violated(double rc) const
Checks, if a variable does not price out correctly.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
constraints and variables.
status of fixed and set variables.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
the master of the optimization.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()