Couenne  0.5.8
Public Member Functions | Protected Attributes | List of all members
Couenne::CouenneConstraint Class Reference

Class to represent nonlinear constraints. More...

#include <CouenneProblemElem.hpp>

+ Inheritance diagram for Couenne::CouenneConstraint:
+ Collaboration diagram for Couenne::CouenneConstraint:

Public Member Functions

 CouenneConstraint (expression *body=NULL, expression *lb=NULL, expression *ub=NULL)
 Constructor. More...
 
virtual ~CouenneConstraint ()
 Destructor. More...
 
 CouenneConstraint (const CouenneConstraint &c, Domain *d=NULL)
 Copy constructor. More...
 
virtual CouenneConstraintclone (Domain *d=NULL) const
 Cloning method. More...
 
virtual expressionBody (expression *newBody)
 Set body of constraint. More...
 
virtual exprAuxstandardize (CouenneProblem *)
 decompose body of constraint through auxiliary variables More...
 
virtual void print (std::ostream &=std::cout)
 print constraint More...
 

Protected Attributes

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

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

Constructor & Destructor Documentation

◆ CouenneConstraint() [1/2]

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

Constructor.

Definition at line 50 of file CouenneProblemElem.hpp.

◆ ~CouenneConstraint()

virtual Couenne::CouenneConstraint::~CouenneConstraint ( )
inlinevirtual

Destructor.

Definition at line 67 of file CouenneProblemElem.hpp.

◆ CouenneConstraint() [2/2]

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

Copy constructor.

Definition at line 74 of file CouenneProblemElem.hpp.

Member Function Documentation

◆ clone()

virtual CouenneConstraint* Couenne::CouenneConstraint::clone ( Domain d = NULL) const
inlinevirtual

Cloning method.

Reimplemented in Couenne::CouennePSDcon.

Definition at line 80 of file CouenneProblemElem.hpp.

◆ Body()

virtual expression* Couenne::CouenneConstraint::Body ( expression newBody)
inlinevirtual

Set body of constraint.

Definition at line 89 of file CouenneProblemElem.hpp.

◆ standardize()

virtual exprAux* Couenne::CouenneConstraint::standardize ( CouenneProblem )
virtual

decompose body of constraint through auxiliary variables

Reimplemented in Couenne::CouennePSDcon.

◆ print()

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

print constraint

Reimplemented in Couenne::CouennePSDcon.

Member Data Documentation

◆ body_

expression* Couenne::CouenneConstraint::body_
protected

Body of constraint.

Definition at line 43 of file CouenneProblemElem.hpp.

◆ lb_

expression* Couenne::CouenneConstraint::lb_
protected

Lower bound (expression)

Definition at line 44 of file CouenneProblemElem.hpp.

◆ ub_

expression* Couenne::CouenneConstraint::ub_
protected

Upper bound (expression)

Definition at line 45 of file CouenneProblemElem.hpp.


The documentation for this class was generated from the following file: