mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 02:42:02 +00:00
renaming to optsmt
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
33be06c6dc
commit
29cc9025cb
3 changed files with 17 additions and 17 deletions
|
@ -1,71 +0,0 @@
|
|||
/*++
|
||||
Copyright (c) 2013 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
optimize_objectives.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Objective optimization method.
|
||||
|
||||
Author:
|
||||
|
||||
Anh-Dung Phan (t-anphan) 2013-10-16
|
||||
|
||||
Notes:
|
||||
|
||||
--*/
|
||||
#ifndef _OPT_OBJECTIVES_H_
|
||||
#define _OPT_OBJECTIVES_H_
|
||||
|
||||
#include "opt_solver.h"
|
||||
|
||||
namespace opt {
|
||||
/**
|
||||
Takes solver with hard constraints added.
|
||||
Returns an optimal assignment to objective functions.
|
||||
*/
|
||||
|
||||
class optimize_objectives {
|
||||
ast_manager& m;
|
||||
opt_solver* s;
|
||||
volatile bool m_cancel;
|
||||
vector<inf_eps> m_lower;
|
||||
vector<inf_eps> m_upper;
|
||||
app_ref_vector m_objs;
|
||||
svector<bool> m_is_max;
|
||||
svector<smt::theory_var> m_vars;
|
||||
symbol m_engine;
|
||||
public:
|
||||
optimize_objectives(ast_manager& m): m(m), s(0), m_cancel(false), m_objs(m) {}
|
||||
|
||||
lbool operator()(opt_solver& s);
|
||||
|
||||
void add(app* t, bool is_max);
|
||||
|
||||
void set_cancel(bool f);
|
||||
|
||||
void set_engine(symbol const& e) { m_engine = e; }
|
||||
|
||||
void display(std::ostream& out) const;
|
||||
|
||||
inf_eps get_value(bool as_positive, unsigned index) const;
|
||||
|
||||
private:
|
||||
|
||||
lbool basic_opt();
|
||||
|
||||
lbool farkas_opt();
|
||||
|
||||
void set_max(vector<inf_eps>& dst, vector<inf_eps> const& src);
|
||||
|
||||
void update_lower();
|
||||
|
||||
lbool update_upper();
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue