3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-18 02:16:40 +00:00

Add visualization of spanning trees

This commit is contained in:
Anh-Dung Phan 2013-10-30 16:52:37 -07:00
parent 49aba844b8
commit 01c3dd779b
3 changed files with 112 additions and 59 deletions

View file

@ -1007,7 +1007,7 @@ bool theory_diff_logic<Ext>::maximize(theory_var v) {
for (unsigned i = 0; i < objective.size(); ++i) {
verbose_stream() << "coefficient " << objective[i].second << " of theory_var " << objective[i].first << "\n";
}
verbose_stream() << m_objective_consts[v] << "\n";);
verbose_stream() << "free coefficient " << m_objective_consts[v] << "\n";);
// Objective coefficients now become balances
vector<fin_numeral> balances(m_graph.get_num_nodes());
@ -1024,9 +1024,9 @@ bool theory_diff_logic<Ext>::maximize(theory_var v) {
m_objective_value = net_flow.get_optimal_solution(potentials, true);
std::cout << "Objective value of var " << v << ": " << m_objective_value << std::endl;
// TODO: return the model of the optimal solution from potentials
IF_VERBOSE(1,
TRACE("network_flow",
for (unsigned i = 0; i < potentials.size(); ++i) {
verbose_stream() << "v" << i << " -> " << potentials[i] << "\n";
tout << "v" << i << " -> " << potentials[i] << "\n";
});
}