日本語
@eightkk/vue-weave / core / rescheduleFromStatusDate
Function: rescheduleFromStatusDate()
rescheduleFromStatusDate(
input,statusDate,progress):ScheduleResult
Defined in: src/core/statusDate.ts:44
Reschedule a plan whose tasks have reported progress at a status date. The current dates are those of scheduleTasks(input); when that fails, its failure is returned. Progress is the completed share of each task's working duration, from 0 to 1, and a task without an entry has progress 0. The rules:
- Progress 1: the task keeps its current dates, even after the status date.
- Progress between 0 and 1: the done work is
progress × durationrounded down to whole quanta. It stays where it is, from the current start; when that would carry it past the status date (the task is ahead of plan or started early), it is placed instead so that it ends at the status date. The remaining work is scheduled at or after the status date on the task's calendar, so the task is split when time remains between the two parts; the result reports both parts inwork. A task whose done work rounds down to zero, and a milestone, is treated as not started. - Progress 0: the task starts no earlier than the status date (in addition to its own bounds).
A started or finished task is pinned at its start: startNoEarlierThan, startNoLaterThan, fixedStart and mode no longer apply, because its start has happened, and neither do incoming FS and SS dependencies, which bound the start. Incoming FF and SF dependencies, with their lag, and the task's own finishNoEarlierThan still bound the finish of a partly done task: when its remaining work would finish too early, the remaining work resumes later, and the gap after the done work grows. A finished task ignores every incoming dependency. Finish bounds and outgoing dependencies still apply, so successors follow the new finish. A kept link that cannot be met, for example because the required finish lies after a finishNoLaterThan, the deadline or the horizon, makes the plan infeasible, and the failure names the link. Unstarted tasks keep every bound and dependency; a fixedStart before the status date then makes the plan infeasible, which is returned as such. Returns the result of scheduling the adjusted plan; the dependencies that no longer apply are left out of it, so they never appear in criticalDependencyIds. The input is not modified.
Manual tasks keep their manual dates whatever their progress, and inactive tasks stay inactive; progress entries of both are accepted and have no effect. Summary tasks roll up from their subtasks; their progress entries are accepted and have no effect. A started subtask no longer inherits the start bounds of its summaries (links into a summary and its startNoEarlierThan), for the same reason as its own.
Throws a RangeError for a status date that is not finite, outside input.range or not aligned with the quantum, a progress value outside 0..1 or a done share that does not fit before the status date, and an Error for a progress that is not a Map and a progress entry of an unknown task.
Parameters
input
statusDate
number
progress
ReadonlyMap<string, number>