LoadProfile#
Per-bucket load and capacity for each requested resource over a date range. Project#loadProfile returns one for the solved baseline. Project#preview puts one in ScheduleResult.profile when its options carry a profile query.
Declaration#
;
Each field has a fluent withX(value) setter, and resources also has a withResources(java.util.Collection<? extends ResourceLoad>) overload. ValueRecord gives the class structural equals / hashCode over all fields and a readable toString().
Fields#
| Field | Type | Description |
|---|---|---|
basis |
Basis |
Bucket size the profile was built with: the query's basis, or the one derived from the project's duration unit when the query leaves it null. |
resources |
Vec<ResourceLoad> |
One entry per requested resource, in input order. All resources when ProfileQuery.resources is null. |
Methods#
deepClone#
public LoadProfile
Returns a copy with a new resources list and new ResourceLoad and LoadBucket objects.
copy#
public LoadProfile
Returns a shallow copy: resources is shared with the original.
ResourceLoad#
The load of one resource over the profile's range.
| Field | Type | Description |
|---|---|---|
resource |
Id |
Resource id. |
capacityMode |
CapacityMode |
How capacity is spread over the buckets. |
buckets |
Vec<LoadBucket> |
Every bucket whose start lies in [from, to) of the query, in time order, including buckets with no load. |
CapacityMode#
How a resource's capacity is placed in the buckets of a ResourceLoad.
| Value | Description |
|---|---|
CALENDAR |
The resource has a calendar in CalendarMode.RESOURCE and the project has useCalendars on. Buckets with working time of that calendar get the resource's capacity, all others get 0. |
FLAT |
Every bucket gets the resource's capacity: the resource has no calendar, the calendar mode is task-based, or useCalendars is off. |
LoadBucket#
Load and capacity of one resource in one bucket.
| Field | Type | Description |
|---|---|---|
start |
Moment |
Start of the bucket. The bucket is one basis long. |
load |
double |
Booked load, in assignment value units (1.0 = 100 %). |
capacity |
double |
Capacity in the same units. The bucket is overallocated when load > capacity. |
tasks |
Vec<Id> |
Ids of the tasks booked in the bucket, in input order. Set by ProfileQuery.tasks: null with ProfileTasks.NONE; with OVER, the ids in overallocated buckets and an empty list elsewhere; with ALL, the ids in every bucket (empty where nothing is booked). |
For how load is booked into buckets, see Resource load.
Example#
Read a daily profile with task lists for one resource that works on two tasks at once.
;
;
Related#
Project#loadProfile- the call that returns a profileProfileQuery- the range, resources and bucket sizeResourceOverallocation- overallocated windows in a schedule result- Resource load - querying and reading a load profile