Skip to content

Commit

Permalink
ensure toplevel list for naive mus variant
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnaceBleukx committed Aug 26, 2023
1 parent 3511d6d commit e9d166b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpmpy/tools/mus.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def mus_naive(soft, hard=[], solver="ortools"):
:param: hard: hard constraints, optional, list of expressions
:param: solver: name of a solver, see SolverLookup.solvernames()
"""
# ensure toplevel list
soft = toplevel_list(soft, merge_and=False)

m = Model(hard+soft)
assert not m.solve(solver=solver), "MUS: model must be UNSAT"

Expand Down

0 comments on commit e9d166b

Please sign in to comment.