Ignore:
Timestamp:
Aug 9, 2003 5:09:12 AM (18 years ago)
Author:
forrest
Message:

For Yiming

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pre/ClpNonLinearCost.cpp

    r190 r192  
    578578    // get where in bound sequence
    579579    int iRange;
     580    int currentRange = whichRange_[iPivot];
    580581    double value = model_->solution(iPivot);
    581582    int start = start_[iPivot];
     
    595596    double & cost = model_->costAddress(iPivot);
    596597    whichRange_[iPivot]=iRange;
     598    if (iRange!=currentRange) {
     599      if (infeasible(iRange))
     600        numberInfeasibilities_++;
     601      if (infeasible(currentRange))
     602        numberInfeasibilities_--;
     603    }
    597604    lower = lower_[iRange];
    598605    upper = lower_[iRange+1];
     
    643650      double & cost = model_->costAddress(iPivot);
    644651      whichRange_[iPivot]=iRange;
     652      if (infeasible(iRange))
     653        numberInfeasibilities_++;
     654      if (infeasible(jRange))
     655        numberInfeasibilities_--;
    645656      lower = lower_[iRange];
    646657      upper = lower_[iRange+1];
     
    658669  // get where in bound sequence
    659670  int iRange;
     671  int currentRange = whichRange_[iPivot];
    660672  int start = start_[iPivot];
    661673  int end = start_[iPivot+1]-1;
     
    690702  assert(iRange<end);
    691703  whichRange_[iPivot]=iRange;
     704  if (iRange!=currentRange) {
     705    if (infeasible(iRange))
     706      numberInfeasibilities_++;
     707    if (infeasible(currentRange))
     708      numberInfeasibilities_--;
     709  }
    692710  double & lower = model_->lowerAddress(iPivot);
    693711  double & upper = model_->upperAddress(iPivot);
Note: See TracChangeset for help on using the changeset viewer.