3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-03 22:05:45 +00:00

Perf branch (#4710)

* avoid creating rows with  all but one fixed columns

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* pb

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* once in a while flip bounds of boxed variables during move_nbasic_to_bounds

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* flip rarely

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* flip rarely

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* flip rarely

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* return an empty model when lar_solver is not ready

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* randomly change bounded base var on demand only

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* randomly change bounded base var on demand only

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-09-25 17:47:29 -07:00 committed by GitHub
parent e775964cfd
commit 25724401cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 72 additions and 70 deletions

View file

@ -388,11 +388,7 @@ int gomory::find_basic_var() {
int result = -1;
unsigned n = 0;
unsigned min_row_size = UINT_MAX;
// Prefer smaller row size
// Prefer boxed to non-boxed
// Prefer smaller ranges
for (unsigned j : lra.r_basis()) {
if (!lia.column_is_int_inf(j))
@ -400,7 +396,6 @@ int gomory::find_basic_var() {
const row_strip<mpq>& row = lra.get_row(lia.row_of_basic_column(j));
if (!is_gomory_cut_target(row))
continue;
IF_VERBOSE(20, lia.display_row_info(verbose_stream(), lia.row_of_basic_column(j)));
if (min_row_size == UINT_MAX ||
2*row.size() < min_row_size ||
@ -414,7 +409,7 @@ int gomory::find_basic_var() {
}
lia_move gomory::operator()() {
lra.move_non_basic_columns_to_bounds();
lra.move_non_basic_columns_to_bounds(true);
int j = find_basic_var();
if (j == -1) return lia_move::undef;
unsigned r = lia.row_of_basic_column(j);