From bdc0fed2fc41f448437a78269fdb6c7999739c68 Mon Sep 17 00:00:00 2001 From: Christopher Maes Date: Mon, 12 May 2025 09:35:54 -0700 Subject: [PATCH] Fix issue with not halting on integer infeasible problems This PR fixes an issues where cuOpt does not correctly stop, on a problem that has been proven integer infeasible (but had a feasible root relaxation). --- cpp/src/dual_simplex/branch_and_bound.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cpp/src/dual_simplex/branch_and_bound.cpp b/cpp/src/dual_simplex/branch_and_bound.cpp index 721b8ecda9..1b8a307d22 100644 --- a/cpp/src/dual_simplex/branch_and_bound.cpp +++ b/cpp/src/dual_simplex/branch_and_bound.cpp @@ -818,6 +818,14 @@ mip_status_t branch_and_bound_t::solve(mip_solution_t& solut } } + if (heap.size() == 0 && get_upper_bound() == inf) { + settings.log.printf("Integer infeasible.\n"); + status = mip_status_t::INFEASIBLE; + if (settings.heuristic_preemption_callback != nullptr) { + settings.heuristic_preemption_callback(); + } + } + uncrush_primal_solution(original_problem, original_lp, incumbent.x, solution.x); solution.objective = incumbent.objective; solution.lower_bound = lower_bound;