Changeset 2114
 Timestamp:
 Feb 10, 2015 7:12:46 AM (4 years ago)
 Location:
 stable/1.16/Clp/src
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

stable/1.16/Clp/src/ClpSimplex.cpp
r2082 r2114 534 534 largeValue_ = value; 535 535 } 536 double minimumPrimalToleranceZZ=0.0;537 #define CLP_INFEAS_SAVE 5538 double averageInfeasZZ[CLP_INFEAS_SAVE];539 536 int 540 537 ClpSimplex::gutsOfSolution ( double * givenDuals, … … 825 822 bool doneFiddling=false; 826 823 // Optimization may make exact test iffy 827 double testTolerance=minimumPrimalTolerance ZZ+1.0e15;824 double testTolerance=minimumPrimalTolerance_+1.0e15; 828 825 while (!doneFiddling) { 829 826 doneFiddling=true; … … 833 830 double saveTolerance=primalTolerance_; 834 831 primalTolerance_=CoinMax(0.25*primalTolerance_, 835 minimumPrimalTolerance ZZ);832 minimumPrimalTolerance_); 836 833 printf("Resetting primal tolerance from %g to %g\n", 837 834 saveTolerance,primalTolerance_); … … 849 846 double minimum=COIN_DBL_MAX; 850 847 double averageTotal=average; 851 bool firstTime=averageInfeas ZZ[0]==COIN_DBL_MAX;848 bool firstTime=averageInfeasibility_[0]==COIN_DBL_MAX; 852 849 for (int i=0;i<CLP_INFEAS_SAVE1;i++) { 853 double value = averageInfeas ZZ[i+1];850 double value = averageInfeasibility_[i+1]; 854 851 averageTotal+=value; 855 averageInfeas ZZ[i]=value;852 averageInfeasibility_[i]=value; 856 853 minimum=CoinMin(minimum,value); 857 854 } 858 averageInfeas ZZ[CLP_INFEAS_SAVE1]=average;855 averageInfeasibility_[CLP_INFEAS_SAVE1]=average; 859 856 averageTotal /= CLP_INFEAS_SAVE; 860 857 double oldTolerance=primalTolerance_; 861 if (averageInfeas ZZ[0]!=COIN_DBL_MAX) {858 if (averageInfeasibility_[0]!=COIN_DBL_MAX) { 862 859 if (firstTime) { 863 860 primalTolerance_=CoinMin(0.1,0.1*averageTotal); … … 867 864 } 868 865 primalTolerance_= 869 CoinMax(primalTolerance_,minimumPrimalTolerance ZZ);866 CoinMax(primalTolerance_,minimumPrimalTolerance_); 870 867 } 871 868 if (primalTolerance_!=oldTolerance) { … … 5542 5539 #endif 5543 5540 for (int i=0;i<CLP_INFEAS_SAVE;i++) 5544 averageInfeas ZZ[i]=COIN_DBL_MAX;5541 averageInfeasibility_[i]=COIN_DBL_MAX; 5545 5542 #ifdef EXPENSIVE 5546 5543 static int dualCount = 0; 
stable/1.16/Clp/src/ClpSimplex.hpp
r2086 r2114 1558 1558 /// Acceptable pivot value just after factorization 1559 1559 double acceptablePivot_; 1560 /// Minimum primal tolerance 1561 double minimumPrimalTolerance_; 1562 /// Last few infeasibilities 1563 #define CLP_INFEAS_SAVE 5 1564 double averageInfeasibility_[CLP_INFEAS_SAVE]; 1560 1565 /// Working copy of lower bounds (Owner of arrays below) 1561 1566 double * lower_; 
stable/1.16/Clp/src/ClpSimplexDual.cpp
r2102 r2114 135 135 #define NDEBUG_CLP 136 136 #endif 137 extern double minimumPrimalToleranceZZ;138 #define CLP_INFEAS_SAVE 5139 extern double averageInfeasZZ[CLP_INFEAS_SAVE];140 137 // dual 141 138 … … 604 601 if (alphaAccuracy_ != 1.0) 605 602 alphaAccuracy_ = 1.0; 606 minimumPrimalTolerance ZZ=primalTolerance();603 minimumPrimalTolerance_=primalTolerance(); 607 604 int returnCode = startupSolve(ifValuesPass, saveDuals, startFinishOptions); 608 605 // Save so can see if doing after primal … … 4356 4353 #endif 4357 4354 primalTolerance_=1.0e6; 4358 minimumPrimalTolerance ZZ=primalTolerance_;4355 minimumPrimalTolerance_=primalTolerance_; 4359 4356 dblParam_[ClpPrimalTolerance]=1.0e6; 4360 4357 moreSpecialOptions_ = 4194304;
Note: See TracChangeset
for help on using the changeset viewer.