Changeset 209


Ignore:
Timestamp:
Sep 19, 2003 9:41:17 AM (17 years ago)
Author:
forrest
Message:

Fixing minor bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PresolveTighten.cpp

    r198 r209  
    354354    }
    355355
    356     sol[jcol] += correction;
    357 
    358     // by construction, the last row corrected (if there was one)
    359     // must be at its bound, so it can be non-basic.
    360     // All other rows may not be at a bound (but may if the difference
    361     // is very small, causing a new correction by a tiny amount).
    362 
    363     // now adjust the activities
    364     k = mcstrt[jcol];
    365     for (i=0; i<nk; ++i) {
    366       int irow = hrow[k];
    367       double coeff = colels[k];
    368       k = link[k];
    369       //      double activity = acts[irow];
    370 
    371       acts[irow] += correction * coeff;
    372 
     356    if (last_corrected>=0) {
     357      sol[jcol] += correction;
     358     
     359      // by construction, the last row corrected (if there was one)
     360      // must be at its bound, so it can be non-basic.
     361      // All other rows may not be at a bound (but may if the difference
     362      // is very small, causing a new correction by a tiny amount).
     363     
     364      // now adjust the activities
     365      k = mcstrt[jcol];
     366      for (i=0; i<nk; ++i) {
     367        int irow = hrow[k];
     368        double coeff = colels[k];
     369        k = link[k];
     370        //      double activity = acts[irow];
     371       
     372        acts[irow] += correction * coeff;
     373      }
    373374    }
    374375
     
    378379        fabs(sol[jcol] - cup[jcol]) > ZTOLDP) {
    379380
    380       PRESOLVEASSERT(last_corrected != -1);
    381381      prob->setRowStatus(last_corrected,PrePostsolveMatrix::atLowerBound);
    382382      prob->setColumnStatus(jcol,PrePostsolveMatrix::basic);
Note: See TracChangeset for help on using the changeset viewer.