mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 19:35:50 +00:00
A few changes based on previous reviews
Tested the optimization procedure with: - unbounded objectives - bounded with rational solutions - bounded with irrational solutions
This commit is contained in:
parent
3dd72f8f16
commit
3441fc2942
8 changed files with 24 additions and 26 deletions
|
@ -68,7 +68,7 @@ namespace opt {
|
|||
}
|
||||
|
||||
if (!m_objectives.empty()) {
|
||||
vector<inf_eps_rational<rational> > values;
|
||||
vector<inf_eps_rational<inf_rational> > values;
|
||||
for (unsigned i = 0; i < fmls_copy.size(); ++i) {
|
||||
s->assert_expr(fmls_copy[i].get());
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ namespace opt {
|
|||
// if (!instsanceof ...) { throw ... invalid usage ..}
|
||||
is_sat = optimize_objectives(dynamic_cast<opt_solver&>(*s), m_objectives, m_is_max, values);
|
||||
std::cout << "is-sat: " << is_sat << "\n";
|
||||
|
||||
if (is_sat != l_true) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue