mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 18:31:49 +00:00
do not throttle lp bound propagation
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
6b01376f51
commit
6027224e34
|
@ -140,8 +140,10 @@ public:
|
|||
for (unsigned j = m_changes.size(); j-- > first_change; ) {
|
||||
const auto & p = m_changes[j];
|
||||
unsigned jc = p.first;
|
||||
if (jc < m_vector.size())
|
||||
if (jc < m_vector.size()) {
|
||||
m_vector[jc] = p.second; // restore the old value
|
||||
m_vector[jc] = p.second; // restore the old value
|
||||
}
|
||||
}
|
||||
resize(m_changes, first_change);
|
||||
|
||||
|
|
|
@ -2346,23 +2346,18 @@ public:
|
|||
|
||||
}
|
||||
|
||||
unsigned m_propagation_delay{1};
|
||||
unsigned m_propagation_count{0};
|
||||
|
||||
bool should_propagate() {
|
||||
++m_propagation_count;
|
||||
return BP_NONE != propagation_mode() && (m_propagation_count >= m_propagation_delay);
|
||||
return BP_NONE != propagation_mode();
|
||||
}
|
||||
|
||||
void update_propagation_threshold(bool made_progress) {
|
||||
m_propagation_count = 0;
|
||||
if (made_progress) {
|
||||
m_propagation_delay = std::max(1u, m_propagation_delay-1u);
|
||||
}
|
||||
else {
|
||||
m_propagation_delay += 2;
|
||||
}
|
||||
}
|
||||
// void update_propagation_threshold(bool made_progress) {
|
||||
// if (made_progress) {
|
||||
// m_propagation_delay = std::max(1u, m_propagation_delay-1u);
|
||||
// }
|
||||
// else {
|
||||
// m_propagation_delay += 2;
|
||||
// }
|
||||
// }
|
||||
|
||||
void propagate_bounds_with_lp_solver() {
|
||||
if (!should_propagate())
|
||||
|
@ -2383,7 +2378,6 @@ public:
|
|||
propagate_lp_solver_bound(bp.m_ibounds[i]);
|
||||
}
|
||||
}
|
||||
update_propagation_threshold(props < m_stats.m_bound_propagations1);
|
||||
}
|
||||
|
||||
bool bound_is_interesting(unsigned vi, lp::lconstraint_kind kind, const rational & bval) const {
|
||||
|
|
Loading…
Reference in a new issue