mirror of
https://github.com/Z3Prover/z3
synced 2025-08-23 19:47:52 +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
|
@ -20,6 +20,7 @@ Notes:
|
|||
#ifndef _OPT_SOLVER_H_
|
||||
#define _OPT_SOLVER_H_
|
||||
|
||||
#include"inf_rational.h"
|
||||
#include"inf_eps_rational.h"
|
||||
#include"ast.h"
|
||||
#include"params.h"
|
||||
|
@ -38,7 +39,7 @@ namespace opt {
|
|||
symbol m_logic;
|
||||
bool m_objective_enabled;
|
||||
smt::theory_var m_objective_var;
|
||||
inf_eps_rational<rational> m_objective_value;
|
||||
inf_eps_rational<inf_rational> m_objective_value;
|
||||
public:
|
||||
opt_solver(ast_manager & m, params_ref const & p, symbol const & l);
|
||||
virtual ~opt_solver();
|
||||
|
@ -64,7 +65,7 @@ namespace opt {
|
|||
void set_objective(app* term);
|
||||
void toggle_objective(bool enable);
|
||||
|
||||
inf_eps_rational<rational> get_objective_value();
|
||||
inf_eps_rational<inf_rational> get_objective_value();
|
||||
private:
|
||||
smt::theory_opt& get_optimizer();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue