Ignore:
Timestamp:
Nov 24, 2010 5:46:22 AM (9 years ago)
Author:
forrest
Message:

fix bug when presolved model infeasible but original feasible.
also allow names in presolve to file.

File:
1 edited

Legend:

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

    r1596 r1635  
    114114                                  bool keepIntegers,
    115115                                  int numberPasses,
     116                                  bool dropNames,
    116117                                  bool doRowObjective)
    117118{
     
    122123     saveFile_ = fileName;
    123124     si.saveModel(saveFile_.c_str());
    124      ClpSimplex * model = gutsOfPresolvedModel(&si, feasibilityTolerance, keepIntegers, numberPasses, true,
     125     ClpSimplex * model = gutsOfPresolvedModel(&si, feasibilityTolerance, keepIntegers, numberPasses, dropNames,
    125126                          doRowObjective);
    126127     if (model == &si) {
     
    305306     } else {
    306307          originalModel_->setProblemStatus( presolvedModel_->status());
     308          // but not if close to feasible
     309          if( originalModel_->sumPrimalInfeasibilities()<1.0e-1) {
     310               originalModel_->setProblemStatus( -1);
     311               // Say not optimal after presolve
     312               originalModel_->setSecondaryStatus(7);
     313          }
    307314     }
    308315#ifndef CLP_NO_STD
     
    15231530#ifndef CLP_NO_STD
    15241531               originalModel->setLengthNames(lengthNames);
     1532               presolvedModel_->dropNames();
    15251533          } else {
    15261534               presolvedModel_ = originalModel;
    1527           }
    1528           presolvedModel_->dropNames();
     1535               if (dropNames)
     1536                 presolvedModel_->dropNames();
     1537          }
    15291538#endif
    15301539
Note: See TracChangeset for help on using the changeset viewer.