A disjunctive scheduling constraint. StartTimes, Durations and Scheduled are collections (a la collection_to_list/2) of equal size N. Durations must be non-negative, and Scheduled are booleans (0/1). The declarative meaning is that the scheduled tasks with the given start times and durations do not overlap at any point in time. A task would not be scheduled if its Scheduled boolean is 0, and must be scheduled if 1.
Note that the constraint is implemented by different Gecode propagators, depending on if Durations contains domain variables or not. If Durations does have domain variables, the Gecode propagator requires an extra End domain variable specifying the end time, and a constraint
End #= Start + Durationfor each task. These are posted as part of the constraint (the End variables are not accessible by the user).
Any input variables which are not already domain variables will be converted into domain variables with default bounds.
This constraint is implemented using Gecode's unary() constraint (with extra constraints on task end times if any task duration is a domain variable).