Changeset 1950


Ignore:
Timestamp:
Aug 1, 2013 4:40:27 AM (6 years ago)
Author:
forrest
Message:

fix nextbestsolution problem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/2.8/Cbc/src/CbcModel.cpp

    r1926 r1950  
    1164711647                               i, inf, rowSum[i], rowLower[i], rowActivity[i], rowUpper[i]);
    1164811648#endif
    11649                     largestInfeasibility = CoinMax(largestInfeasibility,
    11650                                                    rowLower[i] - rowActivity[i]);
    11651                     largestInfeasibility = CoinMax(largestInfeasibility,
    11652                                                    rowActivity[i] - rowUpper[i]);
     11649                    double infeasibility = CoinMax(rowActivity[i]-rowUpper[i],
     11650                                                   rowLower[i]-rowActivity[i]);
     11651                    // but allow for errors
     11652                    double factor = CoinMax(1.0,rowSum[i]*1.0e-3);
     11653                    if (infeasibility>largestInfeasibility*factor)
     11654                      largestInfeasibility = infeasibility/factor;
    1165311655                }
    1165411656                delete [] rowActivity ;
     
    1165811660                    printf("largest infeasibility is %g\n", largestInfeasibility);
    1165911661#endif
    11660                 if (largestInfeasibility > 200.0*primalTolerance) {
     11662                if (largestInfeasibility > 1000.0*primalTolerance) {
    1166111663                    handler_->message(CBC_NOTFEAS3, messages_)
    1166211664                    << largestInfeasibility << CoinMessageEol ;
     
    1630316305    }
    1630416306    savedSolutions_[numberSavedSolutions_]=NULL;
    16305     --numberSavedSolutions_;
    1630616307  }
    1630716308}
Note: See TracChangeset for help on using the changeset viewer.