Changeset 1860 for trunk


Ignore:
Timestamp:
May 31, 2012 9:40:26 AM (7 years ago)
Author:
forrest
Message:

make test on maximum theta in parametrics more robust

Location:
trunk/Clp/src
Files:
2 edited

Legend:

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

    r1854 r1860  
    29562956  }
    29572957  double maxTheta = 1.0e50;
     2958  double largestChange=0.0;
    29582959  for (int iRow = 0; iRow < numberRows_; iRow++) {
    29592960    double lower = rowLower_[iRow];
     
    29622963      lowerChange[numberColumns_+iRow]=0.0;
    29632964    double chgLower = lowerChange[numberColumns_+iRow];
     2965    largestChange=CoinMax(largestChange,fabs(chgLower));
    29642966    if (upper>1.0e30)
    29652967      upperChange[numberColumns_+iRow]=0.0;
    29662968    double chgUpper = upperChange[numberColumns_+iRow];
     2969    largestChange=CoinMax(largestChange,fabs(chgUpper));
    29672970    if (lower > -1.0e30 && upper < 1.0e30) {
    29682971      if (lower + maxTheta * chgLower > upper + maxTheta * chgUpper) {
     
    29852988      lowerChange[iColumn]=0.0;
    29862989    double chgLower = lowerChange[iColumn];
     2990    largestChange=CoinMax(largestChange,fabs(chgLower));
    29872991    if (upper>1.0e30)
    29882992      upperChange[iColumn]=0.0;
    29892993    double chgUpper = upperChange[iColumn];
     2994    largestChange=CoinMax(largestChange,fabs(chgUpper));
    29902995    if (lower > -1.0e30 && upper < 1.0e30) {
    29912996      if (lower + maxTheta * chgLower > upper + maxTheta * chgUpper) {
     
    30223027  }
    30233028  paramData.maxTheta=maxTheta;
     3029  /* given largest change element choose acceptable end
     3030     be safe and make sure difference < 0.1*tolerance */
     3031  double acceptableDifference=0.1*primalTolerance_/
     3032    CoinMax(largestChange,1.0);
     3033  paramData.acceptableMaxTheta=maxTheta-acceptableDifference;
    30243034  bool swapped=false;
    30253035  // Dantzig
     
    36833693              double saveTheta=theta_;
    36843694              theta_ = endingTheta;
    3685               if (problemStatus_==2&&theta_>0.99999999*paramData.maxTheta)
     3695              if (problemStatus_==2&&theta_>paramData.acceptableMaxTheta)
    36863696                theta_=COIN_DBL_MAX; // we have finished
    36873697              int status=eventHandler_->event(ClpEventHandler::theta);
  • trunk/Clp/src/ClpSimplexOther.hpp

    r1851 r1860  
    109109    double endingTheta;
    110110    double maxTheta;
     111    double acceptableMaxTheta; // if this far then within tolerances
    111112    double * lowerChange; // full array of lower bound changes
    112113    int * lowerList; // list of lower bound changes
Note: See TracChangeset for help on using the changeset viewer.