# Couenne::exprAux Class Reference

Auxiliary variable. More...

`#include <CouenneExprAux.hpp>`

Inheritance diagram for Couenne::exprAux:

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 exprVar * | clone (Domain *d=NULL) const
| Cloning method.
expression * | Lb ()
| get lower bound expression
expression * | Ub ()
| get upper bound expression
virtual void | print (std::ostream &=std::cout, bool=false) const
| Print expression.
expression * | Image () 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
expression * | simplify ()
| 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_
CouenneObject * | properObject (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
expression * | image_
| The expression associated with this auxiliary variable.
expression * | lb_
| lower bound, a function of the associated expression and the bounds on the variables in the expression
expression * | ub_
| 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

Couenne::exprAux::exprAux | ( | expression * | ,
|  | int | ,
|  | int | ,
|  | intType | = `Unset`,
|  | Domain * | = `NULL`,
|  | enum | auxSign = `expression::AUX_EQ` |
| ) |  |  |

Constructor.

Referenced by clone().

Couenne::exprAux::exprAux | ( | expression * | ,
|  | Domain * | = `NULL`,
|  | enum | auxSign = `expression::AUX_EQ` |
| ) |  |  |

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

virtual Couenne::exprAux::~exprAux | ( |  | ) | `[virtual]`

Destructor.

Couenne::exprAux::exprAux | ( | const exprAux & | ,
|  | Domain * | d = `NULL` |
| ) |  |  |

Copy constructor.

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

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

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

Print expression.

Reimplemented from Couenne::exprVar.

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]`

Sets expression associated with this auxiliary variable.

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_, and Couenne::exprVar::varIndex_.

int Couenne::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.

expression* Couenne::exprAux::simplify | ( |  | ) | `[virtual]`

simplify

Reimplemented from Couenne::exprVar.

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 Couenne::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.

void Couenne::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.

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* Couenne::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.

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

## 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 Image(), and isDefinedInteger().

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 Lb(), and linkDomain().

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 linkDomain(), and Ub().

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(), and zeroMult().

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

is this variable integer?

Definition at line 62 of file CouenneExprAux.hpp.

Referenced by isDefinedInteger(), 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 top_level().

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

"sign" of the defining constraint

Definition at line 69 of file CouenneExprAux.hpp.

Referenced by sign().

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

- CouenneExprAux.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines