11 #ifndef COUENNE_EXPRESSION_HPP 12 #define COUENNE_EXPRESSION_HPP 28 class CouenneCutGenerator;
73 virtual inline int Index ()
const 77 virtual inline int nArgs ()
const 118 virtual void print (std::ostream &s = std::cout,
138 {
return dependsOn (&singleton, 1, type);}
143 virtual inline int DepList (std::set <int> &deplist,
235 {var = NULL;
return 0.;}
291 register double delta = (sign > 0) ? (*dst - src) : (src - *dst);
317 if (e -> isaCopy ())
return getOriginal (e -> Copy ());
325 expression *simpler = complicated -> simplify ();
330 }
else return complicated;
virtual expression ** ArgPtr()
return pointer to argument (when applicable, i.e., with univariate functions)
virtual expression * clone(Domain *d=NULL) const
Cloning method.
virtual int dependsOn(int *ind, int n, enum dig_type type=STOP_AT_AUX)
dependence on variable set: return cardinality of subset of the set of indices in first argument whic...
virtual expression * Image() const
return pointer to corresponding expression (for auxiliary variables only)
virtual expression * Argument() const
return argument (when applicable, i.e., with univariate functions)
virtual enum expr_type code()
return integer for comparing expressions (used to recognize common expression)
expression * getOriginal(expression *e)
get original expression (can't make it an expression method as I need a non-const,...
virtual void realign(const CouenneProblem *p)
empty function to redirect variables to proper variable vector
expr_type
code returned by the method expression::code()
virtual expression * simplify()
simplify expression (useful for derivatives)
virtual bool isInteger()
is this expression integer?
virtual void ArgList(expression **al)
set arglist (used in deleting nodes without deleting children)
virtual bool impliedBound(int, CouNumber *, CouNumber *, t_chg_bounds *, enum auxSign=expression::AUX_EQ)
does a backward implied bound processing on every expression, including exprSums although already don...
virtual void linkDomain(Domain *d)
empty function to update domain pointer
Cut Generator for linear convexifications.
virtual void closestFeasible(expression *varind, expression *vardep, CouNumber &left, CouNumber &right) const
closest feasible points in function in both directions
bool isInteger(CouNumber x)
is this number integer?
virtual void generateCuts(expression *w, OsiCuts &cs, const CouenneCutGenerator *cg, t_chg_bounds *chg=NULL, int wind=-1, CouNumber lb=-COUENNE_INFINITY, CouNumber ub=COUENNE_INFINITY)
generate convexification cut for constraint w = this
auxSign
"sign" of the constraint defining an auxiliary.
virtual bool isDefinedInteger()
is this expression defined as an integer?
virtual void fillDepSet(std::set< DepNode *, compNode > *, DepGraph *)
update dependence set with index of variables on which this expression depends
virtual void replace(exprVar *, exprVar *)
replace expression with another
double CouNumber
main number type in Couenne
virtual bool isCuttable(CouenneProblem *problem, int index) const
can this expression be further linearized or are we on its concave ("bad") side
virtual void print(std::ostream &s=std::cout, bool=false) const
print expression to iostream
virtual CouNumber Value() const
value (empty)
Class for MINLP problems with symbolic information.
virtual int rank()
used in rank-based branching variable choice: original variables have rank 1; auxiliary w=f(x) has ra...
dig_type
type of digging when filling the dependence list
virtual bool isBijective() const
indicating if function is monotonically increasing
virtual expression * Copy() const
return copy of this expression (only makes sense in exprCopy)
virtual const expression * Original() const
If this is an exprClone of a exprClone of an expr???, point to the original expr??...
int compareExpr(const void *e0, const void *e1)
independent comparison
virtual CouNumber gradientNorm(const double *x)
return l-2 norm of gradient at given point
virtual ~expression()
Destructor.
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
bool updateBound(register int sign, register CouNumber *dst, register CouNumber src)
updates maximum violation.
virtual int nArgs() const
return number of arguments (when applicable, that is, with N-ary functions)
virtual enum convexity convexity() const
either CONVEX, CONCAVE, AFFINE, or NONCONVEX
virtual int Index() const
Return index of variable (only valid for exprVar and exprAux)
virtual int compare(expression &)
compare expressions
virtual int Linearity()
get a measure of "how linear" the expression is (see CouenneTypes.h)
OsiObject for auxiliary variables $w=f(x)$.
virtual bool isaCopy() const
return true if this is a copy of something (i.e. an exprCopy)
expression * Simplified(expression *complicated)
Macro to return already simplified expression without having to do the if part every time simplify ()...
virtual void getBounds(expression *&, expression *&)
Get lower and upper bound of an expression (if any)
int dependsOn(int singleton, enum dig_type type=STOP_AT_AUX)
version with one index only
virtual CouNumber inverse(expression *vardep) const
compute the inverse function
virtual void Image(expression *image)
set expression associated with this auxiliary variable (for compatibility with exprAux)
virtual enum nodeType Type() const
node type
virtual expression ** ArgList() const
return arglist (when applicable, that is, with N-ary functions)
virtual expression * differentiate(int)
differentiation
status of lower/upper bound of a variable, to be checked/modified in bound tightening
virtual CouNumber selectBranch(const CouenneObject *obj, const OsiBranchingInformation *info, expression *&var, double *&brpts, double *&brDist, int &way)
set up branching object by evaluating many branching points for each expression's arguments.
virtual int Multiplicity()
multiplicity of a variable
virtual exprAux * standardize(CouenneProblem *p, bool addAux=true)
Create standard form of this expression, by:
expression(const expression &e, Domain *d=NULL)
Copy constructor.
virtual CouNumber operator()()=0
null function for evaluating the expression
general include file for different compilers
virtual int DepList(std::set< int > &deplist, enum dig_type type=ORIG_ONLY)
fill std::set with indices of variables on which this expression depends.