mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
create hnf cuts too, when gomory_cut_period is 2
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
c518ddac6f
commit
5c712d471f
4 changed files with 13 additions and 8 deletions
|
@ -599,7 +599,7 @@ lia_move int_solver::make_hnf_cut() {
|
|||
}
|
||||
|
||||
lia_move int_solver::hnf_cut() {
|
||||
if ((m_number_of_calls) % settings().m_hnf_cut_period == 0) {
|
||||
if ((m_number_of_calls) % settings().hnf_cut_period() == 0) {
|
||||
return make_hnf_cut();
|
||||
}
|
||||
return lia_move::undef;
|
||||
|
|
|
@ -2263,16 +2263,16 @@ bool lar_solver::get_equality_and_right_side_for_term_on_current_x(unsigned term
|
|||
}
|
||||
|
||||
void lar_solver::set_cut_strategy(unsigned cut_frequency) {
|
||||
if (cut_frequency < 4) { // enable only gomory cut
|
||||
settings().m_int_gomory_cut_period = 2;
|
||||
settings().m_hnf_cut_period = 100000000;
|
||||
if (cut_frequency < 4) {
|
||||
settings().m_int_gomory_cut_period = 2; // do it often
|
||||
settings().set_hnf_cut_period(4); // also create hnf cuts
|
||||
} else if (cut_frequency == 4) { // enable all cuts and cube equally
|
||||
settings().m_int_gomory_cut_period = 4;
|
||||
settings().m_hnf_cut_period = 4;
|
||||
settings().set_hnf_cut_period(4);
|
||||
} else {
|
||||
// disable all heuristics
|
||||
// disable all heuristics except cube
|
||||
settings().m_int_gomory_cut_period = 10000000;
|
||||
settings().m_hnf_cut_period = 100000000;
|
||||
settings().set_hnf_cut_period(100000000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -189,13 +189,18 @@ public:
|
|||
unsigned column_number_threshold_for_using_lu_in_lar_solver;
|
||||
unsigned m_int_gomory_cut_period;
|
||||
unsigned m_int_find_cube_period;
|
||||
private:
|
||||
unsigned m_hnf_cut_period;
|
||||
public:
|
||||
bool m_int_run_gcd_test;
|
||||
bool m_int_pivot_fixed_vars_from_basis;
|
||||
bool m_int_patch_only_integer_values;
|
||||
unsigned limit_on_rows_for_hnf_cutter;
|
||||
unsigned limit_on_columns_for_hnf_cutter;
|
||||
|
||||
|
||||
unsigned hnf_cut_period() const { return m_hnf_cut_period; }
|
||||
void set_hnf_cut_period(unsigned period) { m_hnf_cut_period = period; }
|
||||
unsigned random_next() { return m_rand(); }
|
||||
void set_random_seed(unsigned s) { m_rand.set_seed(s); }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue