18 using namespace Couenne;
30 int wi = w ->
Index (),
47 if (is0const) c0 = xe ->
Value ();
48 if (is1const) c1 = ye ->
Value ();
58 if (lbw > wl) wl = lbw;
59 if (ubw < wu) wu = ubw;
64 bool i0s, i1s = i0s =
false;
72 if (is1const) i0s = (fabs (c1) * (xu-xl) <
COUENNE_EPS);
73 else i0s = ((fabs (yu) + fabs (yl)) * (xu-xl) <
COUENNE_EPS);
83 if (is0const) i1s = (fabs (c0) * (yu-yl) <
COUENNE_EPS);
84 else i1s = ((fabs (xu) + fabs (xl)) * (yu-yl) <
COUENNE_EPS);
90 if (i0s) is0const =
true;
91 if (i1s) is1const =
true;
96 if (is0const || is1const) {
98 if (cg -> isFirst () ||
102 if (is0const && is1const)
106 cg -> createCut (cs, c0 * c1, cg -> Problem () -> Var (wi) -> sign (), wi, 1.);
113 if (is0const) {coe = c0; ind = yi;}
114 else {coe = c1; ind = xi;}
116 cg -> createCut (cs, 0., cg -> Problem () -> Var (wi) -> sign (), wi, 1., ind, -coe);
123 enum auxSign sign = cg -> Problem () -> Var (wi) -> sign ();
Cut Generator for linear convexifications.
static Bigint *ULong * xe
void unifiedProdCuts(const CouenneCutGenerator *, OsiCuts &, int, CouNumber, CouNumber, CouNumber, int, CouNumber, CouNumber, CouNumber, int, CouNumber, CouNumber, CouNumber, t_chg_bounds *, enum expression::auxSign)
unified convexification of products and divisions
status of lower/upper bound of a variable, to be checked/modified in bound tightening ...
virtual 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
virtual enum nodeType Type() const
Node type.
virtual int Index() const
Return index of variable (only valid for exprVar and exprAux)
auxSign
"sign" of the constraint defining an auxiliary.
expression ** arglist_
argument list is an array of pointers to other expressions
double CouNumber
main number type in Couenne
void fint fint fint real fint real real real real real real real real * w
virtual CouNumber Value() const
value (empty)
virtual void getBounds(expression *&, expression *&)
Get lower and upper bound of an expression (if any)