3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 19:35:50 +00:00

A rudimentary version of MathSAT optimization

Remarks:
(1) The core procedure accepts maximization only
(2) Add lazy initialization to min_maximize_cmd
(3) The procedure isn't working with composite objective yet.
This commit is contained in:
Anh-Dung Phan 2013-10-18 18:00:24 -07:00
parent 898609a3ef
commit a44044fb15
8 changed files with 114 additions and 33 deletions

View file

@ -73,8 +73,13 @@ namespace opt {
if (is_sat != l_true) {
return;
}
for (unsigned i = 0; i < values.size(); ++i) {
// display
if (values[i]) {
std::cout << "objective function: " << mk_pp(m_objectives[i].get(), m) << " -> " << *values[i] << "\n";
} else {
std::cout << "objective function: " << mk_pp(m_objectives[i].get(), m) << " -> unbounded\n";
}
}
}