Changeset 511


Ignore:
Timestamp:
Feb 19, 2011 3:42:29 PM (9 years ago)
Author:
pbelotti
Message:

merged quick patch for positive pseudocost estimate -- from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/0.3/Couenne/src/branch/CouenneObject.cpp

    r244 r511  
    2020const CouNumber default_clamp  = 0.2;
    2121const CouNumber max_pseudocost = 1000.;
     22
     23const CouNumber couenne_small_est = 1e-3;
    2224
    2325/// Empty constructor
     
    546548  case INTERVAL_BR_REV:
    547549    assert (info);
    548     *up   = CoinMin (max_pseudocost,         upper - point);
    549     *down = CoinMin (max_pseudocost, point - lower);
     550
     551    // merged from trunk -- attempt at more redundant estimate. For
     552    // several reasons (numerical, infeasibilities spanning more
     553    // expressions for a single variable, etc.) this can be set to
     554    // zero even though we are branching on it, and it triggers an assert later
     555    *up   = CoinMin (max_pseudocost, couenne_small_est + fabs (upper - point));
     556    *down = CoinMin (max_pseudocost, couenne_small_est + fabs (lower - point));
     557
     558    //    *up   = CoinMin (max_pseudocost,         upper - point);
     559    //    *down = CoinMin (max_pseudocost, point - lower);
    550560    break;
    551561
     
    575585  }
    576586
    577   assert (downEstimate_ >= 0. &&
    578             upEstimate_ >= 0.);
    579 }
     587  assert (downEstimate_ > 0. &&
     588            upEstimate_ > 0.);
     589}
Note: See TracChangeset for help on using the changeset viewer.