exprAux Class Reference

Auxiliary variable. More...

#include <exprAux.hpp>

Inheritance diagram for exprAux:

Inheritance graph
[legend]
Collaboration diagram for 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)
 Constructor.
 exprAux (expression *, Domain *=NULL)
 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)
 The expression associated with this auxiliary variable.
CouNumber operator() ()
 Null function for evaluating the expression.
expressiondifferentiate (int index)
 Differentiation.
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 (const OsiSolverInterface &, 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
CouenneObject properObject (CouenneProblem *p, Bonmin::BabSetupBase *base, JnlstPtr jnlst)
 return proper object to handle expression associated with this variable (NULL if this is not an auxiliary)

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?

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 29 of file exprAux.hpp.


Member Enumeration Documentation

enum exprAux::intType

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

Enumerator:
Unset 
Continuous 
Integer 

Definition at line 34 of file exprAux.hpp.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 25 of file exprAux.cpp.

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

Referenced by clone().

exprAux::exprAux ( expression ,
Domain = NULL 
)

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

Definition at line 49 of file exprAux.cpp.

exprAux::~exprAux (  )  [virtual]

Destructor.

Definition at line 83 of file exprAux.cpp.

References image_, lb_, and ub_.

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

Copy constructor.

Definition at line 62 of file exprAux.cpp.

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


Member Function Documentation

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

Node type.

Reimplemented from exprVar.

Definition at line 65 of file exprAux.hpp.

References AUX.

Referenced by simplify().

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

Cloning method.

Reimplemented from exprVar.

Definition at line 81 of file exprAux.hpp.

References exprAux().

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

get lower bound expression

Reimplemented from exprVar.

Definition at line 84 of file exprAux.hpp.

References lb_.

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

get upper bound expression

Reimplemented from exprVar.

Definition at line 85 of file exprAux.hpp.

References ub_.

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

Print expression.

Reimplemented from exprVar.

Definition at line 128 of file exprAux.cpp.

References image_, integer_, and exprVar::varIndex_.

Referenced by generateCuts().

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

The expression associated with this auxiliary variable.

Reimplemented from expression.

Definition at line 92 of file exprAux.hpp.

References image_.

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

The expression associated with this auxiliary variable.

Reimplemented from expression.

Definition at line 96 of file exprAux.hpp.

References image_.

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

Null function for evaluating the expression.

Reimplemented from exprVar.

Definition at line 100 of file exprAux.hpp.

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

expression* exprAux::differentiate ( int  index  )  [inline, virtual]

Differentiation.

Reimplemented from exprVar.

Definition at line 104 of file exprAux.hpp.

References image_.

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 exprVar.

Definition at line 144 of file exprAux.cpp.

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

expression * exprAux::simplify (  )  [virtual]

simplify

Reimplemented from exprVar.

Definition at line 162 of file exprAux.cpp.

References AUX, image_, multiplicity_, Type(), and VAR.

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

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

Reimplemented from exprVar.

Definition at line 116 of file exprAux.hpp.

References LINEAR.

void exprAux::crossBounds (  )  [virtual]

set bounds depending on both branching rules and propagated bounds.

To be used after standardization

Reimplemented from exprVar.

Definition at line 114 of file exprAux.cpp.

References exprVar::getBounds(), image_, lb_, and ub_.

void exprAux::generateCuts ( const OsiSolverInterface &  ,
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 exprVar.

Definition at line 179 of file exprAux.cpp.

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

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

used in rank-based branching variable choice

Reimplemented from exprVar.

Definition at line 135 of file exprAux.hpp.

References rank_.

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

is this expression defined as integer?

Reimplemented from exprVar.

Definition at line 139 of file exprAux.hpp.

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

Referenced by isInteger().

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

is this expression integer?

Reimplemented from exprVar.

Definition at line 148 of file exprAux.hpp.

References COUENNE_EPS, isDefinedInteger(), exprVar::lb(), and exprVar::ub().

Referenced by isDefinedInteger().

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

Set this variable as integer.

Reimplemented from exprVar.

Definition at line 160 of file exprAux.hpp.

References Continuous, Integer, and integer_.

void exprAux::increaseMult (  )  [inline]

Tell this variable appears once more.

Definition at line 164 of file exprAux.hpp.

References multiplicity_.

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

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

Reimplemented from exprVar.

Definition at line 168 of file exprAux.hpp.

References multiplicity_.

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

Disable this auxiliary variable.

Reimplemented from exprVar.

Definition at line 171 of file exprAux.hpp.

References multiplicity_.

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

How many times this variable appears.

Reimplemented from expression.

Definition at line 174 of file exprAux.hpp.

References multiplicity_.

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

link this variable to a domain

Reimplemented from exprVar.

Definition at line 177 of file exprAux.hpp.

References exprVar::domain_, lb_, and ub_.

CouenneObject exprAux::properObject ( 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 exprVar.

Definition at line 275 of file exprAux.cpp.

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


Member Data Documentation

expression* exprAux::image_ [protected]

The expression associated with this auxiliary variable.

Definition at line 39 of file exprAux.hpp.

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

expression* exprAux::lb_ [protected]

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

Definition at line 43 of file exprAux.hpp.

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

expression* exprAux::ub_ [protected]

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

Definition at line 47 of file exprAux.hpp.

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

int 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 52 of file exprAux.hpp.

Referenced by rank().

int 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 57 of file exprAux.hpp.

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

enum intType exprAux::integer_ [protected]

is this variable integer?

Definition at line 60 of file exprAux.hpp.

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


The documentation for this class was generated from the following files:
Generated on Mon Aug 3 03:07:18 2009 by  doxygen 1.4.7