Reason#
What decided a task's date in the last planner run. A Reason arrives in Mutation::reason, which is filled only when the call ran with reasons: true in SolveOptions or PreviewOptions.
Declaration#
Variants#
| Variant | Description |
|---|---|
Asap { link_id, source_id } |
Forward scheduling. The incoming link link_id from the predecessor source_id sets the task's start. |
Alap { link_id, target_id } |
Backward scheduling (schedule_from_end). The outgoing link link_id to the successor target_id sets the task's end. |
SummaryTranslation { summary_id } |
The task moved together with its summary summary_id, which moves as a block. |
Constraint |
A constraint set the date: it pulled the task away from the date its links or preferred date would give, or the task has a Mso / Mfo constraint. |
Preferred |
No link or constraint moved the task. It sits at its own preferred date. |
All ids are the ids from the input data (Id). When several links give the same date, Asap and Alap name the first matching one.
Serialization#
With the serde feature, Reason serializes as an object tagged by kind, with kebab-case variant names and camelCase field names:
See Serialize results to JSON.
Example#
use ;
Related#
Mutation- holds the reason of each updated taskSolveOptions- turns reasons on forsolvePreviewOptions- turns reasons on forpreview- Reading results - reads reasons from a result
- Links, constraints and summaries - shows the links and constraints reasons point to