Changeset 1844 for trunk/Clp/src/ClpSimplex.cpp
- Timestamp:
- Feb 21, 2012 5:16:15 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Clp/src/ClpSimplex.cpp
r1785 r1844 2023 2023 return 1; 2024 2024 } 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)); 2025 2027 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 2026 2033 int maxNumber = (forceFactorization_ < 0) ? maximumPivots : CoinMin(forceFactorization_, maximumPivots); 2027 2034 if (factorization_->pivots() >= random * maxNumber) {
Note: See TracChangeset
for help on using the changeset viewer.