From 7caca03f1151436c4d84e05a9c445f92a85fef7f Mon Sep 17 00:00:00 2001 From: John Forrest Date: Tue, 23 Jul 2024 11:06:18 +0100 Subject: [PATCH] Fix stupid tolerance on better integer solutions --- src/CbcNode.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/CbcNode.cpp b/src/CbcNode.cpp index bbe08514b..578074614 100644 --- a/src/CbcNode.cpp +++ b/src/CbcNode.cpp @@ -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(), @@ -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(), @@ -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,