Skip to content

Simulated life-cycle cost (LCC) as a first-class output of the availability sim #54

Description

@derrynknife

Make life-cycle cost a simulated output of RepairableRBD's discrete-event simulation: attach cost to the events the DES already produces and return an LCC distribution with confidence intervals (reusing the existing seed + ConfidenceInterval machinery), plus a cost breakdown.

The principle — why this, and not a logistics sim

Cost rides on events the model genuinely owns — a failure, a repair, a spell of downtime, a replacement — all of which fall straight out of the fitted failure-time and restoration-time distributions the simulation already generates faithfully. So costing needs no model of the maintenance organisation (crews, dispatch, queues, spare pools) — which is exactly the part that can't be validated (the modeller is structurally disconnected from the people who do the work) and where detailed RAM/LSA logistics simulations tend to produce precise-but-unfounded numbers.

Downtime realism is handled the right way for this split: fit the restoration-time distribution from observed downtime (it already embeds logistics delay as it actually occurred) in surpyval and let the sim consume it — more valid than mechanistically simulating a dispatch process.

Scope

  • Per-event cost accumulation across the simulation: corrective-repair cost (per failure), downtime / lost-production cost (per unit time down — per component and/or system), and replacement cost. Costs are per-component inputs, constant or drawn from a distribution.
  • LifeCycleCostResult (typed): total LCC mean + confidence interval, breakdown by category (corrective / preventive / downtime / replacement) and by component, and cost-rate over the horizon. Reuses numpy_seed and the ConfidenceInterval / AvailabilityResult pattern.
  • Scheduled preventive-maintenance / inspection events in the sim (the enabling piece) — so LCC can price the preventive-vs-corrective trade-off and locate a cost-optimal system PM interval. This is a policy the user sets (defensible), not an organisation being modelled. (May split into its own issue — it introduces a new event type with renewal / age-reset semantics.)
  • Cross-check: with no preventive policy and constant costs, simulated LCC must match the closed-form cost-rate × horizon from the component maintenance layer (Decide the fate of the vestigial Repairable class #33) on simple systems.

Explicitly out of scope (deliberate)

  • Crews / repair resources / queuing / dispatch, and spare-pool logistics DES. Low validity (the modeller–doer disconnect); realism is captured via the fitted restoration distribution instead. If spares are ever wanted, do the analytical marginal-analysis stocking version — not a DES — and as a separate, optional add-on.

Relationships

Estimate

Effort: M (cost-on-existing-events + LifeCycleCostResult) → L if the scheduled-PM / inspection event type is included · Value: High

The cost engine is a clean extension of the existing event-queue DES, defensible precisely because it only prices events the model already owns — it stays on the right side of the validity line by construction. LCC is the headline output RAM users actually want. Slots into the 0.9.0 "Maintenance & Optimization" bucket as its objective function.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions