本文へ移動

@eightkk/vue-weave / core / calculateResourceLoad

Function: calculateResourceLoad() ​

calculateResourceLoad(range, tasks, resources, assignments, options?): ResourceLoadSegment[]

Defined in: src/core/resourceLoad.ts:99

Compare scheduled work to capacity over half-open intervals. With options.inactiveTaskIds, the assignments of those tasks take no capacity, so the full assignment list of a plan with inactive tasks can be passed unchanged.

Segments split wherever the load or the capacity changes, including at the bounds of capacityPeriods, so each segment's capacity and overload hold over its whole interval. An assignment with workOffset or workDuration adds load only during its part of the task's work (see assignmentWorkPeriods).

Parameters ​

range ​

TimeRange

tasks ​

readonly Pick<ScheduledTask, "id" | "work">[]

resources ​

readonly ResourceCapacity[]

assignments ​

readonly ResourceAssignment[]

options? ​

ResourceLoadOptions = {}

Returns ​

ResourceLoadSegment[]

MIT ライセンスで公開しています。