Skip to content

Commit

Permalink
remove import and add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnaceBleukx committed Oct 7, 2024
1 parent 5e39bf5 commit 7079fd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpmpy/tools/explain/mus.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from cpmpy.transformations.get_variables import get_variables
from cpmpy.transformations.normalize import toplevel_list

from .mss import mss_grow_naive
from .utils import make_assump_model
from ...expressions.utils import is_num

Expand Down Expand Up @@ -151,6 +150,8 @@ def optimal_mus(soft, hard=[], weights=None, solver="ortools", hs_solver="ortool
# else, the hitting set is SAT, now try to extend it without extra solve calls.
# Check which other assumptions/constraints are satisfied (using c.value())
# complement of grown subset is a correction subset
# Assumptions encode indicator constraints a -> c, find all false assumptions
# that really have to be false given the current solution.
new_corr_subset = [a for a,c in zip(assump, soft) if a.value() is False and c.value() is False]
hs_solver += cp.sum(new_corr_subset) >= 1

Expand Down

0 comments on commit 7079fd6

Please sign in to comment.