 Timestamp:
 Feb 22, 2018 7:01:40 AM (17 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Cbc/src/CbcSOS.cpp
r2070 r2364 204 204 const double * upper = solver>getColUpper(); 205 205 //double largestValue=0.0; 206 #define ZERO_SOS_TOLERANCE 1.0e14 207 #ifndef ZERO_SOS_TOLERANCE 206 208 double integerTolerance = 207 209 model_>getDblParam(CbcModel::CbcIntegerTolerance); 210 #else 211 double integerTolerance = ZERO_SOS_TOLERANCE; 212 #endif 208 213 double weight = 0.0; 209 214 double sum = 0.0; … … 471 476 const double * lower = solver>getColLower(); 472 477 const double * upper = solver>getColUpper(); 478 #ifndef ZERO_SOS_TOLERANCE 473 479 double integerTolerance = 474 480 model_>getDblParam(CbcModel::CbcIntegerTolerance); 481 #else 482 double integerTolerance = ZERO_SOS_TOLERANCE; 483 #endif 475 484 double weight = 0.0; 476 485 double sum = 0.0; … … 535 544 int j; 536 545 const double * solution = model_>testSolution(); 546 #ifndef ZERO_SOS_TOLERANCE 537 547 double integerTolerance = 538 548 model_>getDblParam(CbcModel::CbcIntegerTolerance); 549 #else 550 double integerTolerance = ZERO_SOS_TOLERANCE; 551 #endif 539 552 //OsiSolverInterface * solver = model_>solver(); 540 553 const double * lower = solver>getColLower(); … … 621 634 bool feasible = iStatus != 1; 622 635 if (feasible) { 636 #ifndef ZERO_SOS_TOLERANCE 623 637 double integerTolerance = 624 model_>getDblParam(CbcModel::CbcIntegerTolerance); 638 model_>getDblParam(CbcModel::CbcIntegerTolerance); 639 #else 640 double integerTolerance = ZERO_SOS_TOLERANCE; 641 #endif 625 642 const int * integerVariable = model_>integerVariable(); 626 643 for (i = 0; i < numberIntegers; i++) { … … 714 731 int j; 715 732 const double * solution = model_>testSolution(); 733 #ifndef ZERO_SOS_TOLERANCE 716 734 double integerTolerance = 717 735 model_>getDblParam(CbcModel::CbcIntegerTolerance); 736 #else 737 double integerTolerance = ZERO_SOS_TOLERANCE; 738 #endif 718 739 OsiSolverInterface * solver = model_>solver(); 719 740 const double * upper = solver>getColUpper();
Note: See TracChangeset
for help on using the changeset viewer.