Ignore:
Timestamp:
Feb 1, 2012 5:39:38 PM (8 years ago)
Author:
pbelotti
Message:

fixes in handling signals and Cbc or RBS optimal solutions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Couenne/src/main/BonCouenne.cpp

    r794 r813  
    345345      lb = bb. model (). getBestPossibleObjValue ();
    346346
    347     if (cp -> getRecordBestSol ())              ub = cp -> getRecordBestSol () -> getVal ();
     347    if (cp -> getRecordBestSol () &&
     348        (ub > cp -> getRecordBestSol () -> getVal ())) ub = cp -> getRecordBestSol () -> getVal ();
     349
    348350    if ((fabs (lb) > COUENNE_INFINITY / 1e4) ||
    349         (lb > ub))                              lb = ub;
     351        (lb > ub))                                     lb = ub;
    350352
    351353    char
     
    374376                     bb.numNodes ());
    375377
    376     if (fabs (ub - bb. model (). getObjValue ()) > COUENNE_EPS * ub)
     378    if (fabs (ub - bb. model (). getObjValue ()) > COUENNE_EPS * fabs (ub))
    377379      jnlst -> Printf (J_ERROR, J_COUENNE,
    378380                       "Warning: upper bounds differ between Couenne and Cbc. Saving Couenne's (more reliable).\n");
Note: See TracChangeset for help on using the changeset viewer.