From 43bb5ea004f0eebd8b337a63470985e17d1830a3 Mon Sep 17 00:00:00 2001 From: tltomi <58689296+tltomi@users.noreply.github.com> Date: Tue, 1 Dec 2026 12:57:49 +0200 Subject: [PATCH] Temporarily disable kHighsCallbackSimplexInterrupt callback (revert #359) Reverts #359, as suggested in #390. Closes #390. Since HiGHS v1.11, every call of a callback set through the C API copies `num_col` doubles (ERGO-Code/HiGHS#3850), and the simplex interrupt is called at every iteration. With this change, Ctrl-C during a simplex solve waits for the solve to end; interior point and MIP solves still stop at once. ERGO-Code/HiGHS#3851 makes HiGHS call the simplex interrupt every 100 iterations by default; the two lines can come back with a HiGHS_jll that has it. --- src/MOI_wrapper.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/MOI_wrapper.jl b/src/MOI_wrapper.jl index e9f722d..04b4587 100644 --- a/src/MOI_wrapper.jl +++ b/src/MOI_wrapper.jl @@ -3604,8 +3604,11 @@ function _set_default_callback(model::Optimizer) ) ret = Highs_setCallback(model, callback_cfn, C_NULL) _check_ret(ret) - ret = Highs_startCallback(model, kHighsCallbackSimplexInterrupt) - _check_ret(ret) + # See Issue 390. Since HiGHS@1.11, the SimplexInterrupt callback copies + # num_col doubles at every simplex iteration ERGO-Code/HiGHS#3850 + # Re-enable once HiGHS_jll includes ERGO-Code/HiGHS/pull/3851. + # ret = Highs_startCallback(model, kHighsCallbackSimplexInterrupt) + # _check_ret(ret) ret = Highs_startCallback(model, kHighsCallbackIpmInterrupt) _check_ret(ret) ret = Highs_startCallback(model, kHighsCallbackMipInterrupt)