Changeset 1258


Ignore:
Timestamp:
Aug 28, 2018 6:23:28 AM (15 months ago)
Author:
pbelotti
Message:

adding some tolerance to optimum cutting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/0.5/Couenne/src/bound_tightening/tightenBounds.cpp

    r694 r1258  
    177177
    178178        if (knownOptimum &&
    179             (knownOptimum [i] >= lower_i) &&
    180             (knownOptimum [i] <= ll - COUENNE_EPS)) {
     179            ((knownOptimum [i] - lower_i) / (1 + std::max (fabs (knownOptimum [i]), fabs (lower_i))) >=  COUENNE_EPS) &&
     180            ((knownOptimum [i] - ll)      / (1 + std::max (fabs (knownOptimum [i]), fabs (ll)))      <= -COUENNE_EPS)) {
    181181
    182182          Jnlst()->Printf(J_STRONGWARNING, J_BOUNDTIGHTENING,
     
    230230
    231231        if (knownOptimum &&
    232             (knownOptimum [i] <= upper_i) &&
    233             (knownOptimum [i] >= uu + COUENNE_EPS)) {
     232            ((knownOptimum [i] - upper_i) / (1 + std::max (fabs (knownOptimum [i]), fabs (upper_i))) <= -COUENNE_EPS) &&
     233            ((knownOptimum [i] - uu)      / (1 + std::max (fabs (knownOptimum [i]), fabs (uu)))      >= COUENNE_EPS)) {
    234234
    235235          Jnlst()->Printf(J_STRONGWARNING, J_BOUNDTIGHTENING,
Note: See TracChangeset for help on using the changeset viewer.