Skip to content

@eightkk/vue-weave / core / computeEarnedValue

Function: computeEarnedValue() ​

computeEarnedValue(tasks, options): EarnedValueResult

Defined in: src/core/earnedValue.ts:227

Earned value management (EVM) for a plan at a status date: planned value (PV), earned value (EV) and actual cost (AC) per task, the variances and indices derived from them, their totals and, with options.series, the cumulative PV, EV and AC over time for an S-curve.

  • PV is the budget times the share of the task's planned interval [start, end) that lies before the status date. On a calendar it accrues over working time only; otherwise linearly over elapsed time. A task whose planned dates hold no working time of its calendar accrues over elapsed time. A milestone (end === start) accrues its whole budget at its start: its PV is the budget from statusDate >= start on.
  • EV is progress × budget and AC is actualCost, both as reported at the status date.
  • The indicators follow EarnedValueMetrics; a ratio with a zero denominator is undefined, never NaN or Infinity.

Totals sum BAC, PV, EV and AC over all tasks and derive the indicators from the sums, so a total SPI is the budget-weighted index and not the mean of the task indices. Pass only leaf tasks: a summary row's values are the rollup of its subtasks (rollupEarnedValue), and including both counts the budget twice.

In the series, PV is defined at every point. EV and AC are present at the points up to the status date, from each task's history records followed by its status-date values, as steps: a task contributes the values of its last record at or before the point, and 0 before its first record. A task without history therefore adds its EV and AC from the status date on. The status date is always a point when it lies inside the series range.

Throws a RangeError for a non-finite status date, a budget, actual cost or progress outside its range, planned dates that are not finite or end before they start, history records that are not finite, not increasing or after the status date, invalid calendar periods and invalid series options or a series of more than maxEarnedValuePoints points; and an Error for tasks that are not an array, an invalid or duplicate task or calendar ID, an unknown calendar, an invalid history and an unknown EAC method. The arguments are not modified.

Parameters ​

tasks ​

readonly EarnedValueTask[]

options ​

EarnedValueOptions

Returns ​

EarnedValueResult

Released under the MIT License.