Ignore:
Timestamp:
Jan 15, 2007 4:16:40 PM (13 years ago)
Author:
forrest
Message:

better cutoff checking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/1.3/Clp/src/ClpSimplexDual.cpp

    r851 r907  
    39813981           !numberAtFakeBound()&&!numberDualInfeasibilities_) {
    39823982    //printf("lim %g obj %g %g\n",limit,objectiveValue_,objectiveValue());
    3983     if (perturbation_==101) {
     3983    if (true||perturbation_==101) {
    39843984      // be careful
    39853985      if (numberIterations_) {
    3986         computeObjectiveValue(); // value without perturbation
     3986        // I don't want to change calling sequences - so ...
     3987        int iSequence;
     3988        objectiveValue_ = 0.0;
     3989        const double * obj = objective();
     3990        if (!columnScale_) {
     3991          for (iSequence=0;iSequence<numberColumns_;iSequence++) {
     3992            double value = columnActivityWork_[iSequence];
     3993            objectiveValue_ += value*obj[iSequence];
     3994          }
     3995        } else {
     3996          for (iSequence=0;iSequence<numberColumns_;iSequence++) {
     3997            double scaleFactor = columnScale_[iSequence];
     3998            double valueScaled = columnActivityWork_[iSequence];
     3999            objectiveValue_ += valueScaled*scaleFactor*obj[iSequence];
     4000          }
     4001        }
     4002        // But remember direction as we are using external objective
     4003        objectiveValue_ *= optimizationDirection_;
     4004        objectiveValue_ += objective_->nonlinearOffset();
     4005        objectiveValue_ /= (objectiveScale_*rhsScale_);
     4006        //computeObjectiveValue(); // value without perturbation
    39874007        if(objectiveValue()*optimizationDirection_>limit) {
    39884008          problemStatus_=1;
Note: See TracChangeset for help on using the changeset viewer.