#include <CouenneProblemElem.hpp>
Collaboration diagram for Couenne::CouenneConstraint:
Public Member Functions | |
CouenneConstraint (expression *body=NULL, expression *lb=NULL, expression *ub=NULL) | |
Constructor. | |
~CouenneConstraint () | |
Destructor. | |
CouenneConstraint (const CouenneConstraint &c, Domain *d=NULL) | |
Copy constructor. | |
CouenneConstraint * | clone (Domain *d=NULL) const |
Cloning method. | |
expression * | Lb () const |
Expression of lower bound. | |
expression * | Ub () const |
Expression of upper bound. | |
expression * | Body () const |
Expression of body of constraint. | |
expression * | Body (expression *newBody) |
Set body of constraint. | |
exprAux * | standardize (CouenneProblem *) |
decompose body of constraint through auxiliary variables | |
void | print (std::ostream &=std::cout) |
print constraint | |
Protected Attributes | |
expression * | body_ |
Body of constraint. | |
expression * | lb_ |
Lower bound (expression). | |
expression * | ub_ |
Upper bound (expression). |
It consists of an expression as the body and two range expressions as lower- and upper bounds.
A general constraint is defined as lb_ <= body_ <= ub_, where all three components are expressions, depending on variables, auxiliaries and bounds. If the constraint is 2 <= exp (x1+x2) <= 4, then:
body_ = exp (x1+x2), that is,
new exprExp (new exprSum (new exprVar (1), new exprVar (2))
while lb_ = new exprConst (2.) and ub_ = new exprConst (4.).
Definition at line 39 of file CouenneProblemElem.hpp.
Couenne::CouenneConstraint::CouenneConstraint | ( | expression * | body = NULL , |
|
expression * | lb = NULL , |
|||
expression * | ub = NULL | |||
) | [inline] |
Constructor.
Definition at line 50 of file CouenneProblemElem.hpp.
References COUENNE_INFINITY, lb_, and ub_.
Referenced by clone().
Couenne::CouenneConstraint::~CouenneConstraint | ( | ) | [inline] |
Couenne::CouenneConstraint::CouenneConstraint | ( | const CouenneConstraint & | c, | |
Domain * | d = NULL | |||
) | [inline] |
CouenneConstraint* Couenne::CouenneConstraint::clone | ( | Domain * | d = NULL |
) | const [inline] |
Cloning method.
Definition at line 80 of file CouenneProblemElem.hpp.
References CouenneConstraint().
expression* Couenne::CouenneConstraint::Lb | ( | ) | const [inline] |
expression* Couenne::CouenneConstraint::Ub | ( | ) | const [inline] |
expression* Couenne::CouenneConstraint::Body | ( | ) | const [inline] |
Expression of body of constraint.
Definition at line 86 of file CouenneProblemElem.hpp.
References body_.
expression* Couenne::CouenneConstraint::Body | ( | expression * | newBody | ) | [inline] |
exprAux * CouenneConstraint::standardize | ( | CouenneProblem * | ) |
decompose body of constraint through auxiliary variables
Definition at line 31 of file constrStandardize.cpp.
References Couenne::expression::AUX_EQ, Couenne::expression::AUX_GEQ, Couenne::expression::AUX_LEQ, body_, Couenne::exprAux::Continuous, Couenne::COU_EXPRCONST, COUENNE_EPS, COUENNE_INFINITY, Couenne::exprAux::Integer, Couenne::isInteger(), Couenne::J_REFORMULATE(), lb_, print(), replace(), ub_, Couenne::VAR, and w.
void CouenneConstraint::print | ( | std::ostream & | = std::cout |
) |
print constraint
Definition at line 19 of file constraint.cpp.
References body_, Couenne::CONST, COUENNE_EPS, COUENNE_INFINITY, lb_, and ub_.
Referenced by standardize().
expression* Couenne::CouenneConstraint::body_ [protected] |
Body of constraint.
Definition at line 43 of file CouenneProblemElem.hpp.
Referenced by Body(), print(), standardize(), and ~CouenneConstraint().
expression* Couenne::CouenneConstraint::lb_ [protected] |
Lower bound (expression).
Definition at line 44 of file CouenneProblemElem.hpp.
Referenced by CouenneConstraint(), Lb(), print(), standardize(), and ~CouenneConstraint().
expression* Couenne::CouenneConstraint::ub_ [protected] |
Upper bound (expression).
Definition at line 45 of file CouenneProblemElem.hpp.
Referenced by CouenneConstraint(), print(), standardize(), Ub(), and ~CouenneConstraint().