Changeset 36 for branches


Ignore:
Timestamp:
Oct 9, 2002 4:44:59 PM (17 years ago)
Author:
forrest
Message:

Forgot to pass back status after presolve

Location:
branches/devel-1
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/devel-1/ClpMessage.cpp

    r29 r36  
    6060  {CLP_PRESOLVE_INTEGERMODS,510,1,"Presolve is modifying %d integer bounds and re-presolving"},
    6161  {CLP_PRESOLVE_POSTSOLVE,511,0,"After Postsolve, objective %g, infeasibilities - dual %g (%d), primal %g (%d)"},
     62  {CLP_PRESOLVE_NEEDS_CLEANING,512,0,"Presolved model was optimal, full model needs cleaning up"},
    6263  {CLP_PACKEDSCALE_INITIAL,1001,2,"Initial range of elements is %g to %g"},
    6364  {CLP_PACKEDSCALE_WHILE,1002,3,"Range of elements is %g to %g"},
  • branches/devel-1/Presolve.cpp

    r35 r36  
    720720                                               <<CoinMessageEol;
    721721 
     722  //originalModel_->objectiveValue_=objectiveValue_;
     723  originalModel_->setNumberIterations(presolvedModel_->numberIterations());
     724  if (!presolvedModel_->status()) {
     725    if (!originalModel_->numberDualInfeasibilities()&&
     726        originalModel_->numberPrimalInfeasibilities()) {
     727      originalModel_->setProblemStatus( 0);
     728    } else {
     729      originalModel_->setProblemStatus( -1);
     730      originalModel_->messageHandler()->message(CLP_PRESOLVE_NEEDS_CLEANING,
     731                                            originalModel_->messages())
     732                                              <<CoinMessageEol;
     733    }
     734  } else {
     735    originalModel_->setProblemStatus( presolvedModel_->status());
     736  }
    722737}
    723738
  • branches/devel-1/include/ClpMessage.hpp

    r29 r36  
    5050  CLP_PRESOLVE_INTEGERMODS,
    5151  CLP_PRESOLVE_POSTSOLVE,
     52  CLP_PRESOLVE_NEEDS_CLEANING,
    5253  CLP_POSSIBLELOOP,
    5354  CLP_SMALLELEMENTS,
  • branches/devel-1/include/ClpModel.hpp

    r33 r36  
    141141   inline int numberIterations() const  { return numberIterations_; }
    142142   inline int getIterationCount() const { return numberIterations_; }
     143  inline void setNumberIterations(int numberIterations)
     144  { numberIterations_ = numberIterations;};
    143145   /// Maximum number of iterations
    144146   inline int maximumIterations() const { return maximumIterations_; }
     
    152154   */
    153155   inline int status() const            { return problemStatus_; }
     156  /// Set problem status
     157  inline void setProblemStatus(int problemStatus)
     158  { problemStatus_ = problemStatus;};
    154159   /// Are there a numerical difficulties?
    155160   bool isAbandoned() const             { return problemStatus_==4; }
Note: See TracChangeset for help on using the changeset viewer.