mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 20:18:18 +00:00
add ability to touch variables for bound propagation
This commit is contained in:
parent
a74ef394ec
commit
4039352837
|
@ -1269,6 +1269,14 @@ void lar_solver::random_update(unsigned sz, var_index const * vars) {
|
||||||
ru.update();
|
ru.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void lar_solver::mark_rows_for_bound_prop(lpvar j) {
|
||||||
|
auto & column = A_r().m_columns[j];
|
||||||
|
for (auto const& r : column) {
|
||||||
|
m_rows_with_changed_bounds.insert(r.var());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void lar_solver::pivot_fixed_vars_from_basis() {
|
void lar_solver::pivot_fixed_vars_from_basis() {
|
||||||
m_mpq_lar_core_solver.m_r_solver.pivot_fixed_vars_from_basis();
|
m_mpq_lar_core_solver.m_r_solver.pivot_fixed_vars_from_basis();
|
||||||
|
|
|
@ -349,6 +349,7 @@ public:
|
||||||
void activate_check_on_equal(constraint_index, var_index&);
|
void activate_check_on_equal(constraint_index, var_index&);
|
||||||
void activate(constraint_index);
|
void activate(constraint_index);
|
||||||
void random_update(unsigned sz, var_index const * vars);
|
void random_update(unsigned sz, var_index const * vars);
|
||||||
|
void mark_rows_for_bound_prop(lpvar j);
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void propagate_bounds_for_touched_rows(lp_bound_propagator<T> & bp) {
|
void propagate_bounds_for_touched_rows(lp_bound_propagator<T> & bp) {
|
||||||
SASSERT(use_tableau());
|
SASSERT(use_tableau());
|
||||||
|
|
|
@ -39,6 +39,16 @@ enum class column_type {
|
||||||
fixed = 4
|
fixed = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline std::ostream& operator<<(std::ostream& out, column_type const& t) {
|
||||||
|
switch (t) {
|
||||||
|
case column_type::free_column: return out << "free";
|
||||||
|
case column_type::lower_bound: return out << "lower";
|
||||||
|
case column_type::upper_bound: return out << "upper";
|
||||||
|
case column_type::boxed: return out << "boxed";
|
||||||
|
case column_type::fixed: return out << "fixed";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
enum class simplex_strategy_enum {
|
enum class simplex_strategy_enum {
|
||||||
undecided = 3,
|
undecided = 3,
|
||||||
tableau_rows = 0,
|
tableau_rows = 0,
|
||||||
|
|
|
@ -46,6 +46,12 @@ typedef vector<column_cell> column_strip;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
using row_strip = vector<row_cell<T>>;
|
using row_strip = vector<row_cell<T>>;
|
||||||
|
template <typename T>
|
||||||
|
std::ostream& operator<<(std::ostream& out, const row_strip<T>& r) {
|
||||||
|
for (auto const& c : r)
|
||||||
|
out << c << " ";
|
||||||
|
return out << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
// each assignment for this matrix should be issued only once!!!
|
// each assignment for this matrix should be issued only once!!!
|
||||||
template <typename T, typename X>
|
template <typename T, typename X>
|
||||||
|
|
Loading…
Reference in a new issue