Ignore:
Timestamp:
Sep 19, 2008 11:25:22 AM (11 years ago)
Author:
forrest
Message:

for ratiogap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcModel.cpp

    r1069 r1081  
    77867786    double heuristicValue = getCutoff() ;
    77877787    int found = -1; // no solution found
    7788     for (int i = 0;i<numberHeuristics_;i++) {
     7788    if (feasible) {
     7789      for (int i = 0;i<numberHeuristics_;i++) {
    77897790#if MODEL3
    7790       // skip if can't run here
    7791       if (!heuristic_[i]->shouldHeurRun())
    7792         continue;
    7793 #endif
    7794       // see if heuristic will do anything
    7795       double saveValue = heuristicValue ;
    7796       int ifSol = heuristic_[i]->solution(heuristicValue,
    7797                                           newSolution);
    7798       if (ifSol>0) {
    7799         // better solution found
    7800         heuristic_[i]->incrementNumberSolutionsFound();
    7801         found = i ;
    7802         incrementUsed(newSolution);
    7803         lastHeuristic_ = heuristic_[found];
    7804         setBestSolution(CBC_ROUNDING,heuristicValue,newSolution) ;
    7805       } else {
    7806         heuristicValue = saveValue ;
     7791        // skip if can't run here
     7792        if (!heuristic_[i]->shouldHeurRun())
     7793          continue;
     7794#endif
     7795        // see if heuristic will do anything
     7796        double saveValue = heuristicValue ;
     7797        int ifSol = heuristic_[i]->solution(heuristicValue,
     7798                                            newSolution);
     7799        if (ifSol>0) {
     7800          // better solution found
     7801          heuristic_[i]->incrementNumberSolutionsFound();
     7802          found = i ;
     7803          incrementUsed(newSolution);
     7804          lastHeuristic_ = heuristic_[found];
     7805          setBestSolution(CBC_ROUNDING,heuristicValue,newSolution) ;
     7806        } else {
     7807          heuristicValue = saveValue ;
     7808        }
    78077809      }
    78087810    }
Note: See TracChangeset for help on using the changeset viewer.