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:
parent
898609a3ef
commit
a44044fb15
8 changed files with 114 additions and 33 deletions
|
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue