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

fix tolerance bug?

File:
1 edited

Legend:

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

    r1197 r1260  
    229229  tolerance = CoinMin(1000.0,tolerance);
    230230  tolerance *= tolerance; // as we are using squares
    231   double saveTolerance = tolerance;
     231  bool toleranceChanged = false;
    232232  double * solution = model_->solutionRegion();
    233233  double * lower = model_->lowerRegion();
     
    290290  if(model_->numberIterations()<model_->lastBadIteration()+200) {
    291291    // we can't really trust infeasibilities if there is dual error
    292     if (model_->largestDualError()>model_->largestPrimalError())
     292    if (model_->largestDualError()>model_->largestPrimalError()) {
    293293      tolerance *= CoinMin(model_->largestDualError()/model_->largestPrimalError(),1000.0);
     294      toleranceChanged=true;
     295    }
    294296  }
    295297  int numberWanted;
     
    383385  }
    384386  //printf("smallest %g largest %g\n",smallestWeight,largestWeight);
    385   if (chosenRow<0&& tolerance>saveTolerance) {
     387  if (chosenRow<0 && toleranceChanged) {
    386388    // won't line up with checkPrimalSolution - do again
    387389    double saveError = model_->largestDualError();
Note: See TracChangeset for help on using the changeset viewer.