Decomposition of cumulative with constant
@@ -446,6 +446,9 @@ class Cumulative(GlobalConstraint):
for t in range(lb,ub+1):
demand_at_t = 0
for job in range(len(start)):
+ if is_num(demand):
+ demand_at_t += demand * ((start[job] <= t) & (t < end[job]))
+ else:
demand_at_t += demand[job] * ((start[job] <= t) & (t < end[job]))
cons += [capacity >= demand_at_t]
