11 #ifndef COUENNE_EXPRVAR_HPP 12 #define COUENNE_EXPRVAR_HPP 23 template <
class T>
class SmartPtr;
73 {
return new exprVar (*
this, d);}
88 virtual void print (std::ostream &out = std::cout,
106 virtual inline int DepList (std::set <int> &deplist,
109 if (deplist.find (
varIndex_) == deplist.end ()) {
virtual CouNumber & lb()
Get/set lower bound value.
virtual exprVar * clone(Domain *d=NULL) const
Cloning method.
virtual expression * Ub()
Get upper bound expression.
virtual CouNumber operator()()
return the value of the variable
virtual bool isFixed()
is this variable fixed?
virtual void fillDepSet(std::set< DepNode *, compNode > *, DepGraph *)
update dependence set with index of this variable
expr_type
code returned by the method expression::code()
exprVar(const exprVar &e, Domain *d=NULL)
Copy constructor.
virtual expression * simplify()
simplify
Ipopt::SmartPtr< const Ipopt::Journalist > ConstJnlstPtr
virtual expression * Lb()
Get lower bound expression.
Cut Generator for linear convexifications.
auxSign
"sign" of the constraint defining an auxiliary.
virtual Domain * domain()
return pointer to variable domain
virtual enum auxSign sign() const
return its sign in the definition constraint
virtual void generateCuts(OsiCuts &, const CouenneCutGenerator *, t_chg_bounds *=NULL, int=-1, CouNumber=-COUENNE_INFINITY, CouNumber=COUENNE_INFINITY)
Get values of lower and upper bound of an expression (if any)
double CouNumber
main number type in Couenne
virtual void crossBounds()
set bounds depending on both branching rules and propagated bounds.
virtual 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 auxil...
virtual bool impliedBound(int, CouNumber *, CouNumber *, t_chg_bounds *, enum auxSign=expression::AUX_EQ)
implied bound processing
Class for MINLP problems with symbolic information.
virtual int rank()
rank of an original variable is always one
dig_type
type of digging when filling the dependence list
virtual expression * differentiate(int index)
differentiation
Domain * domain_
Pointer to a descriptor of the current point/bounds.
Ipopt::SmartPtr< Ipopt::Journalist > JnlstPtr
exprVar(int varIndex, Domain *d=NULL)
Constructor.
Define a dynamic point+bounds, with a way to save and restore previous points+bounds through a LIFO s...
nodeType
type of a node in an expression tree
convexity
convexity type of an expression
virtual 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
virtual CouNumber gradientNorm(const double *x)
return l-2 norm of gradient at given point
virtual bool isDefinedInteger()
is this expression defined as an integer?
virtual void setInteger(bool value)
Set this variable as integer (empty for compatibility with exprAux)
virtual void zeroMult()
Disable variable (empty for compatibility with exprAux)
OsiObject for auxiliary variables $w=f(x)$.
virtual void linkDomain(Domain *d)
link this variable to a domain
virtual CouNumber & ub()
Get/set upper bound value.
virtual enum convexity convexity() const
either CONVEX, CONCAVE, AFFINE, or NONCONVEX
virtual enum nodeType Type() const
Node type.
int varIndex_
The index of the variable.
virtual void decreaseMult()
virtual bool isInteger()
is this variable integer?
status of lower/upper bound of a variable, to be checked/modified in bound tightening
virtual enum expr_type code()
code for comparison
virtual void print(std::ostream &out=std::cout, bool=false) const
print
int Index() const
Get variable index in problem.
virtual void getBounds(expression *&, expression *&)
Get expressions of lower and upper bound of an expression (if any)
general include file for different compilers
virtual int Linearity()
get a measure of "how linear" the expression is (see CouenneTypes.hpp)
virtual ~exprVar()
destructor