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.

Step 1 of 157%

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 1,2,,n1, 2, \ldots, n with start sis_i, duration did_i, end ei=si+die_i = s_i + d_i, and demand rir_i, sharing a resource of capacity CC, the cumulative constraint requires

i:sit<eiriCfor every time t.\sum_{i \,:\, s_i \le t < e_i} r_i \le C \qquad \text{for every time } t.

The sum runs over all tasks that are active at time tt — those that have started but not yet ended. AddNoOverlap is the special case in which every ri=1r_i = 1 and C=1C = 1.

Example. Three tasks share a server of capacity 55:

Taskstartdurationdemand
A033
B121
C232

At t=2t=2 all three tasks are active, with total demand 3+1+2=63 + 1 + 2 = 6. Since 6>56 > 5, this schedule violates the cumulative constraint.

navigate · Enter open · Esc close · ⌘K/Ctrl K toggle