Changeset 30 for branches


Ignore:
Timestamp:
Oct 4, 2002 5:13:34 PM (17 years ago)
Author:
forrest
Message:

Conditionally do presolve on ifdef

Location:
branches/devel-1/Test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/devel-1/Test/ClpMain.cpp

    r29 r30  
    10731073            if (goodModels[iModel]) {
    10741074              int saveMaxIterations = models[iModel].maximumIterations();
     1075              ClpSimplex * model2 = models+iModel;
     1076#ifdef USE_PRESOLVE
    10751077              Presolve pinfo;
    1076               ClpSimplex * model2 = models+iModel;
    10771078              if (preSolve)
    10781079                model2 = pinfo.presolvedModel(models[iModel],1.0e-8);
    1079 
     1080#endif
    10801081#ifdef READLINE     
    10811082              currentModel = model2;
     
    10851086              else
    10861087                model2->primal();
     1088#ifdef USE_PRESOLVE
    10871089              if (preSolve) {
    10881090                pinfo.postsolve(true);
     
    10961098                models[iModel].primal(1);
    10971099              }
     1100#endif
    10981101              models[iModel].setMaximumIterations(saveMaxIterations);
    10991102              time2 = cpuTime();
  • branches/devel-1/Test/unitTest.cpp

    r29 r30  
    256256      solution.setDblParam(ClpObjOffset,mps.objectiveOffset());
    257257      if (doPresolve) {
     258#ifdef USE_PRESOLVE
    258259        Presolve pinfo;
    259260        ClpSimplex * model2 = pinfo.presolvedModel(solution,1.0e-8);
     
    286287          delete model2;
    287288        }
    288 
     289#else
     290        if (doDual) {
     291          solution.dual();
     292        } else {
     293          solution.primal();
     294        }
     295#endif
    289296      } else {
    290297        if (doDual) {
Note: See TracChangeset for help on using the changeset viewer.