Changeset 855 for stable/0.4


Ignore:
Timestamp:
Jun 10, 2012 2:46:47 PM (8 years ago)
Author:
stefan
Message:

check also CouenneRecordBestSol::getHasSol() when deciding whether to pass cbc or own recorded solution (it seems possible that cbc found a solution, problem_ -> getRecordBestSol () is not NULL, but there is no solution recorded there)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/0.4/Couenne/src/main/CouenneBab.cpp

    r854 r855  
    669669    !problem_ ||
    670670    !(problem_ -> getRecordBestSol ()) ||
     671    !(problem_ -> getRecordBestSol () -> getHasSol()) ||
    671672    (((fabs (bestObj_) < COUENNE_INFINITY / 1e4) &&
    672673      (problem_ -> getRecordBestSol () -> getVal () > bestObj_)));
     674
     675  /* if we do not pass the cbc solution and problem_ -> getRecordBestSol () -> getHasSol() is true, then there should be a solution vector in problem_ -> getRecordBestSol () */
     676  assert(use_RBS_Cbc || problem_ -> getRecordBestSol () -> getSol() != NULL);
    673677
    674678  s.nonlinearSolver () -> model () -> finalize_solution
     
    693697  if(!problem_ ||
    694698     !(problem_ -> getRecordBestSol ()) ||
     699     !(problem_ -> getRecordBestSol () -> getHasSol()) ||
    695700     (((fabs (bestObj_) < COUENNE_INFINITY / 1e4) &&
    696701       (problem_ -> getRecordBestSol () -> getVal () > bestObj_))))
     
    702707  if(!problem_ ||
    703708     !(problem_ -> getRecordBestSol ()) ||
     709     !(problem_ -> getRecordBestSol () -> getHasSol()) ||
    704710     (((fabs (bestObj_) < COUENNE_INFINITY / 1e4) &&
    705711       (problem_ -> getRecordBestSol () -> getVal () > bestObj_))))
Note: See TracChangeset for help on using the changeset viewer.