Changeset 1257


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

ignore artificial cutoff when checking feasibility as otherwise solution not recorded

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/0.5/Couenne/src/problem/getIntegerCandidate.cpp

    r1071 r1257  
    343343    CouNumber xp = objind >= 0 ? X (objind) : Obj (0) -> Body () -> Value ();
    344344
    345     if (xp < getCutOff ()) {
    346 
    347       const CouNumber *x = X ();
    348 
    349       if  (checkNLP0 (x, xp, true, false, true, true))
     345    const CouNumber *x = X ();
     346
     347    if  (checkNLP0 (x, xp, true, false, true, true)) {
    350348// #ifdef FM_CHECKNLP2
    351349//      (checkNLP2(x, 0, false, true, true, feas_tolerance_))
     
    355353//      (checkNLP (x, xp, true)) // true for recomputing xp
    356354// #endif       
    357           {
    358            
     355     
    359356#ifdef FM_TRACE_OPTSOL
    360357#ifdef FM_CHECKNLP2
    361             recBSol->update();
    362             xp = recBSol->getVal();
     358      recBSol->update();
     359      xp = recBSol->getVal();
    363360#else
    364             recBSol -> update (x, nVars(), xp, feas_tolerance_);
     361      recBSol -> update (x, nVars(), xp, feas_tolerance_);
    365362#endif
    366363#endif
    367 
    368             setCutOff (xp, x);
    369             jnlst_ -> Printf (Ipopt::J_DETAILED, J_NLPHEURISTIC,
    370                               "new cutoff from getIntCand: %g\n", xp);
    371           }
     364      if (xp < getCutOff ()) {
     365
     366        setCutOff (xp, x);
     367        jnlst_ -> Printf (Ipopt::J_DETAILED, J_NLPHEURISTIC,
     368                          "new cutoff from getIntCand: %g\n", xp);
     369      }
    372370    }
    373371  } // try
Note: See TracChangeset for help on using the changeset viewer.