How do I model an interval variable with an intensity function on Choco Solver?

43 views Asked by At

I am trying to solve a scheduling optimization problem using Choco solver. It requires the scheduling of tasks based on the workforce's shift. It includes a capability that certain tasks can be allowed to stop when there is a break in the shift and then resumed again. What is the best way to model such a constraint on Choco solver?

I have been able to achieve it using the step function as well as the intensity function on Cplex. But, I couldn't find a similar functionality on Choco.

1

There are 1 answers

0
Arthur Godet On

For now (things might change in the future), the best way to model this in Choco Solver would be to use Table constraints to constrain the duration of your tasks to be either initial_duration, either (initial_duration + shift_duration) if its start is between shift_start - initial_duration + 1 and shift_start - 1, either (initial_duration + shift_duration - i) if the task starts at shift_start + i.

You can also avoid the last part (the third either) by removing the shifts from the start's domain of tasks (either directly if the start variable has enumerated domain, either through constraints).