Ignore:
Timestamp:
Nov 22, 2012 2:00:22 PM (7 years ago)
Author:
forrest
Message:

add random seed setting

File:
1 edited

Legend:

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

    r1802 r1813  
    45364536        maximumWhich_(1000),
    45374537        maximumRows_(0),
     4538        randomSeed_(-1),
    45384539        currentDepth_(0),
    45394540        whichGenerator_(NULL),
     
    46934694        maximumWhich_(1000),
    46944695        maximumRows_(0),
     4696        randomSeed_(-1),
    46954697        currentDepth_(0),
    46964698        whichGenerator_(NULL),
     
    49374939        maximumWhich_(rhs.maximumWhich_),
    49384940        maximumRows_(0),
     4941        randomSeed_(rhs.randomSeed_),
    49394942        currentDepth_(0),
    49404943        whichGenerator_(NULL),
     
    52815284        maximumCutPassesAtRoot_ = rhs.maximumCutPassesAtRoot_;
    52825285        maximumCutPasses_ = rhs.maximumCutPasses_;
     5286        randomSeed_ = rhs.randomSeed_;
    52835287        preferredWay_ = rhs.preferredWay_;
    52845288        currentPassNumber_ = rhs.currentPassNumber_;
     
    56875691    maximumCutPassesAtRoot_ = rhs.maximumCutPassesAtRoot_;
    56885692    maximumCutPasses_ =  rhs.maximumCutPasses_;
     5693    randomSeed_ = rhs.randomSeed_;
    56895694    preferredWay_ = rhs.preferredWay_;
    56905695    resolveAfterTakeOffCuts_ = rhs.resolveAfterTakeOffCuts_;
     
    59815986        heuristic_[where]->setHeuristicName(name) ;
    59825987    heuristic_[where]->setSeed(987654321 + where);
     5988    if (randomSeed_!=-1)
     5989      heuristic_[where]->setSeed(randomSeed_);
    59835990    numberHeuristics_++ ;
    59845991}
Note: See TracChangeset for help on using the changeset viewer.