From 21fd882b8099a470a581f582d8c504262de88435 Mon Sep 17 00:00:00 2001 From: Henri Lefebvre Date: Fri, 29 Nov 2024 23:45:10 +0100 Subject: [PATCH] use tolerance to prune nodes --- .../optimizers/branch-and-bound/Optimizers_BranchAndBound.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/include/idol/mixed-integer/optimizers/branch-and-bound/Optimizers_BranchAndBound.h b/lib/include/idol/mixed-integer/optimizers/branch-and-bound/Optimizers_BranchAndBound.h index 16eb16ec6..5d2f64079 100644 --- a/lib/include/idol/mixed-integer/optimizers/branch-and-bound/Optimizers_BranchAndBound.h +++ b/lib/include/idol/mixed-integer/optimizers/branch-and-bound/Optimizers_BranchAndBound.h @@ -795,7 +795,7 @@ void idol::Optimizers::BranchAndBound::prune_nodes_by_bound(BranchAnd const double raw_lower_bound = node.info().objective_value(); const double lower_bound = m_has_integer_objective && !is_integer(raw_lower_bound, Tolerance::Integer) ? std::ceil(raw_lower_bound) : raw_lower_bound; - if (lower_bound >= upper_bound) { // TODO use tolerance in terms of gap + if (lower_bound >= upper_bound - get_tol_mip_absolute_gap()) { it = t_active_nodes.erase(it); end = t_active_nodes.by_objective_value().end(); } else {