mirror of
https://github.com/Z3Prover/z3
synced 2026-07-24 07:52:33 +00:00
lp: add best-of-N efficacy-based Gomory row selection
Add lp.gomory_efficacy_select (default false) and lp.gomory_candidate_rows (default 3). When enabled, Gomory cut rows are no longer chosen by how close the basic variable is to an integer. Instead, gomory_candidate_rows integer-infeasible GMI-clean rows are sampled uniformly at random, a cut is built for each, and the most efficacious cuts whose efficacy (k - t(x*))/||t||_2 is at least gomory_cut_efficacy_threshold are added (up to num_cuts of them, best first). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
8d1dde407e
commit
11e95dafeb
5 changed files with 81 additions and 14 deletions
|
|
@ -28,8 +28,10 @@ namespace lp {
|
|||
class int_solver& lia;
|
||||
class lar_solver& lra;
|
||||
unsigned_vector gomory_select_int_infeasible_vars(unsigned num_cuts);
|
||||
unsigned_vector gomory_select_random_rows(unsigned num_rows);
|
||||
bool is_gomory_cut_target(lpvar j);
|
||||
bool cut_has_enough_efficacy(const lar_term& t, const mpq& k);
|
||||
double cut_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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue