Overallocation#

One resource whose load goes over its capacity, and the windows where that happens. A result's overallocations array holds one entry per overallocated resource. You get it from ScheduleResult and from the LevelingResult of JsonProject#level.

interface Overallocation {
  resource: Id;
  windows?: {
    from: DateValue;
    to: DateValue;
    capacity: number;
    peak: number;
    overload: number;
    tasks: Id[];
    reason?: string;
  }[];
}

Fields#

Field Type Description
resource Id Id of the overallocated resource.
windows object[] The resource's overallocation windows, in date order. Resources with no window aren't listed in overallocations, so in practice this field is always a non-empty array. The field is omitted, not sent as [], when a resource has no windows.

Entries come in resource input order. Field names are camelCase and dates use the output format from Wire format.

Window fields#

A window is a run of contiguous overallocated buckets of one resource. Non-working time between buckets splits a window in two. For how buckets and load are counted, see Overallocation windows.

Field Type Description
from DateValue Start of the window, clipped to the contending tasks' working time and to their assignment slices.
to DateValue End of the window, clipped the same way as from.
capacity number The resource's capacity, in assignment value units (1 = 100 %).
peak number The highest bucket load in the window.
overload number Sum of load − capacity over the window's buckets, in capacity × buckets.
tasks Id[] Ids of the contending tasks, in input order.
reason string Present only in a level result: why leveling left the window unresolved. One of "pinned-constraint", "fixed-task", "completed", "priority-1000", "slack-exhausted", "out-of-scope". The values are explained in Reading the result.

Used by#

Example#

Two tasks share resource dev (capacity 1) on a Friday and the following Monday. The weekend splits the overallocation into two windows:

{
  "resource": "dev",
  "windows": [
    {
      "capacity": 1,
      "from": "2026-08-14 08:00",
      "overload": 1,
      "peak": 2,
      "tasks": ["api", "ui"],
      "to": "2026-08-14 17:00"
    },
    {
      "capacity": 1,
      "from": "2026-08-17 08:00",
      "overload": 1,
      "peak": 2,
      "tasks": ["api", "ui"],
      "to": "2026-08-17 17:00"
    }
  ]
}