Skip to content

@eightkk/vue-weave / core / rescheduleFromActuals

Function: rescheduleFromActuals() ​

rescheduleFromActuals(input, statusDate, actuals): RescheduleFromActualsResult

Defined in: src/core/actuals.ts:151

Reschedule a plan from recorded actual intervals at a status date. Unlike rescheduleFromStatusDate, which derives done work from a progress share and the plan, the actual intervals are facts: they are never moved, clipped to a calendar or merged with the forecast. Only the remaining work is scheduled, by the same rules as scheduleTasks.

  • Not started (no entry, or no intervals): the task starts no earlier than the status date, in addition to its own bounds and links. An explicit remainingWork replaces its duration.
  • In progress (intervals and remaining work): the remaining work starts no earlier than the status date or the last actual end, whichever is later, on the task's calendar and pauses. As in rescheduleFromStatusDate, its start has happened: its startNoEarlierThan, startNoLaterThan, fixedStart, mode, incoming FS and SS links and the start bounds inherited from its summaries no longer apply. Incoming FF and SF links, finish bounds and the deadline still bind the finish, so the remaining work may resume later. Outgoing links use the first actual start (SS, SF) and the forecast finish (FS, FF).
  • Finished (finished, or no remaining work): the task spans its actuals and ignores every incoming link and bound except the project deadline, like a manual task. Successors follow its last actual end.

Manual tasks keep their manual dates; their actuals are reported and checked but do not move them. Summary tasks roll up the actual and forecast dates of their subtasks. Entries of inactive tasks are validated and ignored.

Contradictions are returned as diagnostics: overlapping intervals of one task, intervals after the status date (the forecast then starts after them), intervals outside working time (kept as recorded) and a finished task with positive remainingWork (its remainingWork is scheduled). A forecast that cannot meet a bound or link is returned as the failure in schedule and as a diagnostic, with the actuals still in tasks. Throws a RangeError for a status date that is not finite, aligned or inside input.range, for an actual interval that is not finite, aligned with the horizon and quantum, of positive length or inside input.range (the scheduler's messages for the same defects in its input, followed by (actual interval of task <id>)), and for an invalid remainingWork; and an Error for actuals that are not a Map, an unknown or summary task, an entry without an intervals array, an invalid finished flag and a finished task without intervals. The arguments are not modified.

Parameters ​

input ​

ScheduleInput

statusDate ​

number

actuals ​

ReadonlyMap<string, TaskActuals>

Returns ​

RescheduleFromActualsResult

Released under the MIT License.