Changeset 1498


Ignore:
Timestamp:
Jan 29, 2010 4:44:55 AM (10 years ago)
Author:
forrest
Message:

fix serious - if rare - bug which says optimal when not

Location:
stable/1.11/Clp/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable/1.11/Clp/src/ClpSimplex.cpp

    r1495 r1498  
    1123511235  }
    1123611236  if (problemStatus_==10) {
     11237    // Say second call
     11238    moreSpecialOptions_ |= 256;
    1123711239    //printf("Cleaning up with primal\n");
    1123811240    //lastAlgorithm=1;
     
    1129911301#endif
    1130011302    }
     11303    // Say not second call
     11304    moreSpecialOptions_ &= ~256;
    1130111305    intParam_[ClpMaxNumIteration] = saveMax;
    1130211306   
  • stable/1.11/Clp/src/ClpSimplexPrimal.cpp

    r1458 r1498  
    14521452  if (numberIterations_>lastBadIteration_+100)
    14531453    moreSpecialOptions_ &= ~16; // clear check accuracy flag
    1454   if (goToDual)
     1454  if (goToDual) {
    14551455    problemStatus_=10; // try dual
     1456    // See if second call
     1457    if ((moreSpecialOptions_&256)!=0) {
     1458      numberPrimalInfeasibilities_ = nonLinearCost_->numberInfeasibilities();
     1459      sumPrimalInfeasibilities_ = nonLinearCost_->sumInfeasibilities();
     1460      // say infeasible
     1461      if (numberPrimalInfeasibilities_)
     1462        problemStatus_=1;
     1463    }
     1464  }
    14561465  // make sure first free monotonic
    14571466  if (firstFree_>=0&&saveFirstFree>=0) {
Note: See TracChangeset for help on using the changeset viewer.