Couenne::exprAux Class Reference

Auxiliary variable. More...

#include <CouenneExprAux.hpp>

Inheritance diagram for Couenne::exprAux:

Inheritance graph
[legend]
Collaboration diagram for Couenne::exprAux:

Collaboration graph
[legend]
List of all members.

Public Types

 Unset = -1
 Continuous
 Integer
enum  intType { Unset = -1, Continuous, Integer }
 integrality type of an auxiliary variable: unset, continuous, integer More...

Public Member Functions

enum nodeType Type () const
 Node type.
 exprAux (expression *, int, int, intType=Unset, Domain *=NULL, enum auxSign=expression::AUX_EQ)
 Constructor.
 exprAux (expression *, Domain *=NULL, enum auxSign=expression::AUX_EQ)
 Constructor to be used with standardize ([...], false).
virtual ~exprAux ()
 Destructor.
 exprAux (const exprAux &, Domain *d=NULL)
 Copy constructor.
virtual exprVarclone (Domain *d=NULL) const
 Cloning method.
expressionLb ()
 get lower bound expression
expressionUb ()
 get upper bound expression
virtual void print (std::ostream &=std::cout, bool=false) const
 Print expression.
expressionImage () const
 The expression associated with this auxiliary variable.
void Image (expression *image)
 Sets expression associated with this auxiliary variable.
CouNumber operator() ()
 Null function for evaluating the expression.
int DepList (std::set< int > &deplist, enum dig_type type=ORIG_ONLY)
 fill in the set with all indices of variables appearing in the expression
expressionsimplify ()
 simplify
int Linearity ()
 Get a measure of "how linear" the expression is (see CouenneTypes.h).
void crossBounds ()
 set bounds depending on both branching rules and propagated bounds.
void generateCuts (OsiCuts &, const CouenneCutGenerator *, t_chg_bounds *=NULL, int=-1, CouNumber=-COUENNE_INFINITY, CouNumber=COUENNE_INFINITY)
 generate cuts for expression associated with this auxiliary
virtual int rank ()
 used in rank-based branching variable choice
virtual bool isDefinedInteger ()
 is this expression defined as integer?
virtual bool isInteger ()
 is this expression integer?
virtual void setInteger (bool value)
 Set this variable as integer.
void increaseMult ()
 Tell this variable appears once more.
void decreaseMult ()
 Tell this variable appears once less (standardized within exprSum, for instance).
void zeroMult ()
 Disable this auxiliary variable.
int Multiplicity ()
 How many times this variable appears.
void linkDomain (Domain *d)
 link this variable to a domain
bool & top_level ()
 return top_level_
CouenneObjectproperObject (CouenneCutGenerator *c, CouenneProblem *p, Bonmin::BabSetupBase *base, JnlstPtr jnlst)
 return proper object to handle expression associated with this variable (NULL if this is not an auxiliary)
virtual enum auxSign sign () const
 return its sign in the definition constraint

Protected Attributes

expressionimage_
 The expression associated with this auxiliary variable.
expressionlb_
 lower bound, a function of the associated expression and the bounds on the variables in the expression
expressionub_
 upper bound, a function of the associated expression and the bounds on the variables in the expression
