46 template<
class BaseType,
class CoType>
class Active;
105 :
ConVar(rhs), sense_(rhs.sense_), rhs_(rhs.rhs_), conClass_(nullptr), liftable_(rhs.liftable_)
127 virtual double coeff(
const Variable *v)
const = 0;
130 virtual double rhs()
const {
return rhs_; }
153 virtual bool valid(
Sub *sub)
const;
192 virtual bool violated(
204 virtual bool violated(
double slack)
const;
296 :
ConVar(master, sub, dynamic, local), sense_(sense), rhs_(rhs), conClass_(nullptr), liftable_(liftable)
298 if (local && sub ==
nullptr) {
299 Logger::ifout() <<
"Constraint::Constraint(): subtree of local item must not be 0\n";
CSense * sense()
Returns a pointer to the sense of the constraint.
Representation of constraints in the row format.
The master of the optimization.
constraint classification.
INFEAS
The different ways of infeasibility of a constraint.
Implements the sets of active constraints and variables which are associated with each subproblem...
virtual ConClass * classify(Active< Variable, Constraint > *var) const
The default implementation returns a 0 pointer.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
virtual double rhs() const
Returns the right hand side of the constraint.
Common base class for constraints (Constraint) and variables (Variable).
bool local_
true if the constraint/variable is only locally valid
CSense sense_
The sense of the constraint.
const Sub * sub_
A pointer to the subproblem associated with the constraint/variable.
the master of the optimization.
Forms the virtual base class for all possible constraints given in pool format.
Constraint(Master *master, const Sub *sub, CSense::SENSE sense, double rhs, bool dynamic, bool local, bool liftable)
Initializes a constraint.
static std::ostream & ifout()
stream for forced output (global; used by internal libraries, e.g. Abacus)
constraints and variables.
#define OGDF_THROW_PARAM(CLASS, PARAM)
Replacement for throw.
Exception thrown when an algorithm realizes an internal bug that prevents it from continuing...
The linear program of a subproblem.
double rhs_
The right hand side of the constraint.
bool ancestor(const Sub *sub) const
Returns true if this subproblem is an ancestor of the subproblem sub, false otherwise.
bool liftable() const
Checks if the constraint is liftable.
Forms the virtual base class for all possible variables given in pool format.
Constraint classification.
Constraint(const Constraint &rhs)
Copy constructor.
virtual bool valid(Sub *sub) const
Checks if the constraint is valid for the subproblem sub.
bool liftable_
This member is true if also coefficients of variables which have been inactive at generation time can...
const CSense * sense() const
Returns a const pointer to the sense of the constraint.
const Sub * sub() const
Returns a const pointer to the subproblem associated with the constraint/variable.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.