Don't require priority
attribute on models.
This commit is contained in:
parent
7e8fb4b8d0
commit
2c7a2fa3e0
@ -758,7 +758,8 @@ def visit(node):
|
|||||||
cores = [] # unsatisfiable cores if they do not
|
cores = [] # unsatisfiable cores if they do not
|
||||||
|
|
||||||
def on_model(model):
|
def on_model(model):
|
||||||
models.append((model.cost, model.priority, model.symbols(shown=True, terms=True)))
|
priorities = getattr(model, "priority", None)
|
||||||
|
models.append((model.cost, priorities, model.symbols(shown=True, terms=True)))
|
||||||
|
|
||||||
solve_kwargs = {
|
solve_kwargs = {
|
||||||
"assumptions": self.assumptions,
|
"assumptions": self.assumptions,
|
||||||
@ -800,8 +801,6 @@ def on_model(model):
|
|||||||
depths = extract_functions(best_model, "depth")
|
depths = extract_functions(best_model, "depth")
|
||||||
max_depth = max(d.args[1] for d in depths)
|
max_depth = max(d.args[1] for d in depths)
|
||||||
|
|
||||||
print("PRIO:", priorities)
|
|
||||||
|
|
||||||
result.criteria = build_criteria_names(min_cost, criteria, max_depth)
|
result.criteria = build_criteria_names(min_cost, criteria, max_depth)
|
||||||
|
|
||||||
# record the number of models the solver considered
|
# record the number of models the solver considered
|
||||||
|
Loading…
Reference in New Issue
Block a user