CouenneConstraint Class Reference

Class to represent nonlinear constraints. More...

#include <CouenneProblemElem.hpp>

Collaboration diagram for CouenneConstraint:

Collaboration graph
[legend]
List of all members.

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.
CouenneConstraintclone (Domain *d=NULL) const
 Cloning method.
expressionLb () const
 Expression of lower bound.
expressionUb () const
 Expression of upper bound.
expressionBody () const
 Expression of body of constraint.
expressionBody (expression *newBody)
 Set body of constraint.
exprAuxstandardize (CouenneProblem *)
 decompose body of constraint through auxiliary variables
void print (std::ostream &=std::cout)
 print constraint

Protected Attributes

expressionbody_
 Body of constraint.
expressionlb_
 Lower bound (expression).
expressionub_
 Upper bound (expression).

Detailed Description

Class to represent nonlinear constraints.

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 38 of file CouenneProblemElem.hpp.


Constructor & Destructor Documentation

CouenneConstraint::CouenneConstraint ( expression body = NULL,
expression lb = NULL,
expression ub = NULL 
) [inline]

Constructor.

Definition at line 49 of file CouenneProblemElem.hpp.

References COUENNE_INFINITY, lb_, and ub_.

Referenced by clone().

CouenneConstraint::~CouenneConstraint (  )  [inline]

Destructor.

Definition at line 66 of file CouenneProblemElem.hpp.

References body_, lb_, and ub_.

CouenneConstraint::CouenneConstraint ( const CouenneConstraint c,
Domain d = NULL 
) [inline]

Copy constructor.

Definition at line 73 of file CouenneProblemElem.hpp.


Member Function Documentation

CouenneConstraint* CouenneConstraint::clone ( Domain d = NULL  )  const [inline]

Cloning method.

Definition at line 79 of file CouenneProblemElem.hpp.

References CouenneConstraint().

expression* CouenneConstraint::Lb (  )  const [inline]

Expression of lower bound.

Definition at line 83 of file CouenneProblemElem.hpp.

References lb_.

expression* CouenneConstraint::Ub (  )  const [inline]

Expression of upper bound.

Definition at line 84 of file CouenneProblemElem.hpp.

References ub_.

expression* CouenneConstraint::Body (  )  const [inline]

Expression of body of constraint.

Definition at line 85 of file CouenneProblemElem.hpp.

References body_.

expression* CouenneConstraint::Body ( expression newBody  )  [inline]

Set body of constraint.

Definition at line 88 of file CouenneProblemElem.hpp.

References body_.

exprAux * CouenneConstraint::standardize ( CouenneProblem  ) 

decompose body of constraint through auxiliary variables

Definition at line 25 of file constrStandardize.cpp.

References body_, compareExpr(), exprAux::Continuous, COU_EXPRCONST, exprAux::Integer, isInteger(), lb_, print(), replace(), ub_, VAR, and w.

void CouenneConstraint::print ( std::ostream &  = std::cout  ) 

print constraint

Definition at line 18 of file constraint.cpp.

References body_, CONST, COUENNE_EPS, COUENNE_INFINITY, lb_, and ub_.

Referenced by standardize().


Member Data Documentation

expression* CouenneConstraint::body_ [protected]

Body of constraint.

Definition at line 42 of file CouenneProblemElem.hpp.

Referenced by Body(), print(), standardize(), and ~CouenneConstraint().

expression* CouenneConstraint::lb_ [protected]

Lower bound (expression).

Definition at line 43 of file CouenneProblemElem.hpp.

Referenced by CouenneConstraint(), Lb(), print(), standardize(), and ~CouenneConstraint().

expression* CouenneConstraint::ub_ [protected]

Upper bound (expression).

Definition at line 44 of file CouenneProblemElem.hpp.

Referenced by CouenneConstraint(), print(), standardize(), Ub(), and ~CouenneConstraint().


The documentation for this class was generated from the following files:
Generated on Tue Mar 30 03:11:56 2010 by  doxygen 1.4.7