Skip to content

Commit

Permalink
duration can be either var or int
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnaceBleukx committed Mar 19, 2024
1 parent 6d80a36 commit ce10f9d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpmpy/solvers/choco.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,8 @@ def _get_constraint(self, cpm_expr):
start, dur, end, demand, cap = cpm_expr.args
# Everything given to cumulative in Choco needs to be a variable.
start, end, cap = self.to_vars((start, end, cap))
# Duration can be var or int
dur = self.solver_vars(dur)
# Convert demands to variables
demand = self.to_vars(demand) # Create variables for demand
# Create task variables. Choco can create them only one by one
Expand Down

0 comments on commit ce10f9d

Please sign in to comment.