LevelingResult#
The outcome of a leveling run: the leveled schedule and how many rounds proposed a correction. Project::level returns it.
Declaration#
Arc is std::sync::Arc. Field access goes through it, so result.schedule.updates works directly.
Fields#
| Field | Type | Description |
|---|---|---|
schedule |
Arc<ScheduleResult> |
The schedule level accepted as the new baseline. |
rounds |
u32 |
Number of leveling rounds that proposed a correction. |
schedule#
pub schedule:
The final solved state after leveling. Its baseline_id is the accepted baseline.
Its updates are diffed against the state the level call started from. Entries include the leveling_delay and pauses values leveling set.
For the meaning of every field, see ScheduleResult.
rounds#
pub rounds: u32
Counts only rounds that proposed a delay or a pause. It's 0 when nothing needed leveling, and when the project is cyclic: then schedule is the initial solve's result, with its cycle diagnostics, and no delay or pause is edited.
rounds is separate from the planner's iteration count. Planner convergence is schedule.converged.
Serialization#
With the serde feature, LevelingResult implements Serialize and Deserialize. The fields of schedule are flattened into the top-level object, next to rounds:
Example#
use ;
For how leveling picks tasks and sizes delays, see Leveling resources.
Related#
Project::level- returns this resultLevelingOptions- options of the run that produced itOverallocationWindow- windows leveling left inschedule, with a reason- Leveling Resources - reads delays, pauses and leftover windows from the result
- Serialize results to JSON - shows the flattened JSON form