mirror of
https://github.com/Z3Prover/z3
synced 2025-10-09 01:11:55 +00:00
cleanup in hnf.h
Signed-off-by: Lev Nachmanson <levnach@hotmail.com> fixex in maximize_term Signed-off-by: Lev Nachmanson <levnach@hotmail.com> prepare for LIRA (#76) * merge Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> * simple mixed integer example Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com> Nikolaj's fixes in theory_lra.cpp Signed-off-by: Lev Nachmanson <levnach@hotmail.com> fixes in maximize_term, disable find_cube for mixed case Signed-off-by: Lev Nachmanson <levnach@hotmail.com> fix cube heuristic for the mixed case Signed-off-by: Lev Nachmanson <levnach@hotmail.com> fix the build Signed-off-by: Lev Nachmanson <levnach@hotmail.com> fix in find cube delta's calculation Signed-off-by: Lev Nachmanson <levnach@hotmail.com> remove a printout Signed-off-by: Lev Nachmanson <levnach@hotmail.com> remove a blank line Signed-off-by: Lev Nachmanson <levnach@microsoft.com> test credentials Signed-off-by: Lev Nachmanson <levnach@microsoft.com> avoid double checks to add terms in hnf_cutter Signed-off-by: Lev Nachmanson <levnach@microsoft.com> fixes in add terms to hnf_cutter Signed-off-by: Lev Nachmanson <levnach@hotmail.com> remove a variable used for debug only Signed-off-by: Lev Nachmanson <levnach@hotmail.com> remove a field Signed-off-by: Lev Nachmanson <levnach@hotmail.com> remove a warning and hide m_A_orig under debug Signed-off-by: Lev Nachmanson <levnach@hotmail.com> use var_register to deal with mapping between external and local variables Signed-off-by: Lev Nachmanson <levnach@hotmail.com> tighten the loop in explain_implied_bound Signed-off-by: Lev Nachmanson <levnach@hotmail.com> fixes in theory_lra and relaxing debug checks in pop(), for the case when push() has been done from not fully initialized state Signed-off-by: Lev Nachmanson <levnach@hotmail.com> suppress hnf cutter when the numbers become too large Signed-off-by: Lev Nachmanson <levnach@hotmail.com> remove some debug code Signed-off-by: Lev Nachmanson <levnach@hotmail.com> adjusting hnf Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
9ba4026bc6
commit
eeaca949e0
13 changed files with 424 additions and 260 deletions
|
@ -47,15 +47,6 @@ namespace lp {
|
|||
|
||||
|
||||
class lar_solver : public column_namer {
|
||||
class ext_var_info {
|
||||
unsigned m_internal_j; // the internal index
|
||||
bool m_is_integer;
|
||||
public:
|
||||
ext_var_info(unsigned j, var_index internal_j): ext_var_info(j, false) {}
|
||||
ext_var_info(unsigned j , bool is_int) : m_internal_j(j), m_is_integer(is_int) {}
|
||||
unsigned internal_j() const { return m_internal_j;}
|
||||
bool is_integer() const {return m_is_integer;}
|
||||
};
|
||||
#if Z3DEBUG_CHECK_UNIQUE_TERMS
|
||||
struct term_hasher {
|
||||
std::size_t operator()(const lar_term *t) const
|
||||
|
@ -100,8 +91,7 @@ class lar_solver : public column_namer {
|
|||
lp_settings m_settings;
|
||||
lp_status m_status;
|
||||
stacked_value<simplex_strategy_enum> m_simplex_strategy;
|
||||
std::unordered_map<unsigned, ext_var_info> m_ext_vars_to_columns;
|
||||
vector<unsigned> m_columns_to_ext_vars_or_term_indices;
|
||||
var_register m_var_register;
|
||||
stacked_vector<ul_pair> m_columns_to_ul_pairs;
|
||||
vector<lar_base_constraint*> m_constraints;
|
||||
private:
|
||||
|
@ -119,8 +109,6 @@ public:
|
|||
lar_core_solver m_mpq_lar_core_solver;
|
||||
private:
|
||||
int_solver * m_int_solver;
|
||||
bool m_has_int_var;
|
||||
|
||||
|
||||
public :
|
||||
unsigned terms_start_index() const { return m_terms_start_index; }
|
||||
|
@ -311,21 +299,21 @@ public:
|
|||
|
||||
vector<constraint_index> get_all_constraint_indices() const;
|
||||
|
||||
bool maximize_term_on_tableau(const vector<std::pair<mpq, var_index>> & term,
|
||||
bool maximize_term_on_tableau(const lar_term & term,
|
||||
impq &term_max);
|
||||
|
||||
bool costs_are_zeros_for_r_solver() const;
|
||||
bool reduced_costs_are_zeroes_for_r_solver() const;
|
||||
|
||||
void set_costs_to_zero(const vector<std::pair<mpq, var_index>> & term);
|
||||
void set_costs_to_zero(const lar_term & term);
|
||||
|
||||
void prepare_costs_for_r_solver(const vector<std::pair<mpq, var_index>> & term);
|
||||
void prepare_costs_for_r_solver(const lar_term & term);
|
||||
|
||||
bool maximize_term_on_corrected_r_solver(const vector<std::pair<mpq, var_index>> & term,
|
||||
bool maximize_term_on_corrected_r_solver(lar_term & term,
|
||||
impq &term_max);
|
||||
// starting from a given feasible state look for the maximum of the term
|
||||
// return true if found and false if unbounded
|
||||
lp_status maximize_term(const vector<std::pair<mpq, var_index>> & term,
|
||||
lp_status maximize_term(unsigned ext_j ,
|
||||
impq &term_max);
|
||||
|
||||
|
||||
|
@ -578,7 +566,7 @@ public:
|
|||
lar_core_solver & get_core_solver() { return m_mpq_lar_core_solver; }
|
||||
bool column_corresponds_to_term(unsigned) const;
|
||||
void catch_up_in_updating_int_solver();
|
||||
var_index to_var_index(unsigned ext_j) const;
|
||||
var_index to_column(unsigned ext_j) const;
|
||||
bool tighten_term_bounds_by_delta(unsigned, const impq&);
|
||||
void round_to_integer_solution();
|
||||
void update_delta_for_terms(const impq & delta, unsigned j, const vector<unsigned>&);
|
||||
|
@ -588,5 +576,6 @@ public:
|
|||
const vector<unsigned> & r_nbasis() const { return m_mpq_lar_core_solver.r_nbasis(); }
|
||||
bool get_equality_and_right_side_for_term_on_current_x(unsigned i, mpq &rs, constraint_index& ci) const;
|
||||
bool remove_from_basis(unsigned);
|
||||
lar_term get_term_to_maximize(unsigned ext_j) const;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue