Conflict#
A scheduling conflict found while placing tasks. You don't build it yourself. Read it from ScheduleResult::conflicts, which lists every conflict of the run. A conflict is data in the result, not an error: the run still succeeds and returns dates.
Declaration#
With the serde feature, it also implements Serialize and Deserialize; see Serialization.
Variants#
| Variant | When it occurs |
|---|---|
ConstraintViolation |
A task's constraint placed it at a date its driving dependency link doesn't allow. The constraint wins, and the task keeps the constraint's date. Reported only when SchedulingConfig::apply_constraints is true. |
CalendarNonWorking |
A summary moved as one block and a descendant task landed on non-working time of its calendar. Reported only when SchedulingConfig::strict_calendar is true. |
ConstraintViolation#
| Field | Type | Description |
|---|---|---|
task |
Id |
The task or summary whose constraint won. |
constraint |
ConstraintType |
The constraint that placed the task: the task's own, or a dated constraint inherited from a summary. |
violation |
Violation |
Which bound the link contradicts. EarliestStart and LatestStart compare start dates, EarliestEnd and LatestEnd compare end dates. |
required |
DateTime |
The date the constraint gave the task. It's the date the task got in the result. |
actual |
DateTime |
The date the driving link would have given the task. |
CalendarNonWorking#
| Field | Type | Description |
|---|---|---|
task |
Id |
The descendant task that landed on non-working time. |
proposed |
DateTime |
The task's new start (its new end in a backward-scheduled project), on non-working time. |
snapped |
DateTime |
The date the task keeps. Currently it's always equal to proposed: the task isn't moved to working time. |
Serialization#
With the serde feature, a Conflict serializes as an object tagged by kind. The variant name is written in kebab-case, field names in camelCase:
Example#
build must start no later than Tuesday, but its predecessor design ends on Wednesday. The constraint wins, and the result reports the conflict.
use ;
Related#
ScheduleResult- lists the conflicts of a runViolation- the bound a constraint conflict breaksSchedulingConfig- holds the flags that enable each conflict kind- Links, constraints and summaries - triggers and reads a constraint conflict
- Reading results - handles conflicts in a result