11 #ifndef COUENNE_EXPRCOPY_HPP
12 #define COUENNE_EXPRCOPY_HPP
108 virtual void print (std::ostream &out = std::cout,
109 bool descend =
false)
const;
Cut Generator for linear convexifications.
OsiObject for auxiliary variables $w=f(x)$.
Class for MINLP problems with symbolic information.
Define a dynamic point+bounds, with a way to save and restore previous points+bounds through a LIFO s...
virtual CouNumber Value() const
value
int Multiplicity()
multiplicity of a variable: how many times this variable occurs in expressions throughout the problem
exprCopy(const exprCopy &e, Domain *d=NULL)
Copy constructor.
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 CouNumber operator()()
null function for evaluating the expression
bool isBijective() const
indicating if function is monotonically increasing
virtual bool isDefinedInteger()
is this expression DEFINED as integer?
const expression * Original() const
If this is an exprClone of a exprClone of an expr???, point to the original expr??...
int nArgs() const
Return number of arguments (when applicable, that is, with N-ary functions)
int Linearity()
get a measure of "how linear" the expression is (see CouenneTypes.h)
expression * Copy() const
return copy of this expression (only makes sense in exprCopy)
enum convexity convexity() const
either CONVEX, CONCAVE, AFFINE, or NONCONVEX
enum expr_type code()
code for comparisons
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
virtual void print(std::ostream &out=std::cout, bool descend=false) const
I/O.
exprAux * standardize(CouenneProblem *p, bool addAux=true)
Create standard formulation of this expression.
void fillDepSet(std::set< DepNode *, compNode > *dep, DepGraph *g)
fill in dependence structure
expression * simplify()
simplify expression (useful for derivatives)
int compare(expression &e)
compare this with other expression
enum nodeType Type() const
node type
expression ** ArgList() const
return arglist (when applicable, that is, with N-ary functions)
virtual ~exprCopy()
Destructor – CAUTION: this is the only destructive destructor, exprClone and exprStore do not destroy...
void replace(exprVar *, exprVar *)
replace occurrence of a variable with another variable
expression ** ArgPtr()
return pointer to argument (when applicable, i.e., with univariate functions)
exprCopy(expression *copy)
Empty constructor - used in cloning method of exprClone.
void getBounds(CouNumber &lower, CouNumber &upper)
Get value of lower and upper bound of an expression (if any)
void getBounds(expression *&lower, expression *&upper)
Get lower and upper bound of an expression (if any)
CouNumber value_
saved value to be used by exprStore expressions
void ArgList(expression **al)
set arglist (used in deleting nodes without deleting children)
int rank()
used in rank-based branching variable choice
bool impliedBound(int wind, CouNumber *l, CouNumber *u, t_chg_bounds *chg)
implied bound processing
void closestFeasible(expression *varind, expression *vardep, CouNumber &left, CouNumber &right) const
closest feasible points in function in both directions
int Index() const
Get variable index in problem.
bool isCuttable(CouenneProblem *problem, int index) const
can this expression be further linearized or are we on its concave ("bad") side
CouNumber gradientNorm(const double *x)
return l-2 norm of gradient at given point
bool isaCopy() const
return true if this is a copy of something, i.e.
expression * differentiate(int index)
differentiation
CouNumber inverse(expression *vardep) const
compute the inverse function
expression * Argument() const
return argument (when applicable, i.e., with univariate functions)
void realign(const CouenneProblem *p)
redirect variables to proper variable vector
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
bool isInteger()
is this expression integer?
virtual expression * clone(Domain *d=NULL) const
Cloning method.
expression * Image() const
return pointer to corresponding expression (for auxiliary variables only)
expression * copy_
the expression this object is a (reference) copy of
status of lower/upper bound of a variable, to be checked/modified in bound tightening
general include file for different compilers
nodeType
type of a node in an expression tree
dig_type
type of digging when filling the dependence list
double CouNumber
main number type in Couenne
expr_type
code returned by the method expression::code()