int rank_
 used in rank-based branching variable choice: original variables have rank 1; auxiliary w=f(x) has rank r(w) = r(x)+1; finally, auxiliary w=f(x1,x2.
int multiplicity_
 number of appearances of this aux in the formulation.
enum intType integer_
 is this variable integer?
bool top_level_
 True if this variable replaces the lhs of a constraint, i.e., if it is a top level variable in the DAG of the problem.
enum auxSign sign_
 "sign" of the defining constraint

Detailed Description

Auxiliary variable.

It is associated with an expression which depends, in general, on original and/or other auxiliary variables. It is used for AMPL's defined variables (aka common expressions) and to reformulate nonlinear constraints/objectives.

Definition at line 31 of file CouenneExprAux.hpp.


Member Enumeration Documentation

enum Couenne::exprAux::intType

integrality type of an auxiliary variable: unset, continuous, integer

Enumerator:
Unset 
Continuous 
Integer 

Definition at line 36 of file CouenneExprAux.hpp.


Constructor & Destructor Documentation

exprAux::exprAux ( expression ,
int  ,
int  ,
intType  = Unset,
Domain = NULL,
enum  auxSign = expression::AUX_EQ 
)

Constructor.

Definition at line 29 of file exprAux.cpp.

References Couenne::exprVar::domain_, lb_, ub_, and Couenne::exprVar::varIndex_.

Referenced by clone().

exprAux::exprAux ( expression ,
Domain = NULL,
enum  auxSign = expression::AUX_EQ 
)

Constructor to be used with standardize ([...], false).

Definition at line 57 of file exprAux.cpp.

exprAux::~exprAux (  )  [virtual]

Destructor.

Definition at line 96 of file exprAux.cpp.

References image_, lb_, and ub_.

exprAux::exprAux ( const exprAux ,
Domain d = NULL 
)

Copy constructor.

Definition at line 73 of file exprAux.cpp.

References Couenne::exprVar::domain_, lb_, ub_, and Couenne::exprVar::varIndex_.


Member Function Documentation

enum nodeType Couenne::exprAux::Type (  )  const [inline, virtual]

Node type.

Reimplemented from Couenne::exprVar.

Definition at line 74 of file CouenneExprAux.hpp.

References Couenne::AUX.

Referenced by simplify().

virtual exprVar* Couenne::exprAux::clone ( Domain d = NULL  )  const [inline, virtual]

Cloning method.

Reimplemented from Couenne::exprVar.

Definition at line 90 of file CouenneExprAux.hpp.

References exprAux().

expression* Couenne::exprAux::Lb (  )  [inline, virtual]

get lower bound expression

Reimplemented from Couenne::exprVar.

Definition at line 93 of file CouenneExprAux.hpp.

References lb_.

expression* Couenne::exprAux::Ub (  )  [inline, virtual]

get upper bound expression

Reimplemented from Couenne::exprVar.

Definition at line 94 of file CouenneExprAux.hpp.

References ub_.

void exprAux::print ( std::ostream &  = std::cout,
bool  = false 
) const [virtual]

Print expression.

Reimplemented from Couenne::exprVar.

Definition at line 141 of file exprAux.cpp.

References image_, integer_, and Couenne::exprVar::varIndex_.

Referenced by generateCuts().

expression* Couenne::exprAux::Image (  )  const [inline, virtual]

The expression associated with this auxiliary variable.

Reimplemented from Couenne::expression.

Definition at line 101 of file CouenneExprAux.hpp.

References image_.

void Couenne::exprAux::Image ( expression image  )  [inline, virtual]

Sets expression associated with this auxiliary variable.

Reimplemented from Couenne::expression.

Definition at line 105 of file CouenneExprAux.hpp.

References image_.

CouNumber Couenne::exprAux::operator() (  )  [inline, virtual]

Null function for evaluating the expression.

Reimplemented from Couenne::exprVar.

Definition at line 109 of file CouenneExprAux.hpp.

References Couenne::exprVar::domain_, Couenne::exprVar::varIndex_, and x.

int exprAux::DepList ( std::set< int > &  deplist,
enum dig_type  type = ORIG_ONLY 
) [virtual]

fill in the set with all indices of variables appearing in the expression

Reimplemented from Couenne::exprVar.

Definition at line 157 of file exprAux.cpp.

References image_, Couenne::ORIG_ONLY, Couenne::STOP_AT_AUX, and Couenne::exprVar::varIndex_.

expression * exprAux::simplify (  )  [virtual]

simplify

Reimplemented from Couenne::exprVar.

Definition at line 175 of file exprAux.cpp.

References Couenne::AUX, Couenne::expression::AUX_EQ, image_, multiplicity_, sign_, Type(), and Couenne::VAR.

int Couenne::exprAux::Linearity (  )  [inline, virtual]

Get a measure of "how linear" the expression is (see CouenneTypes.h).

Reimplemented from Couenne::exprVar.

Definition at line 121 of file CouenneExprAux.hpp.

References Couenne::LINEAR.

void exprAux::crossBounds (  )  [virtual]

set bounds depending on both branching rules and propagated bounds.

To be used after standardization

Reimplemented from Couenne::exprVar.

Definition at line 127 of file exprAux.cpp.

References Couenne::expression::AUX_GEQ, Couenne::expression::AUX_LEQ, Couenne::exprVar::getBounds(), image_, lb_, sign_, and ub_.

void exprAux::generateCuts ( OsiCuts &  ,
const CouenneCutGenerator ,
t_chg_bounds = NULL,
int  = -1,
CouNumber  = -COUENNE_INFINITY,
CouNumber  = COUENNE_INFINITY 
) [virtual]

generate cuts for expression associated with this auxiliary

Reimplemented from Couenne::exprVar.

Definition at line 193 of file exprAux.cpp.

References Couenne::expression::ArgList(), Couenne::expression::Argument(), Couenne::expression::AUX_EQ, Couenne::expression::AUX_LEQ, COU_MAX_COEFF, Couenne::exprVar::domain_, Couenne::draw_cuts(), image_, Couenne::exprVar::Index(), Couenne::J_CONVEXIFYING(), Couenne::exprVar::lb(), n, Couenne::expression::nArgs(), print(), sign(), Couenne::exprVar::ub(), Couenne::exprVar::varIndex_, and x.

virtual int Couenne::exprAux::rank (  )  [inline, virtual]

used in rank-based branching variable choice

Reimplemented from Couenne::exprVar.

Definition at line 140 of file CouenneExprAux.hpp.

References rank_.

virtual bool Couenne::exprAux::isDefinedInteger (  )  [inline, virtual]

is this expression defined as integer?

Reimplemented from Couenne::exprVar.

Definition at line 144 of file CouenneExprAux.hpp.

References Continuous, image_, Integer, integer_, isInteger(), and Unset.

Referenced by isInteger().

virtual bool Couenne::exprAux::isInteger (  )  [inline, virtual]

is this expression integer?

Reimplemented from Couenne::exprVar.

Definition at line 153 of file CouenneExprAux.hpp.

References COUENNE_round, isDefinedInteger(), Couenne::exprVar::lb(), and Couenne::exprVar::ub().

Referenced by isDefinedInteger().

virtual void Couenne::exprAux::setInteger ( bool  value  )  [inline, virtual]

Set this variable as integer.

Reimplemented from Couenne::exprVar.

Definition at line 165 of file CouenneExprAux.hpp.

References Continuous, Integer, and integer_.

void Couenne::exprAux::increaseMult (  )  [inline]

Tell this variable appears once more.

Definition at line 169 of file CouenneExprAux.hpp.

References multiplicity_.

void Couenne::exprAux::decreaseMult (  )  [inline, virtual]

Tell this variable appears once less (standardized within exprSum, for instance).

Reimplemented from Couenne::exprVar.

Definition at line 173 of file CouenneExprAux.hpp.

References multiplicity_.

void Couenne::exprAux::zeroMult (  )  [inline, virtual]

Disable this auxiliary variable.

Reimplemented from Couenne::exprVar.

Definition at line 176 of file CouenneExprAux.hpp.

References multiplicity_.

int Couenne::exprAux::Multiplicity (  )  [inline, virtual]

How many times this variable appears.

Reimplemented from Couenne::expression.

Definition at line 179 of file CouenneExprAux.hpp.

References multiplicity_.

void Couenne::exprAux::linkDomain ( Domain d  )  [inline, virtual]

link this variable to a domain

Reimplemented from Couenne::exprVar.

Definition at line 182 of file CouenneExprAux.hpp.

References Couenne::exprVar::domain_, lb_, and ub_.

bool& Couenne::exprAux::top_level (  )  [inline]

return top_level_

Definition at line 189 of file CouenneExprAux.hpp.

References top_level_.

CouenneObject * exprAux::properObject ( CouenneCutGenerator c,
CouenneProblem p,
Bonmin::BabSetupBase base,
JnlstPtr  jnlst 
) [virtual]

return proper object to handle expression associated with this variable (NULL if this is not an auxiliary)

Reimplemented from Couenne::exprVar.

Definition at line 294 of file exprAux.cpp.

References Couenne::expression::ArgList(), c, Couenne::exprVar::code(), Couenne::COU_EXPRMUL, COUENNE_EPS, COUENNE_INFINITY, image_, Couenne::exprVar::Index(), Couenne::exprVar::lb(), top_level_, and Couenne::exprVar::ub().

virtual enum auxSign Couenne::exprAux::sign (  )  const [inline, virtual]

return its sign in the definition constraint

Reimplemented from Couenne::exprVar.

Definition at line 200 of file CouenneExprAux.hpp.

References sign_.

Referenced by generateCuts().


Member Data Documentation

expression* Couenne::exprAux::image_ [protected]

The expression associated with this auxiliary variable.

Definition at line 41 of file CouenneExprAux.hpp.

Referenced by crossBounds(), DepList(), generateCuts(), Image(), isDefinedInteger(), print(), properObject(), simplify(), and ~exprAux().

expression* Couenne::exprAux::lb_ [protected]

lower bound, a function of the associated expression and the bounds on the variables in the expression

Definition at line 45 of file CouenneExprAux.hpp.

Referenced by crossBounds(), exprAux(), Lb(), linkDomain(), and ~exprAux().

expression* Couenne::exprAux::ub_ [protected]

upper bound, a function of the associated expression and the bounds on the variables in the expression

Definition at line 49 of file CouenneExprAux.hpp.

Referenced by crossBounds(), exprAux(), linkDomain(), Ub(), and ~exprAux().

int Couenne::exprAux::rank_ [protected]

used in rank-based branching variable choice: original variables have rank 1; auxiliary w=f(x) has rank r(w) = r(x)+1; finally, auxiliary w=f(x1,x2.

..,xk) has rank r(w) = 1+max{r(xi):i=1..k}.

Definition at line 54 of file CouenneExprAux.hpp.

Referenced by rank().

int Couenne::exprAux::multiplicity_ [protected]

number of appearances of this aux in the formulation.

The more times it occurs in the formulation, the more implication its branching has on other variables

Definition at line 59 of file CouenneExprAux.hpp.

Referenced by decreaseMult(), increaseMult(), Multiplicity(), simplify(), and zeroMult().

enum intType Couenne::exprAux::integer_ [protected]

is this variable integer?

Definition at line 62 of file CouenneExprAux.hpp.

Referenced by isDefinedInteger(), print(), and setInteger().

bool Couenne::exprAux::top_level_ [protected]

True if this variable replaces the lhs of a constraint, i.e., if it is a top level variable in the DAG of the problem.

Definition at line 66 of file CouenneExprAux.hpp.

Referenced by properObject(), and top_level().

enum auxSign Couenne::exprAux::sign_ [protected]

"sign" of the defining constraint

Definition at line 69 of file CouenneExprAux.hpp.

Referenced by crossBounds(), sign(), and simplify().


The documentation for this class was generated from the following files:
Generated on Thu Nov 10 03:13:56 2011 by  doxygen 1.4.7