ScheduleResult#
The result of every scheduling call. Project::solve returns it as Arc<ScheduleResult>; Project::preview, Project::analyze and schedule return it by value. LevelingResult::schedule holds one too.
Cycles, conflicts and a planner that didn't converge are reported in the result, not as an Err.
Declaration#
With the serde feature, ScheduleResult implements Serialize and Deserialize. Fields use camelCase, and None fields are left out. See Serialize results to JSON.
Fields#
| Field | Type | Description |
|---|---|---|
baseline_id |
Option<String> |
Token of the baseline this result produced or read. |
updates |
Vec<Mutation> |
New dates and fields of the tasks that changed. |
cycles |
Vec<Cycle> |
Dependency cycles found in the project. |
conflicts |
Vec<Conflict> |
Constraint and calendar conflicts the planner couldn't resolve. |
notes |
Vec<Note> |
Dropped input records and repairs made on import. |
converged |
bool |
true when the planner reached a stable schedule. |
analytics |
Option<Analytics> |
Critical path and slack. Some when requested. |
overallocations |
Option<Vec<ResourceOverallocation>> |
Resource overload windows. Some when the project has assignments. |
profile |
Option<LoadProfile> |
Per-bucket resource load. Only from preview with a profile query. |
baseline_id#
pub baseline_id:
An opaque token that names an accepted baseline.
solveandProject::level: alwaysSome, the baseline the call accepted.preview: alwaysSome, the baseline the preview read. Pass it to the nextprevieworapply.analyze(None, ..):Someonly on a solved project with no unsolved edits.analyze(Some(data), ..): alwaysNone.
The token changes whenever the accepted data changes. It isn't stable across runs, so don't compare tokens from separate runs or store them. See Project::solve for which calls check it.
updates#
pub updates:
One Mutation per reported task, each carrying only the fields that changed.
- By default the list is sparse: it holds only the tasks that changed.
solve(None)andProject::levelalso report each task touched by earlierapplycalls. - With
SolveOptions::include_unchanged, it also holds every unchanged scheduled task. previewreports updates relative to the baseline it read.- On a project with cycles, the list is empty unless
include_unchangedis set. analyzealways returns an empty list.
cycles#
pub cycles:
Every unique simple dependency cycle, one Cycle each. Empty when the project has no cycles. When it isn't empty, no task is moved.
conflicts#
pub conflicts:
Constraint violations and non-working-time placements, one Conflict each. analyze always returns an empty list.
notes#
pub notes:
Links, tasks and assignments dropped from the input, and fixes made under Validation::Repair, one Note each.
converged#
pub converged: bool
true when the planner reached a fixed point within SchedulingConfig::max_iterations. analyze always returns true.
analytics#
pub analytics:
Some when the call's AnalyticsOptions set slack or critical_path, otherwise None. Check Analytics::status before reading the data.
overallocations#
pub overallocations:
Some when the project has at least one assignment, None otherwise. Each entry lists one resource's overload windows; see OverallocationWindow.
profile#
pub profile:
Some only from preview when PreviewOptions::profile is set. It describes the load of the previewed dates. Every other call leaves it None. For the load of the accepted dates, call Project::load_profile.
Example#
use ;
Related#
Project::solve- the main call that returns itSolveOptions- controls what the result reportsError- what scheduling calls return instead of a result- Reading results - walks through every part of a result
- Serialize results to JSON - shows the result's JSON form