Skip to content

Commit

Permalink
differentiate fixed from offset-eq in statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Apr 18, 2023
1 parent ec1480b commit a2bac11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/math/lp/lp_bound_propagator.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,12 @@ class lp_bound_propagator {
);

bool added = m_imp.add_eq(je, ke, exp, is_fixed);
if (added)
lp().stats().m_offset_eqs++;
if (added) {
if (is_fixed)
lp().stats().m_fixed_eqs++;
else
lp().stats().m_offset_eqs++;
}
return added;
}

Expand Down
2 changes: 2 additions & 0 deletions src/math/lp/lp_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ struct statistics {
unsigned m_grobner_calls;
unsigned m_grobner_conflicts;
unsigned m_offset_eqs;
unsigned m_fixed_eqs;
statistics() { reset(); }
void reset() { memset(this, 0, sizeof(*this)); }
void collect_statistics(::statistics& st) const {
Expand All @@ -142,6 +143,7 @@ struct statistics {
st.update("arith-grobner-calls", m_grobner_calls);
st.update("arith-grobner-conflicts", m_grobner_conflicts);
st.update("arith-offset-eqs", m_offset_eqs);
st.update("arith-fixed-eqs", m_fixed_eqs);

}
};
Expand Down

0 comments on commit a2bac11

Please sign in to comment.