AddCumulative for Capacity-Limited Resources
The AddCumulative constraint models a single renewable resource of fixed capacity shared among many tasks, each with its own demand. This lesson covers verifying feasibility of a cumulative schedule, computing peak resource usage to find the minimum feasible capacity, and bounding the demand of an unknown task so the schedule remains feasible.
Tutorial
The Cumulative Constraint
The AddCumulative constraint generalizes AddNoOverlap to model a single renewable resource of fixed capacity that is shared among many tasks. Each task consumes a fixed amount of the resource — its demand — while it is running, and the total demand of tasks running at any instant must not exceed the resource capacity.
For tasks with start , duration , end , and demand , sharing a resource of capacity , the cumulative constraint requires
The sum runs over all tasks that are active at time — those that have started but not yet ended. AddNoOverlap is the special case in which every and .
Example. Three tasks share a server of capacity :
| Task | start | duration | demand |
|---|---|---|---|
| A | 0 | 3 | 3 |
| B | 1 | 2 | 1 |
| C | 2 | 3 | 2 |
At all three tasks are active, with total demand . Since , this schedule violates the cumulative constraint.