mirror of
https://github.com/Z3Prover/z3
synced 2025-08-23 19:47:52 +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
|
@ -37,6 +37,8 @@ namespace opt {
|
|||
symbol m_logic;
|
||||
bool m_objective_enabled;
|
||||
smt::theory_var m_objective_var;
|
||||
ast_manager& m_manager;
|
||||
optional<rational> m_objective_value;
|
||||
public:
|
||||
opt_solver(ast_manager & m, params_ref const & p, symbol const & l);
|
||||
virtual ~opt_solver();
|
||||
|
@ -61,6 +63,8 @@ namespace opt {
|
|||
|
||||
void set_objective(app* term);
|
||||
void toggle_objective(bool enable);
|
||||
|
||||
optional<rational> get_objective_value();
|
||||
private:
|
||||
smt::theory_opt& get_optimizer();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue