[ library(gfd) | Reference Manual | Alphabetic Index ]

<ConsistencyModule:> cumulatives_min(+StartTimes, +Durations, +Heights, +Assigned, +MachineConsumptions)

Multi-resource cumulatives constraint on specified tasks with required minimum resource consumptions.
StartTimes
Collection of N start times for tasks (domain variables or integers)
Durations
Collection of N duration for tasks (domain variables or integers)
Heights
Collection of N resource usages (positive) or productions (negative) by tasks (domain variables or integers) with the assigned machine
Assigned
Collection of N ID of machine assigned to tasks (domain variables or integers)
MachineConsumptions
Collection of M minimum amount of resource consumptions for machines (integers)

Description

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. MinUsages is a collection of M integers. The declarative meaning is: If there are N tasks and M machines, each machine having a minimum of produce that must 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 produce for the machine assigned to the task, then the sum of resource consumption for each machine by all the tasks must be at least the minimum 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_min_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 known as cumulatives in the global constraint catalog, where CTR is "greater 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).

Examples


[eclipse 7]: cumulatives_min([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,0]).  % Succeed
 
[eclipse 8]: cumulatives_min([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 


See Also

disjunctive / 2, cumulatives / 5, eclipse_6 : collection_to_list / 2, lists : collection_to_list / 2, cumulative / 4