mirror of
https://github.com/Z3Prover/z3
synced 2025-07-25 13:47:01 +00:00
separate the gomory cut functionality in a separate file
Signed-off-by: Lev <levnach@hotmail.com>
This commit is contained in:
parent
26764b076f
commit
324396e403
7 changed files with 284 additions and 232 deletions
|
@ -53,6 +53,13 @@ public:
|
|||
bool move_non_basic_column_to_bounds(unsigned j);
|
||||
lia_move check_wrapper(lar_term& t, mpq& k, explanation& ex);
|
||||
bool is_base(unsigned j) const;
|
||||
bool is_real(unsigned j) const;
|
||||
const impq & lower_bound(unsigned j) const;
|
||||
const impq & upper_bound(unsigned j) const;
|
||||
bool is_int(unsigned j) const;
|
||||
const impq & get_value(unsigned j) const;
|
||||
bool at_lower(unsigned j) const;
|
||||
bool at_upper(unsigned j) const;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -79,10 +86,7 @@ private:
|
|||
void add_to_explanation_from_fixed_or_boxed_column(unsigned j);
|
||||
lia_move patch_nbasic_columns();
|
||||
bool get_freedom_interval_for_column(unsigned j, bool & inf_l, impq & l, bool & inf_u, impq & u, mpq & m);
|
||||
const impq & lower_bound(unsigned j) const;
|
||||
const impq & upper_bound(unsigned j) const;
|
||||
bool is_int(unsigned j) const;
|
||||
bool is_real(unsigned j) const;
|
||||
private:
|
||||
bool is_boxed(unsigned j) const;
|
||||
bool is_fixed(unsigned j) const;
|
||||
bool is_free(unsigned j) const;
|
||||
|
@ -91,7 +95,6 @@ private:
|
|||
void set_value_for_nbasic_column_ignore_old_values(unsigned j, const impq & new_val);
|
||||
bool non_basic_columns_are_at_bounds() const;
|
||||
bool is_feasible() const;
|
||||
const impq & get_value(unsigned j) const;
|
||||
bool column_is_int_inf(unsigned j) const;
|
||||
void trace_inf_rows() const;
|
||||
lia_move branch_or_sat();
|
||||
|
@ -104,13 +107,9 @@ private:
|
|||
bool move_non_basic_columns_to_bounds();
|
||||
void branch_infeasible_int_var(unsigned);
|
||||
lia_move mk_gomory_cut(unsigned inf_col, const row_strip<mpq>& row);
|
||||
lia_move report_conflict_from_gomory_cut();
|
||||
void adjust_term_and_k_for_some_ints_case_gomory(mpq& lcm_den);
|
||||
lia_move proceed_with_gomory_cut(unsigned j);
|
||||
bool is_gomory_cut_target(const row_strip<mpq>&);
|
||||
bool at_bound(unsigned j) const;
|
||||
bool at_low(unsigned j) const;
|
||||
bool at_upper(unsigned j) const;
|
||||
bool has_low(unsigned j) const;
|
||||
bool has_upper(unsigned j) const;
|
||||
unsigned row_of_basic_column(unsigned j) const;
|
||||
|
@ -125,17 +124,13 @@ public:
|
|||
lp_assert(is_rational(n));
|
||||
return n.x - floor(n.x);
|
||||
}
|
||||
private:
|
||||
void real_case_in_gomory_cut(const mpq & a, unsigned x_j, const mpq& f_0, const mpq& one_minus_f_0);
|
||||
void int_case_in_gomory_cut(const mpq & a, unsigned x_j, mpq & lcm_den, const mpq& f_0, const mpq& one_minus_f_0);
|
||||
constraint_index column_upper_bound_constraint(unsigned j) const;
|
||||
constraint_index column_lower_bound_constraint(unsigned j) const;
|
||||
void display_row_info(std::ostream & out, unsigned row_index) const;
|
||||
void gomory_cut_adjust_t_and_k(vector<std::pair<mpq, unsigned>> & pol, lar_term & t, mpq &k, bool num_ints, mpq &lcm_den);
|
||||
bool current_solution_is_inf_on_cut() const;
|
||||
public:
|
||||
|
||||
bool shift_var(unsigned j, unsigned range);
|
||||
private:
|
||||
void display_row_info(std::ostream & out, unsigned row_index) const;
|
||||
unsigned random();
|
||||
bool has_inf_int() const;
|
||||
lia_move create_branch_on_column(int j);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue