Changeset 1042 for trunk


Ignore:
Timestamp:
Jan 4, 2014 7:54:46 AM (6 years ago)
Author:
pbelotti
Message:

fixed bound updating on non-equal auxiliary power function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/src/bound_tightening/operators/impliedBounds-exprPow.cpp

    r940 r1042  
    113113      CouNumber lb = wl, ub = wu;
    114114
     115      //printf ("should be here: wl=%g wu=%g k=%g, signpow=%d safepow = %g\n", wl, wu, k, issignpower_, safe_pow (wl, 1./k, issignpower_));
     116
    115117      if (k < 0) { // swap bounds as they swap on the curve x^k when
    116118        lb = wu;
     
    118120      }
    119121
    120       if (lb > 0. || k > 0.) resL = updateBound (-1, l + index, safe_pow (lb, 1./k, issignpower_));
     122      if ((lb > 0. || k > 0.) && (sign != expression::AUX_GEQ))
     123        resL = updateBound (-1, l + index, safe_pow (lb, 1./k, issignpower_));
    121124
    122       if ((fabs (ub) < COUENNE_INFINITY) && (ub > 0 || k > 0.))
     125      if ((fabs (ub) < COUENNE_INFINITY) &&
     126          (ub > 0 || k > 0.) &&
     127          (sign != expression::AUX_LEQ))
    123128        resU = updateBound (+1, u + index, safe_pow (ub, 1./k, issignpower_));
    124129      //else                  resU = updateBound (+1, u + index, COUENNE_INFINITY);
Note: See TracChangeset for help on using the changeset viewer.