diff --git a/src/math/lp/int_solver.cpp b/src/math/lp/int_solver.cpp index aec275b774..1d9de513e1 100644 --- a/src/math/lp/int_solver.cpp +++ b/src/math/lp/int_solver.cpp @@ -268,7 +268,9 @@ namespace lp { if (r == lia_move::undef) r = patch_basic_columns(); if (r == lia_move::undef && should_find_cube()) r = int_cube(lia)(); if (r == lia_move::undef && should_find_lcube()) r = find_lcube(); - if (r == lia_move::undef) lra.move_non_basic_columns_to_bounds(); + if (r == lia_move::undef && + (!settings().int_lazy_move_nb() || should_hnf_cut() || should_gomory_cut())) + lra.move_non_basic_columns_to_bounds(); if (r == lia_move::undef && should_hnf_cut()) r = hnf_cut(); if (r == lia_move::undef && should_gomory_cut()) r = gomory(lia).get_gomory_cuts(2); if (r == lia_move::undef && should_solve_dioph_eq()) r = solve_dioph_eq(); diff --git a/src/math/lp/lp_params_helper.pyg b/src/math/lp/lp_params_helper.pyg index e9604e04b8..a1c32fcab1 100644 --- a/src/math/lp/lp_params_helper.pyg +++ b/src/math/lp/lp_params_helper.pyg @@ -11,5 +11,6 @@ def_module_params(module_name='lp', ('dio_run_gcd', BOOL, False, 'Run the GCD heuristic if dio is on, if dio is disabled the option is not used'), ('lcube', BOOL, True, 'use the largest cube test for integer feasibility'), ('lcube_flips', UINT, 16, 'maximal number of coordinate flips when repairing the rounded largest cube center, only relevant when lcube is true'), + ('int_lazy_move_nb', BOOL, True, 'skip the standalone move_non_basic_columns_to_bounds call (and its find_feasible_solution re-solve) unless an HNF or Gomory cut will be attempted in this iteration; off reproduces the master behavior of always snapping'), )) diff --git a/src/math/lp/lp_settings.cpp b/src/math/lp/lp_settings.cpp index 63836aafa7..0efa43bc25 100644 --- a/src/math/lp/lp_settings.cpp +++ b/src/math/lp/lp_settings.cpp @@ -45,5 +45,6 @@ void lp::lp_settings::updt_params(params_ref const& _p) { m_dio_run_gcd = lp_p.dio_run_gcd(); m_lcube = lp_p.lcube(); m_lcube_flips = lp_p.lcube_flips(); + m_int_lazy_move_nb = lp_p.int_lazy_move_nb(); m_max_conflicts = p.max_conflicts(); } diff --git a/src/math/lp/lp_settings.h b/src/math/lp/lp_settings.h index cb27b1628c..367ce75e5d 100644 --- a/src/math/lp/lp_settings.h +++ b/src/math/lp/lp_settings.h @@ -266,7 +266,9 @@ private: bool m_dio_run_gcd = true; bool m_lcube = true; unsigned m_lcube_flips = 16; + bool m_int_lazy_move_nb = true; public: + bool int_lazy_move_nb() const { return m_int_lazy_move_nb; } bool lcube() const { return m_lcube; } unsigned lcube_flips() const { return m_lcube_flips; } unsigned dio_calls_period() const { return m_dio_calls_period; }