Changeset 1112


Ignore:
Timestamp:
Jan 5, 2009 5:51:34 AM (10 years ago)
Author:
forrest
Message:

fix for local search

Location:
trunk/Cbc/src
Files:
4 edited

Legend:

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

    r1104 r1112  
    412412      useCutoff=true;
    413413    if (useCutoff) {
    414       cutoff = CoinMin(cutoff,fakeCutoff_);
     414      double rhs = CoinMin(cutoff,fakeCutoff_);
    415415      const double * objective = solver->getObjCoefficients();
    416416      int numberColumns = solver->getNumCols();
     
    431431        printf("CbcHeuristicFPump obj offset %g\n",offset);
    432432#endif
    433       solver->addRow(nel,which,els,-COIN_DBL_MAX,cutoff+offset*direction);
     433      solver->addRow(nel,which,els,-COIN_DBL_MAX,rhs+offset*direction);
    434434      delete [] which;
    435435      delete [] els;
  • trunk/Cbc/src/CbcModel.cpp

    r1104 r1112  
    526526    if (!numberContinuousObj&&numberIntegerObj<=100&&
    527527        numberIntegerObj*5<numberObjects_)
    528         specialOptions_ |= 4096;
     528        specialOptions_ |= xxxx;
    529529#endif
    530530    if (iTest>=987654320&&iTest<987654330&&numberObjects_&&!parentModel_) {
     
    10791079  currentNode_ = NULL;
    10801080  CoinThreadRandom randomGenerator(1234567);
     1081  // See if should do cuts old way
     1082#ifdef CBC_DETERMINISTIC_THREAD
     1083  if (numberThreads_>0||dynamic_cast<CbcTreeLocal *> (tree_))
     1084    specialOptions_ |= 4096+8192;
     1085#else
     1086  if (numberThreads_>0)
     1087    specialOptions_ |= 4096;
     1088  if (dynamic_cast<CbcTreeLocal *> (tree_))
     1089    specialOptions_ |= 4096+8192;
     1090#endif
    10811091#ifdef COIN_HAS_CLP
    10821092 {
     
    59125922  bool sameProblem=false;
    59135923#ifdef NODE_LAST
    5914   if (numberThreads_<=0) {
     5924  if ((specialOptions_&4096)==0) {
    59155925    {
    59165926      int n1=numberRowsAtContinuous_;
     
    62206230#ifdef NODE_LAST
    62216231      bool canMissStuff=false;
    6222       if (numberThreads_<=0) {
     6232      if ((specialOptions_&4096)==0) {
    62236233        bool redoCuts=true;
    62246234        if (CoinAbs(lastNumberCuts2_-numberToAdd)<5) {
     
    63106320        //int n1=solver_->getNumRows();
    63116321#endif
    6312         if (numberThreads_<=0) {
     6322        if ((specialOptions_&4096)==0) {
    63136323          solver_->restoreBaseModel(numberRowsAtContinuous_);
    63146324        } else {
     
    1274912759          lastws->fixFullBasis();
    1275012760#else
    12751           assert (lastws->fullBasis());
     12761          if ((specialOptions_&8192)==0)
     12762            assert (lastws->fullBasis());
     12763          else
     12764            lastws->fixFullBasis();
    1275212765#endif
    1275312766        }
  • trunk/Cbc/src/CbcModel.hpp

    r1088 r1112  
    14911491      10 bit (1024) - Switch on some heuristics even if seems unlikely
    14921492      11 bit (2048) - Mark as in small branch and bound
     1493      12 bit (4096) - Funny cuts so do slow way (in some places)
     1494      13 bit (8192) - Funny cuts so do slow way (in other places)
    14931495  */
    14941496  /// Set special options
  • trunk/Cbc/src/CbcSolver.cpp

    r1104 r1112  
    33113311        double cutoff;
    33123312        model->solver()->getDblParam(OsiDualObjectiveLimit,cutoff);
    3313         cutoff = CoinMin(cutoff,value + 0.1*fabs(value)*c);
     3313        cutoff = CoinMin(cutoff,value + 0.05*fabs(value)*c);
    33143314        double dextra1 = parameters_[whichParam(DEXTRA1,numberParameters_,parameters_)].doubleValue();
    33153315        if (dextra1)
Note: See TracChangeset for help on using the changeset viewer.