3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 11:55:51 +00:00

Add facilities to get optimal assignments

This commit is contained in:
Anh-Dung Phan 2013-11-24 22:31:52 +01:00
parent 2ff51e9a60
commit cc3d65e544
6 changed files with 98 additions and 18 deletions

View file

@ -295,6 +295,13 @@ namespace smt {
}
}
for (unsigned i = 0; i < num_edges; ++i) {
dl_var src = m_graph.get_source(i);
dl_var tgt = m_graph.get_target(i);
numeral weight = m_graph.get_weight(i);
SASSERT(m_potentials[src] - m_potentials[tgt] <= weight);
}
// m_flows are zero on non-basic edges
for (unsigned i = 0; i < m_flows.size(); ++i) {
SASSERT(m_states[i] == BASIS || m_flows[i].is_zero());