Skip to content

Commit

Permalink
disjunctive rules for conditionals instead of choice rules
Browse files Browse the repository at this point in the history
  • Loading branch information
damianoazzolini committed Dec 19, 2024
1 parent e6f7554 commit 1406acc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pastasolver/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ def generate_clauses_for_conditionals(conditional : str) -> 'list[str]':

# disjunctive rules are not ok, I need to use choice rules
# disjunct = cond[0] + " ; not_" + cond[0] + " :- " + cond[1] + "."
disjunct = f"0{{ {cond[0]} }}1 :- {cond[1]}."
# disjunct = f"0{{ {cond[0]} }}1 :- {cond[1]}."
disjunct = f"{cond[0]} ; not_{cond[0]} :- {cond[1]}."
# here I consider only one term in the left part
# f(a,b) | ... not f(a,b), f(b,c) | ...
constr = ":- #count{" + ','.join(variables) + ":" + cond[1] + "} = H, #count{"+\
Expand Down

0 comments on commit 1406acc

Please sign in to comment.