LoadBucket#
One time bucket of a resource's load profile: when it starts, how much work is booked in it, and how much the resource can take. Buckets come in ResourceLoad::buckets, returned by Project::load_profile and Project::preview inside a LoadProfile.
Declaration#
With the serde feature, LoadBucket implements Serialize and Deserialize with camelCase field names. tasks is left out of the output when it's None.
Fields#
| Field | Type | Description |
|---|---|---|
start |
DateTime |
Start of the bucket. The bucket length is the profile's LoadProfile::basis. |
load |
f64 |
Work booked on the resource in this bucket, in assignment value units (1.0 = 100 %). |
capacity |
f64 |
What the resource can take in this bucket, in the same units. ResourceLoad::capacity_mode says where the value comes from. |
tasks |
Option<Vec<Id>> |
Ids of the tasks booked in the bucket, in input order. None unless the query's ProfileTasks asks for task lists; Some with an empty list when the bucket isn't listed. |
The bucket is overallocated when load > capacity.
Example#
use ;
Related#
ResourceLoad- holds the buckets of one resourceCapacityMode- decides the bucket'scapacityProfileTasks- decides whethertasksis filled- Resource Load - reads loads and task lists from buckets