Changeset 385


Ignore:
Timestamp:
Jun 1, 2004 5:27:31 PM (14 years ago)
Author:
forrest
Message:

if presolve infeas on crossover

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClpSolve.cpp

    r382 r385  
    10041004      model2 = pinfo2.presolvedModel(*model2,1.0e-8,
    10051005                                    false,5,true);
     1006      if (!model2) {
     1007        model2=saveModel2;
     1008        saveModel2=NULL;
     1009        delete [] saveLower;
     1010        saveLower=NULL;
     1011        delete [] saveUpper;
     1012        saveUpper=NULL;
     1013      }
    10061014    }
    10071015    if (maxIts&&barrierStatus<4) {
     
    10241032        const double * columnLower = model2->columnLower();
    10251033        const double * columnUpper = model2->columnUpper();
    1026         const double * primalSolution = model2->primalColumnSolution();
     1034        double * primalSolution = model2->primalColumnSolution();
     1035        const double * dualSolution = model2->dualColumnSolution();
    10271036        double tolerance = 10.0*primalTolerance_;
    10281037        int i;
     
    10331042                                primalSolution[i]-columnLower[i]);
    10341043          if (distance>tolerance) {
     1044            if (fabs(dualSolution[i])<1.0e-5)
     1045              distance *= 100.0;
    10351046            dsort[n]=-distance;
    10361047            sort[n++]=i;
     
    10401051          } else if (primalSolution[i]<=columnLower[i]+primalTolerance_) {
    10411052            model2->setStatus(i,atLowerBound);
     1053            primalSolution[i]=columnLower[i];
    10421054          } else {
    10431055            model2->setStatus(i,atUpperBound);
     1056            primalSolution[i]=columnUpper[i];
    10441057          }
    10451058        }
Note: See TracChangeset for help on using the changeset viewer.