Changeset 942


Ignore:
Timestamp:
May 15, 2008 11:58:22 AM (11 years ago)
Author:
forrest
Message:

deal with cutoffs after solutions

Location:
stable/2.1/Cbc/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable/2.1/Cbc/src/CbcHeuristicFPump.cpp

    r904 r942  
    577577          }
    578578        } else {
    579           sprintf(pumpPrint,"Not good enough");
     579          sprintf(pumpPrint,"After further testing solution no better than previous of %g",solutionValue);
     580
    580581          model_->messageHandler()->message(CBC_FPUMP1,model_->messages())
    581582            << pumpPrint
  • stable/2.1/Cbc/src/CbcModel.cpp

    r941 r942  
    14381438  if(solverCharacteristics_->reducedCostsAccurate())
    14391439    analyzeObjective() ;
     1440  // may be able to change cutoff now
     1441  double increment = getDblParam(CbcModel::CbcCutoffIncrement) ;
     1442  if (cutoff > bestObjective_-increment) {
     1443    cutoff = bestObjective_-increment ;
     1444    setCutoff(cutoff) ;
     1445  }
    14401446/*
    14411447  Set up for cut generation. addedCuts_ holds the cuts which are relevant for
     
    1096710973      messageHandler()->message(CBC_FPUMP1,messages())
    1096810974        << printBuffer << CoinMessageEol ;
     10975      // may be able to change cutoff now
     10976      double cutoff = getCutoff();
     10977      double increment = getDblParam(CbcModel::CbcCutoffIncrement) ;
     10978      if (cutoff > objectiveValue-increment) {
     10979        cutoff = objectiveValue-increment ;
     10980        setCutoff(cutoff) ;
     10981      }
    1096910982    }
    1097010983  }
Note: See TracChangeset for help on using the changeset viewer.