Skip to content

Commit

Permalink
Fix stupid tolerance on better integer solutions
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhforrest committed Jul 23, 2024
1 parent 1322a91 commit 7caca03
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/CbcNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2553,8 +2553,7 @@ int CbcNode::chooseDynamicBranch(CbcModel *model, CbcNode *lastNode,
anyAction = -2;
break;
} else {
double tolerance = CoinMax(1.0e-6,1.0e-7*fabs(objectiveValue_));
if (objectiveValue_>model->getMinimizationObjValue()-tolerance) {
if (objectiveValue_>=model->getCutoff()) {
// treat as if infeasible
//printf("INF Best obj %.15g this %.15g bestposs %.15g\n",
// model->getMinimizationObjValue(),
Expand Down Expand Up @@ -2697,8 +2696,7 @@ int CbcNode::chooseDynamicBranch(CbcModel *model, CbcNode *lastNode,
anyAction = -2;
break;
} else {
double tolerance = CoinMax(1.0e-6,1.0e-7*fabs(objectiveValue_));
if (objectiveValue_>model->getMinimizationObjValue()-tolerance) {
if (objectiveValue_>=model->getCutoff()) {
// treat as if infeasible
//printf("INF Best obj %.15g this %.15g bestposs %.15g\n",
// model->getMinimizationObjValue(),
Expand Down Expand Up @@ -4439,7 +4437,7 @@ int CbcNode::chooseDynamicBranch(CbcModel *model, CbcNode *lastNode,
}
}
if (model->messageHandler()->logLevel() > 3) {
if (anyAction == -2) {
if (anyAction == -2) {
printf("infeasible\n");
} else if (anyAction == -1) {
printf("%d fixed AND choosing %d iDo %d iChosenWhen %d numberToDo %d\n", numberToFix, bestChoice,
Expand Down

0 comments on commit 7caca03

Please sign in to comment.