14 #include "CoinHelperFunctions.hpp"
15 #include "CoinFinite.hpp"
17 using namespace Couenne;
24 bool resx, resy = resx =
false;
36 printf (
"exprDiv::impliedBound: Error, w = c/d constants\n");
43 printf (
"exprDiv::impliedBound: Error, division by zero\n");
115 *xl = l + xi, *yl = l + yi,
116 *xu = u + xi, *yu = u + yi;
137 bool resxL, resxU, resyL,
138 resyU = resxL = resxU = resyL =
false;
147 resxL = ((*yl>0) && (*yu < *xl/wl) &&
updateBound (-1, xl, *yu*wl)) || resxL;
148 resyL = ((*yl>0) && (*xu < *yl*wl) &&
updateBound (-1, yl, *xu/wl)) || resyL;
161 resxU = ((*yu<0) && (*yl > *xu/wl) &&
updateBound (+1, xu, *yl*wl)) || resxU;
162 resyU = ((*yu<0) && (*xl > *yu*wl) &&
updateBound (+1, yu, *xl/wl)) || resyU;
168 resyL = ((*yl<0) && (*yl < *xl/wl) &&
updateBound (-1, yl, CoinMin (*xl/wl, 0.))) || resyL;
169 resxL = ((*yl>0) && (*yl > *xl/wl) &&
updateBound (-1, xl, *yl*wl)) || resxL;
171 resyU = ((*yu>0) && (*yu > *xu/wl) &&
updateBound (+1, yu, CoinMax (*xu/wl, 0.))) || resyU;
172 resxU = ((*yu<0) && (*yu < *xu/wl) &&
updateBound (+1, xu, *yu*wl)) || resxU;
182 resxU = ((*yl>0) && (*xu > *yu*wu) &&
updateBound (+1, xu, *yu*wu)) || resxU;
183 resyL = ((*yl>0) && (*yl < *xl/wu) &&
updateBound (-1, yl, *xl/wu)) || resyL;
198 resxL = ((*yu<0) && (*xl < *yl*wu) &&
updateBound (-1, xl, *yl*wu)) || resxL;
199 resyU = ((*yu<0) && (*yu > *xu/wu) &&
updateBound (+1, yu, *xu/wu)) || resyU;
205 resyL = ((*yl<0) && (*yl < *xu/wu) &&
updateBound (-1, yl, CoinMin (*xu/wu,0.))) || resyL;
206 resxL = ((*yu<0) && (*yu < *xl/wu) &&
updateBound (-1, xl, *yu*wu)) || resxL;
210 resyU = ((*yu>0) && (*yu > *xl/wu) &&
updateBound (+1, yu, CoinMax (*xl/wu,0.))) || resyU;
211 resxU = ((*yl>0) && (*yl > *xu/wu) &&
updateBound (+1, xu, *yl*wu)) || resxU;
224 resx = resxL || resxU;
225 resy = resyL || resyU;
246 return (resx || resy);
bool updateBound(register int sign, register CouNumber *dst, register CouNumber src)
updates maximum violation.
status of lower/upper bound of a variable, to be checked/modified in bound tightening ...
void setLower(ChangeStatus lower)
void setUpper(ChangeStatus upper)
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
bool impliedBound(int, CouNumber *, CouNumber *, t_chg_bounds *, enum auxSign=expression::AUX_EQ)
Implied bound processing.
bool isInteger()
is this expression integer?
virtual CouNumber Value() const
value (empty)