Changeset 86


Ignore:
Timestamp:
Jan 7, 2003 4:28:47 PM (17 years ago)
Author:
forrest
Message:

I'll get it right yet

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClpDualRowSteepest.cpp

    r85 r86  
    139139  // do last pivot row one here
    140140  if (lastPivotRow>=0) {
    141     int iPivot=model_->sequenceIn();
    142     if (iPivot>=0) {
    143       double value = solution[iPivot];
    144       double lower = model_->lower(iPivot);
    145       double upper = model_->upper(iPivot);
    146       if (value>upper+tolerance) {
    147         // store square in list
    148         if (infeas[lastPivotRow])
    149           infeas[lastPivotRow] = (value-upper)*(value-upper); // already there
    150         else
    151           infeasible_->quickAdd(lastPivotRow,(value-upper)*(value-upper));
    152       } else if (value<lower-tolerance) {
    153         // store square in list
    154         if (infeas[lastPivotRow])
    155           infeas[lastPivotRow] = (value-lower)*(value-lower); // already there
    156         else
    157           infeasible_->add(lastPivotRow,(value-lower)*(value-lower));
    158       } else {
    159         // feasible - was it infeasible - if so set tiny
    160         if (infeas[lastPivotRow])
    161           infeas[lastPivotRow] = 1.0e-100;
    162       }
    163     }
     141    int iPivot=pivotVariable[lastPivotRow];
     142    double value = solution[iPivot];
     143    double lower = model_->lower(iPivot);
     144    double upper = model_->upper(iPivot);
     145    if (value>upper+tolerance) {
     146      // store square in list
     147      if (infeas[lastPivotRow])
     148        infeas[lastPivotRow] = (value-upper)*(value-upper); // already there
     149      else
     150        infeasible_->quickAdd(lastPivotRow,(value-upper)*(value-upper));
     151    } else if (value<lower-tolerance) {
     152      // store square in list
     153      if (infeas[lastPivotRow])
     154        infeas[lastPivotRow] = (value-lower)*(value-lower); // already there
     155      else
     156        infeasible_->add(lastPivotRow,(value-lower)*(value-lower));
     157    } else {
     158      // feasible - was it infeasible - if so set tiny
     159      if (infeas[lastPivotRow])
     160        infeas[lastPivotRow] = 1.0e-100;
     161    }
     162    number = infeasible_->getNumElements();
    164163  }
    165164  for (i=0;i<number;i++) {
  • trunk/ClpMessage.cpp

    r82 r86  
    1919  {CLP_SIMPLEX_ERROR,4,1,"Stopped due to errors - objective value %g"},
    2020  {CLP_SIMPLEX_STATUS,5,1,"%d  Objective %g%? Primal infeas %g (%d)%? Dual infeas %g (%d)%? without free dual infeas (%d)"},
    21   {CLP_DUAL_BOUNDS,5,3,"Looking optimal checking bounds with %g"},
     21  {CLP_DUAL_BOUNDS,25,3,"Looking optimal checking bounds with %g"},
    2222  {CLP_SIMPLEX_ACCURACY,6,3,"Primal error %g, dual error %g"},
    2323  {CLP_SIMPLEX_BADFACTOR,7,1,"Singular factorization of basis - status %d"},
  • trunk/ClpSimplexDual.cpp

    r85 r86  
    314314  }
    315315
     316  assert (problemStatus_||!sumPrimalInfeasibilities_);
    316317  //assert(!numberFake_||problemStatus_); // all bounds should be okay
    317318  factorization_->sparseThreshold(saveSparse);
  • trunk/Test/ClpMain.cpp

    r67 r86  
    10901090              int saveMaxIterations = models[iModel].maximumIterations();
    10911091              ClpSimplex * model2 = models+iModel;
     1092              time1 = cpuTime();
    10921093#ifdef USE_PRESOLVE
    10931094              Presolve pinfo;
     
    11031104                       ,model2->numberPrimalInfeasibilities());
    11041105#endif
     1106#if 1
    11051107                if (type==DUALSIMPLEX) {
    11061108                  int numberInfeasibilities = model2->tightenPrimalBounds();
     
    11091111                             <<std::endl;
    11101112                }
     1113#endif
    11111114              }
    11121115#endif
Note: See TracChangeset for help on using the changeset viewer.