mirror of
https://github.com/Z3Prover/z3
synced 2025-08-23 19:47:52 +00:00
Replace the use of optional<rational> by inf_eps_rational<rational>
Also handle composite objectives correctly.
This commit is contained in:
parent
a44044fb15
commit
53f78f7d19
9 changed files with 50 additions and 43 deletions
|
@ -20,6 +20,7 @@ Notes:
|
|||
#ifndef _OPT_SOLVER_H_
|
||||
#define _OPT_SOLVER_H_
|
||||
|
||||
#include"inf_eps_rational.h"
|
||||
#include"ast.h"
|
||||
#include"params.h"
|
||||
#include"solver_na2as.h"
|
||||
|
@ -37,8 +38,7 @@ namespace opt {
|
|||
symbol m_logic;
|
||||
bool m_objective_enabled;
|
||||
smt::theory_var m_objective_var;
|
||||
ast_manager& m_manager;
|
||||
optional<rational> m_objective_value;
|
||||
inf_eps_rational<rational> m_objective_value;
|
||||
public:
|
||||
opt_solver(ast_manager & m, params_ref const & p, symbol const & l);
|
||||
virtual ~opt_solver();
|
||||
|
@ -64,7 +64,7 @@ namespace opt {
|
|||
void set_objective(app* term);
|
||||
void toggle_objective(bool enable);
|
||||
|
||||
optional<rational> get_objective_value();
|
||||
inf_eps_rational<rational> get_objective_value();
|
||||
private:
|
||||
smt::theory_opt& get_optimizer();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue