Ignore:
Timestamp:
Mar 8, 2011 5:49:01 AM (9 years ago)
Author:
forrest
Message:

allow to distinguish between infeasible and unbounded in presolve

File:
1 edited

Legend:

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

    r1665 r1699  
    147147{
    148148     return originalModel_;
     149}
     150// Return presolve status (0,1,2)
     151int
     152ClpPresolve::presolveStatus() const
     153{
     154  if (nelems_>=0) {
     155    // feasible (or not done yet)
     156    return 0;
     157  } else {
     158    int presolveStatus = - nelems_;
     159    // If both infeasible and unbounded - say infeasible
     160    if (presolveStatus>2)
     161      presolveStatus = 1;
     162    return presolveStatus;
     163  }
    149164}
    150165void
     
    18541869               // infeasible or unbounded
    18551870               result = 1;
     1871               // Put status in nelems_!
     1872               nelems_ = - prob.status_;
    18561873               originalModel->setProblemStatus(prob.status_);
    18571874          } else {
Note: See TracChangeset for help on using the changeset viewer.