3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-22 23:15:51 +00:00

lp: add optional efficacy filter for Gomory cuts

Add lp.gomory_cut_efficacy_filter (default false) and
lp.gomory_cut_efficacy_threshold (default 0.01). When enabled, a
generated Gomory cut t >= k is discarded if its efficacy
(k - t(x*))/||t||_2, the normalized distance from the LP solution to the
cut hyperplane, is below the threshold. Comparison is done on squared
quantities to stay rational and deterministic.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Lev Nachmanson 2026-06-25 14:51:32 -07:00
parent 57fb719007
commit 8d1dde407e
5 changed files with 41 additions and 1 deletions

View file

@ -29,6 +29,7 @@ namespace lp {
class lar_solver& lra;
unsigned_vector gomory_select_int_infeasible_vars(unsigned num_cuts);
bool is_gomory_cut_target(lpvar j);
bool cut_has_enough_efficacy(const lar_term& t, const mpq& k);
u_dependency* add_deps(u_dependency*, const row_strip<mpq>&, lpvar);
public:
lia_move get_gomory_cuts(unsigned num_cuts);