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

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 ()
 Get lower and upper bound of an expression (if any).
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

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 image,
int  index,
int  rank,
intType  isInteger = Unset,
Domain d = NULL,
enum auxSign  sign = expression::AUX_EQ 
)

Constructor.

Definition at line 29 of file exprAux.cpp.

exprAux::exprAux ( expression image,
Domain d = NULL,
enum auxSign  sign = 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.

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

Copy constructor.

Definition at line 73 of file exprAux.cpp.


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.

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.

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

get lower bound expression

Reimplemented from Couenne::exprVar.

Definition at line 93 of file CouenneExprAux.hpp.

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

get upper bound expression

Reimplemented from Couenne::exprVar.

Definition at line 94 of file CouenneExprAux.hpp.

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

Print expression.

I/O.

Reimplemented from Couenne::exprVar.

Definition at line 141 of file exprAux.cpp.

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.

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

Sets expression associated with this auxiliary variable.

Definition at line 105 of file CouenneExprAux.hpp.

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

Null function for evaluating the expression.

Reimplemented from Couenne::exprVar.

Definition at line 109 of file CouenneExprAux.hpp.

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.

expression * exprAux::simplify (  )  [virtual]

simplify

Reimplemented from Couenne::exprVar.

Definition at line 175 of file exprAux.cpp.

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.

void exprAux::crossBounds (  )  [virtual]

Get lower and upper bound of an expression (if any).

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.

void exprAux::generateCuts ( OsiCuts &  cs,
const CouenneCutGenerator cg,
t_chg_bounds chg = 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.

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.

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.

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

is this expression integer?

Reimplemented from Couenne::exprVar.

Definition at line 153 of file CouenneExprAux.hpp.

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.

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

Tell this variable appears once more.

Definition at line 169 of file CouenneExprAux.hpp.

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.

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

Disable this auxiliary variable.

Reimplemented from Couenne::exprVar.

Definition at line 176 of file CouenneExprAux.hpp.

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

How many times this variable appears.

Reimplemented from Couenne::expression.

Definition at line 179 of file CouenneExprAux.hpp.

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.

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

return top_level_

Definition at line 189 of file CouenneExprAux.hpp.

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.

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.


Member Data Documentation

The expression associated with this auxiliary variable.

Definition at line 41 of file CouenneExprAux.hpp.

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.

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.

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.

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.

is this variable integer?

Definition at line 62 of file CouenneExprAux.hpp.

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.

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

"sign" of the defining constraint

Definition at line 69 of file CouenneExprAux.hpp.


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

Generated on 16 Feb 2012 by  doxygen 1.6.1