ResourceOverallocation#
The periods in which one resource is booked above its capacity. Read it from ScheduleResult.overallocations, which holds one entry per resource with at least one overallocated window. In a result from Project#level, each window also says why leveling left it in place.
Declaration#
;
The entry belongs to a result that's read-only by contract. Call deepClone() before changing it.
Fields#
Each field has a fluent setter of the same name, withX(value), that returns this entry. withWindows also takes any Collection<? extends OverallocationWindow>, such as List.of(...).
| Field | Type | Default | Description |
|---|---|---|---|
resource |
Id |
null |
The overallocated resource. Always set in a reported entry. |
windows |
Vec<OverallocationWindow> |
empty | Its overallocated windows. Never empty in a reported entry. |
Methods#
deepClone#
public ResourceOverallocation
Returns a copy with its own windows list and cloned OverallocationWindow entries.
Returns - a new ResourceOverallocation equal to this one.
copy#
public ResourceOverallocation
Returns a shallow copy. The copy shares the windows list with this entry.
Returns - a new ResourceOverallocation with the same field values.
equals, hashCode, toString#
public boolean
public int
public String
Inherited from ValueRecord. equals and hashCode compare resource and windows, the windows element by element. toString() lists the fields, e.g. ResourceOverallocation{resource=dev1, windows=[…]}.
OverallocationWindow#
A maximal run of consecutive buckets in which the resource's load exceeds its capacity. The bucket size is the result's basis: derived from SchedulingConfig.durationUnit, or LevelingOptions.basis in a result from level.
;
| Field | Type | Default | Description |
|---|---|---|---|
from |
Moment |
new Moment(0) |
Window start: the earliest working moment of the contending tasks in the first bucket. |
to |
Moment |
new Moment(0) |
Window end: the latest working moment of the contending tasks in the last bucket. Both edges are clipped to the booked assignment slices, not to the whole task. |
capacity |
double |
0.0 |
The resource's capacity, in assignment value units (1.0 = 100 %). See ResourceData.capacity. |
peak |
double |
0.0 |
The highest bucket load in the window. |
overload |
double |
0.0 |
Σ (load − capacity) over the window's buckets, in capacity × buckets. Per resource, the windows' overload adds up to the overload metric at the same basis. |
tasks |
Vec<Id> |
empty | The contending tasks, in input order. |
reason |
String |
null |
Why leveling left the window. Set only in results from level, null otherwise. One of pinned-constraint, fixed-task, completed, priority-1000, slack-exhausted, out-of-scope. When several apply, the first in this list wins. |
Each field has a withX(value) setter that returns this window. withTasks also takes any Collection<? extends Id>.
deepClone() returns a copy with its own tasks list. copy() returns a shallow copy that shares the tasks list. equals, hashCode and toString are inherited from ValueRecord and compare or list all seven fields, with tasks compared element by element.
The reasons are explained in Leveling resources.
Example#
Two fixed tasks overlap on dev1 on Tuesday. level can't move either of them, so the window stays and carries a reason.
;
;
The same window in the result of solve has reason set to null.
Related#
ScheduleResult- the result that lists overallocationsProject#level- resolving overallocationLoadProfile- per-bucket load and capacity- Resources and assignments - overallocation windows
- Leveling Resources - the reasons a window stays