Auxiliary variable. More...
#include <CouenneExprAux.hpp>
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 |
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.
integrality type of an auxiliary variable: unset, continuous, integer
Definition at line 36 of file CouenneExprAux.hpp.
Couenne::exprAux::exprAux | ( | expression * | , | |
int | , | |||
int | , | |||
intType | = Unset , |
|||
Domain * | = NULL , |
|||
enum | auxSign = expression::AUX_EQ | |||
) |
Constructor.
Couenne::exprAux::exprAux | ( | expression * | , | |
Domain * | = NULL , |
|||
enum | auxSign = expression::AUX_EQ | |||
) |
Constructor to be used with standardize ([...], false).
exprAux::~exprAux | ( | ) | [virtual] |
Destructor.
Definition at line 96 of file exprAux.cpp.
Copy constructor.
Definition at line 73 of file exprAux.cpp.
enum nodeType Couenne::exprAux::Type | ( | ) | 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] |
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.
expression* Couenne::exprAux::image_ [protected] |
The expression associated with this auxiliary variable.
Definition at line 41 of file CouenneExprAux.hpp.
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.
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.
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.
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.
enum intType Couenne::exprAux::integer_ [protected] |
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.