Ignore:
Timestamp:
Feb 21, 2012 5:16:15 AM (9 years ago)
Author:
forrest
Message:

fix mini presolve when too much happening and modify invert frequency for awkward problems

File:
1 edited

Legend:

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

    r1785 r1844  
    20232023          return 1;
    20242024     } else if (numberIterations_ > 1000 + 10 * (numberRows_ + (numberColumns_ >> 2)) && matrix_->type()<15) {
     2025          // A bit worried problem may be cycling - lets factorize at random intervals for a short period
     2026          int numberTooManyIterations = numberIterations_ - 10 * (numberRows_ + (numberColumns_ >> 2));
    20252027          double random = randomNumberGenerator_.randomDouble();
     2028          int window = numberTooManyIterations%5000;
     2029          if (window<2*maximumPivots)
     2030            random = 0.2*random+0.8; // randomly re-factorize but not too soon
     2031          else
     2032            random=1.0; // switch off if not in window of opportunity
    20262033          int maxNumber = (forceFactorization_ < 0) ? maximumPivots : CoinMin(forceFactorization_, maximumPivots);
    20272034          if (factorization_->pivots() >= random * maxNumber) {
Note: See TracChangeset for help on using the changeset viewer.