From e49d9b16a8b3141c12158c1b3b18793fe6c7c8b0 Mon Sep 17 00:00:00 2001 From: Henri Lefebvre Date: Mon, 23 Oct 2023 20:20:01 +0200 Subject: [PATCH] Check for gap is closed during subtree exploration --- .../optimizers/branch-and-bound/Optimizers_BranchAndBound.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/include/idol/optimizers/branch-and-bound/Optimizers_BranchAndBound.h b/lib/include/idol/optimizers/branch-and-bound/Optimizers_BranchAndBound.h index 9dc72a06..93343ffd 100644 --- a/lib/include/idol/optimizers/branch-and-bound/Optimizers_BranchAndBound.h +++ b/lib/include/idol/optimizers/branch-and-bound/Optimizers_BranchAndBound.h @@ -440,6 +440,8 @@ void idol::Optimizers::BranchAndBound::explore(TreeNode &t_node, } if (t_active_nodes.empty()) { break; } + + if (is_terminated() || gap_is_closed()) { break; } auto selected_node = select_node_for_branching(t_active_nodes);