01 — Quick Reference

How usage is counted

  • Corrected value = raw reading + the offsets of the corrections in effect at the time of the reading. A reset / rollover / meter replacement's offset is value before − value after.
  • A reading on a cumulative meter that goes backwards without a correction is kept as suspect and changes nothing (meter, forecasts). Recording the correction afterwards recalculates the readings from its effective time and clears the suspect flag.

How a component's life is counted

A transmission has no meter of its own. While it is fitted, its exposure is the unit's meter reading now (or at removal) minus the reading at fitting, for each limit's metric; calendar days are counted between the dates. Life is counted since the last rebuild, and every limit has its own figure.

  • Where the unit's hours come from. The Register's events carry no usage. The date and the main SMU come from Work's work.component_installed / work.component_removed; Lifecycle records the SMU as a reading and each span takes its start and end from the readings at its dates.
  • Fitted (from the Asset Register): Lifecycle asks the Register for the unit's primary maintenance group at the fitting date and finds the life model for that group and the component's SMCS (the unit's group, else its parent group, and so on). If the Register cannot answer, or there is no model, nothing starts and the event is acknowledged as unmatched. Otherwise a span starts in the component's active cycle, with the model recorded on it.
  • Removed: the span ends and keeps its exposure; the forecast becomes ended.
  • Refitted (any unit): the next span joins the same cycle, so nothing is lost.
  • Rebuilt (asset.component_rebuilt): the cycle closes and the next opens with the life factor of the new rebuild number (0.9, 0.85 …); consumed life starts at zero.
  • Readings and corrections: the exposure is stored when a reading, a correction or a fitting arrives. A reading that arrives after a span was closed (or opened) recalculates every span on that unit that starts or ends on or after its date, so the order in which a reading and the fitting message arrive does not matter.

Which reading counts

  • Last known reading. A span starts and ends on the most recent accepted reading at or before its date. If there is none, the last known reading is used; nothing is interpolated.
  • A technician's reading (source manual or work order) that differs from the history by more than a day's use is recorded as a manual adjustment correction from its date forward, and publishes lifecycle.exposure_revised. The meter's own readings are never overwritten.

Forecast statuses

The headline follows the governing limit: the worst status, then the earliest predicted date.

Status When
normal remaining life above the limit's warning threshold
watch at or below the warning threshold (publishes lifecycle.usage_threshold_crossed)
due at or below the critical threshold (publishes lifecycle.life_due)
overdue no life left (publishes lifecycle.life_due)
ended the component is not fitted; consumed life frozen
unknown no reading to count against

The predicted limit date uses the meter's daily rate over the last 30 days (calendar days: one a day).

Numbers

Record Number How
Forecast LF-00004 … assigned on save
Meter TRUCK-21-SMU … asset and metric; assigned when a reading creates the meter
Life model TX-793 … entered

Everyday tasks

To… Do this
See what is close to its life Life → Life Forecast, filter status watch / due.
Explain a meter jump Usage → Usage Reading (raw vs corrected), then Meter Correction.
Follow a component through trucks Life → Asset Life Assignment, filter by asset.
See identifiers or every column Column-set switcher on a list → All fields.

Running it

python server/run.py asset_lifecycle                        # alone, http://localhost:5095
python networks/work_supply/network.py start            # with the whole Work & Supply network