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

Normalize diff logic's optimal assignments

This commit is contained in:
Anh-Dung Phan 2013-11-25 00:30:15 +01:00
parent cc3d65e544
commit fff3a1aae5
2 changed files with 14 additions and 3 deletions

View file

@ -50,9 +50,10 @@ namespace smt {
edge const & e = es[i];
tout << "(assert (<= (- v" << e.get_source() << " v" << e.get_target() << ") " << e.get_weight() << "))" << std::endl;
};
tout << "(maximize (+ ";
tout << "(assert (= v0 0))" << std::endl;
tout << "(maximize (+";
for (unsigned i = 0; i < balances.size(); ++i) {
tout << "(* " << balances[i] << " v" << i << ") ";
tout << " (* " << balances[i] << " v" << i << ")";
};
tout << "))" << std::endl;
tout << "(optimize)" << std::endl;