Changeset 1499 for trunk/Clp


Ignore:
Timestamp:
Jan 29, 2010 5:03:06 AM (10 years ago)
Author:
forrest
Message:

try and fix accuracy problems

Location:
trunk/Clp/src
Files:
2 edited

Legend:

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

    r1494 r1499  
    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   
  • trunk/Clp/src/ClpSimplexPrimal.cpp

    r1464 r1499  
    14521452  if (numberIterations_>lastBadIteration_+100)
    14531453    moreSpecialOptions_ &= ~16; // clear check accuracy flag
    1454   if (goToDual)
     1454  if (goToDual||numberIterations_>1000&&largestPrimalError_>1.0e6
     1455      &&largestDualError_>1.0e6) {
    14551456    problemStatus_=10; // try dual
    1456   // If bad go to dual
    1457   if (numberIterations_>1000&&largestPrimalError_>1.0e6
    1458       &&largestDualError_>1.0e6)
    1459     problemStatus_=10; // try dual
     1457    // See if second call
     1458    if ((moreSpecialOptions_&256)!=0) {
     1459      numberPrimalInfeasibilities_ = nonLinearCost_->numberInfeasibilities();
     1460      sumPrimalInfeasibilities_ = nonLinearCost_->sumInfeasibilities();
     1461      // say infeasible
     1462      if (numberPrimalInfeasibilities_)
     1463        problemStatus_=1;
     1464    }
     1465  }
    14601466  // make sure first free monotonic
    14611467  if (firstFree_>=0&&saveFirstFree>=0) {
Note: See TracChangeset for help on using the changeset viewer.