From 13f6726f97661c48e60c68c32977f9095b6b12fd Mon Sep 17 00:00:00 2001 From: Henri Lefebvre Date: Tue, 10 Oct 2023 10:26:25 +0200 Subject: [PATCH] fixes tolerance in cut separation --- .../branch-and-bound/callbacks/CutSeparation.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/src/optimizers/branch-and-bound/callbacks/CutSeparation.cpp b/lib/src/optimizers/branch-and-bound/callbacks/CutSeparation.cpp index c71827e9d..2d7530852 100644 --- a/lib/src/optimizers/branch-and-bound/callbacks/CutSeparation.cpp +++ b/lib/src/optimizers/branch-and-bound/callbacks/CutSeparation.cpp @@ -48,7 +48,9 @@ void idol::impl::CutSeparation::operator()(CallbackEvent t_event) { m_separation_problem->set_obj_expr(std::move(objective)); + idol_Log(Debug, "Start solving separation problem"); m_separation_problem->optimize(); + idol_Log(Debug, "Stop solving separation problem"); const auto status = m_separation_problem->get_status(); @@ -63,10 +65,13 @@ void idol::impl::CutSeparation::operator()(CallbackEvent t_event) { m_separation_problem->set_solution_index(k); - if (k == 0 && m_separation_problem->get_best_obj() >= 1e-3) { + if (k == 0 && m_separation_problem->get_best_obj() >= -1e-3) { + std::cout << "STOP" << std::endl; break; } + idol_Log(Debug, "Violation: " << m_separation_problem->get_best_obj() << ".") + const auto& solution = save_primal(*m_separation_problem); TempCtr cut(m_cut.row().fix(solution), m_cut.type());