Changeset 1262


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

fix tolerance oddity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpDualRowSteepest.cpp

    r1197 r1262  
    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();
     
    237237  //#define FIXED_BIAS 10.0
    238238  if (lastPivotRow>=0&&lastPivotRow<model_->numberRows()) {
    239 #if defined (__MINGW32__) || defined(__CYGWIN32__)
    240     if (model_->numberIterations()<0)
    241       printf("aab_p it %d\n",model_->numberIterations());
    242 #endif
    243 #if defined (__MINGW32__) || defined(__CYGWIN32__)
    244     if (model_->numberIterations()<0)
    245       printf("aab_p it %d\n",model_->numberIterations());
    246 #endif
    247239#ifdef COLUMN_BIAS
    248240    int numberColumns = model_->numberColumns();
     
    284276    number = infeasible_->getNumElements();
    285277  }
    286 #if defined(__MINGW32__) || defined(__CYGWIN32__)
    287   if (model_->numberIterations()<0)
    288     printf("aac_p it %d\n",model_->numberIterations());
    289 #endif
    290278  if(model_->numberIterations()<model_->lastBadIteration()+200) {
    291279    // we can't really trust infeasibilities if there is dual error
    292     if (model_->largestDualError()>model_->largestPrimalError())
     280    if (model_->largestDualError()>model_->largestPrimalError()) {
    293281      tolerance *= CoinMin(model_->largestDualError()/model_->largestPrimalError(),1000.0);
     282      toleranceChanged=true;
     283    }
    294284  }
    295285  int numberWanted;
     
    383373  }
    384374  //printf("smallest %g largest %g\n",smallestWeight,largestWeight);
    385   if (chosenRow<0&& tolerance>saveTolerance) {
     375  if (chosenRow<0 && toleranceChanged) {
    386376    // won't line up with checkPrimalSolution - do again
    387377    double saveError = model_->largestDualError();
Note: See TracChangeset for help on using the changeset viewer.