A multi-resource cumulatives scheduling constraint - scheduling of M machines providing resources for N tasks. StartTimes, Durations, Heights and Assigned are collections (a la collection_to_list/2) of equal size N of domain variables or integers. MachineLimits is a collection of M integers. The declarative meaning is: If there are N tasks and M machines, each machine having a limit of resource that can be consumed at any single time-point, and each task starting at a certain start time, having a certain duration and consuming/producing a certain (constant) amount of resource for the machine assigned to the task, then the sum of resource usage for each machine by all the tasks does not exceed the capacity for that machine at any time.
Any input variables which are not already domain variables are turned into domain variables with default domain.
This constraint generalise the cumulative constraint to multi-resources, and is also more flexible, in that tasks can both produce and consume a resource.
Note that the Gecode implementation of this constraint has index starting from 0, i.e. the numbering for the machines starts from 0. These native indices are mapped to the ECLiPSe indices starting from 1 with an additional dummy zero'th machine that is not used. A version of this constraint that uses native Gecode indexing is available as cumulatives_g/5.
ConsistencyModule is the optional module specification to give the consistency level for the propagation for this constraint: gfd_vc for value consistency.
This constraint is also known as cumulatives in the global constraint catalog, where CTR is "less than or equal to" case The constraint is implemented using Gecode's cumulatives constraint (with extra constraints on task end-times if any task duration is a domain variable).
[eclipse 4]: cumulatives([2,1,4,2,5,3,1],[2,4,2,3,2,2,4],[-2,1,-1,2,2,-1,1], [1,1,1,1,1,2,2], [2,1]). % Succeed [eclipse 5]: cumulatives([2,1,4,2,5,3,1],[2,4,2,3,2,2,4],[-2,1,-1,2,2,-1,1], [1,1,1,1,1,2,2], [1,1]). % Fails