Changeset 1102


Ignore:
Timestamp:
Nov 16, 2008 2:41:07 PM (12 years ago)
Author:
forrest
Message:

try and fix memory leak

File:
1 edited

Legend:

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

    r1100 r1102  
    38483848  it'll be deleted in cleanTree. We need to check.
    38493849*/
     3850    double maxSeconds = getMaximumSeconds();
     3851    if (parentModel_)
     3852      maxSeconds=CoinMin(maxSeconds,parentModel_->getMaximumSeconds());
    38503853    if (!(numberNodes_ < intParam_[CbcMaxNumNode] &&
    3851         numberSolutions_ < intParam_[CbcMaxNumSol] &&
    3852         totalTime < dblParam_[CbcMaximumSeconds] &&
    3853         !stoppedOnGap_&&!eventHappened_)) {
     3854          numberSolutions_ < intParam_[CbcMaxNumSol] &&
     3855          totalTime < maxSeconds &&
     3856          !stoppedOnGap_&&!eventHappened_&&(maximumNumberIterations_<0||
     3857                                            numberIterations_<maximumNumberIterations_))) {
    38543858      if (tree_->size()) {
    38553859        double dummyBest;
     
    88188822            feasible=false;
    88198823          }
     8824        } else if (solver_->isAbandoned()) {
     8825          setMaximumSeconds(-COIN_DBL_MAX);
    88208826        }
    88218827#ifdef COIN_HAS_CLP
Note: See TracChangeset for help on using the changeset viewer.