English
@eightkk/vue-weave / core / toPlanningDiagnostics
Function: toPlanningDiagnostics()
toPlanningDiagnostics(
result,load?):PlanningDiagnostic[]
Defined in: src/core/scheduleDiagnostics.ts:54
Turn the failures, cycles, manual conflicts, overloads and unresolved tasks of a scheduleTasks or levelResources result into one list. A success lists its manual conflicts first (in manualConflicts order), then unresolved tasks, then overloads. load (for example from calculateResourceLoad) supplies the overloads and then replaces the result's own overloads; only segments with overload > 0 become diagnostics. A failure yields only its own diagnostics, never the overloads of an earlier plan. The arguments are not modified.
Parameters
result
{ code: "cycle"; cycles: readonly ScheduleCycle[]; ok: false; } | { code: "infeasible"; constraints: readonly ScheduleConstraintName[]; dependencyIds: readonly string[]; ok: false; taskId: string; } | ScheduleSuccess | LevelResourcesSuccess
Type Literal
{ code: "infeasible"; constraints: readonly ScheduleConstraintName[]; dependencyIds: readonly string[]; ok: false; taskId: string; }
code
"infeasible"
constraints
readonly ScheduleConstraintName[]
Binding bounds of the task that conflict, in a fixed order.
dependencyIds
readonly string[]
Binding dependencies of the task that conflict, in input order.
ok
false
taskId
string
load?
readonly ResourceLoadSegment[]