[Canonical page](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/overallocation/>)
[Full documentation index](<https://docs.dhtmlx.com/planning-engine/llms.txt>)


# 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`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/schedule-result.md>) and from the [`LevelingResult`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-level.md#levelingresult>) of [`JsonProject#level`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-level.md>).

```ts
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`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/common.md#id>) | Id of the overallocated resource. |
| `windows` | [`object`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/overallocation.md#window-fields>)`[]` | 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](<https://docs.dhtmlx.com/planning-engine/wasm/wire-format.md#dates>).

### 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](<https://docs.dhtmlx.com/planning-engine/wasm/resources-and-assignment/resources-and-assignments.md#overallocation-windows>).

| Field | Type | Description |
|---|---|---|
| `from` | [`DateValue`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/common.md#datevalue>) | Start of the window, clipped to the contending tasks' working time and to their assignment slices. |
| `to` | [`DateValue`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/common.md#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`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/common.md#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](<https://docs.dhtmlx.com/planning-engine/wasm/resources-and-assignment/leveling-resources.md#reading-the-result>). |

## Used by

- [`ScheduleResult`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/schedule-result.md>) `overallocations`, returned by [`schedule`](<https://docs.dhtmlx.com/planning-engine/wasm/api/schedule.md>), [`JsonProject#solve`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-solve.md>), [`JsonProject#preview`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-preview.md>) and [`JsonProject#analyze`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-analyze.md>)
- [`LevelingResult`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-level.md#levelingresult>) `overallocations`, returned by [`JsonProject#level`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-level.md>)

## Example

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

```json
{
  "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"
    }
  ]
}
```

## Related

- [`ScheduleResult`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/schedule-result.md>) - where `overallocations` appears
- [`JsonProject.level`](<https://docs.dhtmlx.com/planning-engine/wasm/api/project-level.md>) - resolves overallocation
- [`LoadProfile`](<https://docs.dhtmlx.com/planning-engine/wasm/api/types/load-profile.md>) - per-bucket load and capacity
- [Resources and assignments](<https://docs.dhtmlx.com/planning-engine/wasm/resources-and-assignment/resources-and-assignments.md>) - how windows are formed
- [Leveling Resources](<https://docs.dhtmlx.com/planning-engine/wasm/resources-and-assignment/leveling-resources.md>) - why a window stays after leveling
