mirror of
https://github.com/Z3Prover/z3
synced 2025-05-15 03:34:44 +00:00
tune initialization for wmax and sortmax
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
ea601dd403
commit
df0e3a100c
5 changed files with 32 additions and 12 deletions
|
@ -87,7 +87,7 @@ void theory_wmaxsat::init_search_eh() {
|
|||
m_propagate = true;
|
||||
}
|
||||
|
||||
bool_var theory_wmaxsat::assert_weighted(expr* fml, rational const& w) {
|
||||
expr* theory_wmaxsat::assert_weighted(expr* fml, rational const& w, bool is_true) {
|
||||
context & ctx = get_context();
|
||||
ast_manager& m = get_manager();
|
||||
app_ref var(m), wfml(m);
|
||||
|
@ -99,9 +99,11 @@ bool_var theory_wmaxsat::assert_weighted(expr* fml, rational const& w) {
|
|||
m_vars.push_back(var);
|
||||
m_fmls.push_back(fml);
|
||||
m_assigned.push_back(false);
|
||||
m_rmin_cost += w;
|
||||
if (!is_true) {
|
||||
m_rmin_cost += w;
|
||||
}
|
||||
m_normalize = true;
|
||||
return register_var(var, true);
|
||||
return ctx.bool_var2expr(register_var(var, true));
|
||||
}
|
||||
|
||||
bool_var theory_wmaxsat::register_var(app* var, bool attach) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue