Changeset 1060


Ignore:
Timestamp:
Aug 3, 2007 12:00:53 PM (12 years ago)
Author:
forrest
Message:

for secondary status on time

Location:
trunk/Clp/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpModel.cpp

    r1056 r1060  
    23282328  // replaced - compiler error? bool hitMax= (numberIterations_>=maximumIterations());
    23292329  bool hitMax = (numberIterations_ >= intParam_[ClpMaxNumIteration]);
    2330   if (dblParam_[ClpMaxSeconds]>=0.0&&!hitMax)
     2330  if (dblParam_[ClpMaxSeconds]>=0.0&&!hitMax) {
    23312331    hitMax = (CoinCpuTime()>=dblParam_[ClpMaxSeconds]);
     2332  }
    23322333  return hitMax;
     2334}
     2335// On stopped - sets secondary status
     2336void
     2337ClpModel::onStopped()
     2338{
     2339  if (problemStatus_==3) {
     2340    secondaryStatus_=0;
     2341    if (CoinCpuTime()>=dblParam_[ClpMaxSeconds])
     2342      secondaryStatus_=9;
     2343  }
    23332344}
    23342345// Pass in Message handler (not deleted at end)
  • trunk/Clp/src/ClpModel.hpp

    r1059 r1060  
    374374       6 - failed due to empty problem check
    375375       7 - postSolve says not optimal
    376        8 - failed due to bad element check
     376       8 - failed due to bad element check
     377       9 - status was 3 and stopped on time
    377378       100 up - translation of enum from ClpEventHandler
    378379   */
     
    852853  /// Delete char * version of names
    853854  void deleteNamesAsChar(const char * const * names,int number) const;
     855  /// On stopped - sets secondary status
     856  void onStopped();
    854857  //@}
    855858
  • trunk/Clp/src/ClpPredictorCorrector.cpp

    r1056 r1060  
    379379        <<CoinMessageEol;
    380380      problemStatus_=3;
     381      onStopped(); // set secondary status
    381382      break;
    382383    }
  • trunk/Clp/src/ClpSimplex.cpp

    r1057 r1060  
    45524552    setNumberPrimalInfeasibilities(temp.numberPrimalInfeasibilities());
    45534553    setNumberIterations(temp.numberIterations());
     4554    onStopped(); // set secondary status if stopped
    45544555    return returnCode;
    45554556  } else {
     
    46594660  objective_->setActivated(saveQuadraticActivated);
    46604661  //factorization_->pivotTolerance(savedPivotTolerance);
     4662  onStopped(); // set secondary status if stopped
    46614663  return returnCode;
    46624664}
     
    47064708  }
    47074709  //factorization_->pivotTolerance(savedPivotTolerance);
     4710  onStopped(); // set secondary status if stopped
    47084711  return returnCode;
    47094712}
  • trunk/Clp/src/ClpSolve.cpp

    r1034 r1060  
    22242224  numberIterations = model2->numberIterations();
    22252225  finalStatus=model2->status();
     2226  int finalSecondaryStatus = model2->secondaryStatus();
    22262227  if (presolve==ClpSolve::presolveOn) {
    22272228    int saveLevel = logLevel();
     
    22642265      <<CoinMessageEol;
    22652266      timeX=time2;
     2267    } else {
     2268      secondaryStatus_=finalSecondaryStatus;
    22662269    }
    22672270  } else if (model2!=this) {
Note: See TracChangeset for help on using the changeset viewer.