Ignore:
Timestamp:
Sep 25, 2014 7:31:17 AM (5 years ago)
Author:
forrest
Message:

zerohalf thread safety plus restart with deterministic parallel

File:
1 edited

Legend:

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

    r2080 r2081  
    16091609    dblParam_[CbcLargestChange] = 0.0;
    16101610    intParam_[CbcNumberBranches] = 0;
     1611    // when to check for restart
     1612    int nextCheckRestart=50;
    16111613    // Force minimization !!!!
    16121614    bool flipObjective = (solver_->getObjSense()<0.0);
     
    42034205            unlockThread();
    42044206        }
    4205         // If done 100 nodes see if worth trying reduction
    4206         if (numberNodes_ == 50 || numberNodes_ == 100) {
     4207        // If done 50/100 nodes see if worth trying reduction
     4208        if (numberNodes_ >= nextCheckRestart) {
     4209          if (nextCheckRestart<100)
     4210            nextCheckRestart=100;
     4211          else
     4212            nextCheckRestart=COIN_INT_MAX;
    42074213#ifdef COIN_HAS_CLP
    42084214            OsiClpSolverInterface * clpSolver
     
    66646670            } else {
    66656671                generator_[i] = new CbcCutGenerator(*rhs.virginGenerator_[i]);
    6666                 // But copy across maximumTries
     6672                // But copy across maximumTries and switches
    66676673                generator_[i]->setMaximumTries(rhs.generator_[i]->maximumTries());
     6674                generator_[i]->setSwitches(rhs.generator_[i]->switches());
    66686675            }
    66696676            virginGenerator_[i] = new CbcCutGenerator(*rhs.virginGenerator_[i]);
     
    1686716874            CoinCopyN(bestSolution_, numberColumns, baseModel->bestSolution_);
    1686816875            baseModel->setCutoff(getCutoff());
     16876            baseModel->handler_->message(CBC_ROUNDING, messages_)
     16877              << bestObjective_
     16878              << "heuristic"
     16879              << baseModel->numberIterations_
     16880              << baseModel->numberNodes_ << getCurrentSeconds()
     16881              << CoinMessageEol;
    1686916882        }
    1687016883        baseModel->numberSolutions_++;
Note: See TracChangeset for help on using the changeset viewer.