Changeset 78
- Timestamp:
- Mar 13, 2005 12:31:48 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CbcModel.cpp
r70 r78 538 538 int preferredWay ; 539 539 int numberUnsatisfied = 0 ; 540 double integerTolerance = getIntegerTolerance() ;541 542 540 memcpy(currentSolution_,solver_->getColSolution(), 543 541 numberColumns*sizeof(double)) ; … … 546 544 { double infeasibility = 547 545 object_[iObject]->infeasibility(preferredWay) ; 548 if (infeasibility > integerTolerance) numberUnsatisfied++ ; }546 if (infeasibility ) numberUnsatisfied++ ; } 549 547 if (numberUnsatisfied) 550 548 { feasible = solveWithCuts(cuts,maximumCutPassesAtRoot_, … … 3940 3938 double sumUnsatisfied=0.0; 3941 3939 int preferredWay; 3942 double integerTolerance = getIntegerTolerance();3943 3940 int j; 3944 3941 // Put current solution in safe place … … 3948 3945 const CbcObject * object = object_[j]; 3949 3946 double infeasibility = object->infeasibility(preferredWay); 3950 if (infeasibility>integerTolerance) { 3947 if (infeasibility) { 3948 assert (infeasibility>0); 3951 3949 numberUnsatisfied++; 3952 3950 sumUnsatisfied += infeasibility; … … 3957 3955 const CbcObject * object = object_[j]; 3958 3956 double infeasibility = object->infeasibility(preferredWay); 3959 if (infeasibility>integerTolerance) { 3957 if (infeasibility) { 3958 assert (infeasibility>0); 3960 3959 numberUnsatisfied++; 3961 3960 sumUnsatisfied += infeasibility; … … 5181 5180 int preferredWay ; 5182 5181 int numberUnsatisfied = 0 ; 5183 double integerTolerance = getIntegerTolerance() ;5184 5185 5182 memcpy(currentSolution_,solver_->getColSolution(), 5186 5183 numberColumns*sizeof(double)) ; … … 5189 5186 { double infeasibility = 5190 5187 object_[iObject]->infeasibility(preferredWay) ; 5191 if (infeasibility > integerTolerance) numberUnsatisfied++ ; }5188 if (infeasibility) numberUnsatisfied++ ; } 5192 5189 if (numberUnsatisfied) 5193 5190 { feasible = solveWithCuts(cuts,maximumCutPassesAtRoot_, -
trunk/CbcNode.cpp
r49 r78 938 938 */ 939 939 int iSmallest = 0; 940 double mostAway = integerTolerance;940 double mostAway = 1.0e-100; 941 941 for (i = 0 ; i < maximumStrong ; i++) choice[i].possibleBranch = NULL ; 942 942 numberStrong=0; … … 992 992 } 993 993 } 994 if (infeasibility>integerTolerance) { 994 if (infeasibility) { 995 //if (infeasibility<=integerTolerance) 996 //printf("XXXXX small %g\n",infeasibility); 995 997 // Increase estimated degradation to solution 996 998 estimatedDegradation += CoinMin(object->upEstimate(),object->downEstimate()); … … 1006 1008 } 1007 1009 bestPriority = priorityLevel; 1008 mostAway= integerTolerance;1010 mostAway=1.0e-100; 1009 1011 numberStrong=0; 1010 1012 } else if (priorityLevel>bestPriority) {
Note: See TracChangeset
for help on using the changeset viewer.