Ignore:
Timestamp:
Nov 14, 2006 4:49:44 PM (13 years ago)
Author:
forrest
Message:

for owning solution in OsiBranchingObject?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel/Cbc/src/CbcModel.cpp

    r481 r491  
    783783    }
    784784    if (numberOdd) {
    785       for (int i=0;i<numberHeuristics_;i++)
    786         delete heuristic_[i];
    787       delete [] heuristic_;
    788       heuristic_=NULL;
    789       numberHeuristics_=0;
     785      int k=0;
     786      for (int i=0;i<numberHeuristics_;i++) {
     787        if (!heuristic_[i]->canDealWithOdd())
     788          delete heuristic_[i];
     789        else
     790          heuristic_[k++]=heuristic_[i];
     791      }
     792      if (!k) {
     793        delete [] heuristic_;
     794        heuristic_=NULL;
     795      }
     796      numberHeuristics_=k;
    790797      handler_->message(CBC_HEURISTICS_OFF,messages_)<< numberOdd<<CoinMessageEol ;
    791798    }
     
    87458752CbcModel::usefulInformation() const
    87468753{
    8747   OsiBranchingInformation usefulInfo(solver_,normalSolver());
     8754  OsiBranchingInformation usefulInfo(solver_,normalSolver(),false);
    87488755  // and modify
    87498756  usefulInfo.solution_=testSolution_;
Note: See TracChangeset for help on using the changeset viewer.