FocusOverload#
Resource overload measured only where one focus task runs. Project::evaluate returns one FocusOverload per task in EvaluateOptions::focus, in that order, as Overload::focus. It isn't built by hand.
Declaration#
With the serde feature (cargo add plen-core --features serde), FocusOverload also implements Serialize and Deserialize, with field names in camelCase.
Fields#
| Field | Type | Description |
|---|---|---|
task |
Id |
The focus task, as given in EvaluateOptions::focus. |
resources |
Option<Vec<ResourceOverload>> |
Overload per resource, counted only over the buckets that intersect the task's [start, end) in this stage. None when the task isn't in this stage, for example when the candidate removes it. |
resources#
- Lists every resource with non-zero overload inside the task's span, in this stage or in the baseline. The order matches
Overload::resources. - The span is the task's span in this stage, so it moves with the task's dates. A zero-span milestone covers no bucket and has no overload.
- In the scheduled stage, the values show the overload around the task. In the leveled stage, they show the overload leveling couldn't remove there.
Example#
Score a candidate that gives task 2 to a resource already busy on task 1, and print the overload inside task 2's span.
use ;
Related#
Overload- the stage overload that contains itEvaluateOptions-focusselects the tasks it is reported forTaskFinish- the finish of the same focus task- Evaluating Alternatives - how focus overload is read per candidate