Changeset 1261


Ignore:
Timestamp:
Aug 11, 2008 6:34:14 AM (12 years ago)
Author:
forrest
Message:

fix tolerance oddity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/1.7/Clp/src/ClpDualRowSteepest.cpp

    r1175 r1261  
    169169  tolerance = CoinMin(1000.0,tolerance);
    170170  tolerance *= tolerance; // as we are using squares
    171   double saveTolerance = tolerance;
     171  bool toleranceChanged = false;
    172172  double * solution = model_->solutionRegion();
    173173  double * lower = model_->lowerRegion();
     
    226226  if(model_->numberIterations()<model_->lastBadIteration()+200) {
    227227    // we can't really trust infeasibilities if there is dual error
    228     if (model_->largestDualError()>model_->largestPrimalError())
     228    if (model_->largestDualError()>model_->largestPrimalError()) {
    229229      tolerance *= CoinMin(model_->largestDualError()/model_->largestPrimalError(),1000.0);
     230      toleranceChanged=true;
     231    }
    230232  }
    231233  int numberWanted;
     
    319321  }
    320322  //printf("smallest %g largest %g\n",smallestWeight,largestWeight);
    321   if (chosenRow<0&& tolerance>saveTolerance) {
     323  if (chosenRow<0&& toleranceChanged) {
    322324    // won't line up with checkPrimalSolution - do again
    323325    double saveError = model_->largestDualError();
Note: See TracChangeset for help on using the changeset viewer.