20 using namespace Couenne;
23 #define LOG_MININF 1e-50
32 w_ind = aux ->
Index (),
36 !chg || (cg -> isFirst ()) ||
43 enum auxSign sign = cg -> Problem () -> Var (w_ind) -> sign ();
49 if (changed) cg -> createCut (cs,
log (x0) - 1, sign, w_ind, 1., x_ind, - 1/x0);
62 cg -> createCut (cs, dx*logu - u*dw, +1, w_ind, dx, x_ind, -dw);
75 else if (x > u) x = u;
79 u = x + (
LOG_STEP << cg -> nSamples ());
82 cg -> addEnvelope (cs, -1,
log,
inv, w_ind, x_ind, x, l, u, chg,
true);
Cut Generator for linear convexifications.
void generateCuts(expression *w, OsiCuts &cs, const CouenneCutGenerator *cg, t_chg_bounds *=NULL, int=-1, CouNumber=-COUENNE_INFINITY, CouNumber=COUENNE_INFINITY)
generate equality between *this and *w
CouExpr & log(CouExpr &e)
CouNumber powNewton(CouNumber xc, CouNumber yc, unary_function f, unary_function fp, unary_function fpp)
find proper tangent point to add deepest tangent cut
void getBounds(expression *&, expression *&)
Get lower and upper bound of an expression (if any)
status of lower/upper bound of a variable, to be checked/modified in bound tightening ...
CouNumber oppInvSqr(register CouNumber x)
derivative of inv (x)
expression * argument_
single argument taken by this expression
CouNumber inv(register CouNumber arg)
the operator itself
virtual int Index() const
Return index of variable (only valid for exprVar and exprAux)
auxSign
"sign" of the constraint defining an auxiliary.
double CouNumber
main number type in Couenne
void fint fint fint real fint real * x