Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimosts committed Sep 19, 2023
1 parent 7e71f0e commit 7c06bf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpmpy/solvers/choco.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def __init__(self, cpm_model=None, subsolver=None):

import pychoco as chc

assert (subsolver is None)
assert (subsolver is None), "Choco does not support any subsolver"

# initialise the native solver objects
self.chc_model = chc.Model()
Expand Down Expand Up @@ -570,7 +570,7 @@ def _get_constraint(self, cpm_expr):
# unlikely base case: True or False
elif isinstance(cpm_expr, BoolVal):
# Choco does not allow to post True or False. Post "certainly True or False" constraints instead
if cpm_expr:
if cpm_expr.args[0] is True:
return self.chc_model.arithm(self.helper_var, ">=", 0)
else:
return self.chc_model.arithm(self.helper_var, "<", 0)
Expand Down

0 comments on commit 7c06bf0

Please sign in to comment.