Ignore:
Timestamp:
Apr 10, 2013 9:30:07 AM (7 years ago)
Author:
forrest
Message:

fix some examples and a bug on repeated use of same CbcModel?

File:
1 edited

Legend:

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

    r1889 r1900  
    62656265    maximumDepthActual_ = 0;
    62666266    numberDJFixed_ = 0.0;
    6267     delete probingInfo_;
    6268     probingInfo_ = NULL;
     6267    if (probingInfo_) {
     6268      delete probingInfo_;
     6269      probingInfo_ = NULL;
     6270      // also get rid of cut generator
     6271      int n=0;
     6272      for (int i = 0; i < numberCutGenerators_; i++) {
     6273        CglImplication * cutGen;
     6274        cutGen = dynamic_cast<CglImplication *>(generator_[i]->generator());
     6275        if (!cutGen) {
     6276          generator_[n]=generator_[i];
     6277          virginGenerator_[n]=virginGenerator_[i];
     6278          n++;
     6279        } else {
     6280          cutGen->setProbingInfo(NULL);
     6281          delete generator_[i];
     6282          cutGen = dynamic_cast<CglImplication *>(virginGenerator_[i]->generator());
     6283          assert (cutGen);
     6284          cutGen->setProbingInfo(NULL);
     6285          delete virginGenerator_[i];
     6286        }
     6287      }
     6288      numberCutGenerators_=n;
     6289    }
    62696290    maximumStatistics_ = 0;
    62706291    delete [] analyzeResults_;
Note: See TracChangeset for help on using the changeset viewer.