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:
parent
2ff51e9a60
commit
cc3d65e544
6 changed files with 98 additions and 18 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue