Lifecycle And faults
Define wear progression and named failure modes that modify runtime truth over time.
Model long-horizon wear across operating hours. Add named failures triggered by lifecycle stage, process conditions, or manual injection.
Technical details
Define lifecycle stages on the model
lifecycle:
stages:
- name: healthy
duration_hours: [4000, 7000]
effects: {}
- name: degraded
duration_hours: [1000, 2000]
effects:
vibration_baseline: { multiplier: 1.4 }
bearing_temperature: { offset: 8 }
- name: critical
duration_hours: [300, 700]
effects:
vibration_baseline: { multiplier: 2.0 }
bearing_temperature: { offset: 18 }Lifecycle stages are an ordered list. The model author decides the names and count.
Define faults as named runtime behavior
faults:
- name: cavitation
trigger:
condition: "discharge_pressure < 2.5"
probability: 0.01
effects:
vibration_radial: { spike: 1.8, duration_ticks: 180 }
flow_rate: { multiplier: 0.75, duration_ticks: 180 }
- name: bearing_wear
trigger:
lifecycle_stage: degraded
probability: 0.004
effects:
bearing_temperature: { offset: 6, duration_ticks: 600 }Fault conditions are evaluated against previous-tick member values. The one-tick delay lets faults cascade without extra configuration.
Inject or clear a fault at runtime
Inject one fault.
miravo inject pump-001 cavitationClear the same fault.
miravo inject pump-001 cavitation --clearTrigger one fault.
curl -s http://127.0.0.1:8080/commands \
-H 'content-type: application/json' \
-d '{"type":"triggerFault","instanceId":"pump-001","fault":"cavitation"}'Clear the same fault.
curl -s http://127.0.0.1:8080/commands \
-H 'content-type: application/json' \
-d '{"type":"clearFault","instanceId":"pump-001","fault":"cavitation"}'Reference
| Field or binding | Notes |
|---|---|
duration_hours | Tuple [min, max] used to randomize the stage length per instance |
| Lifecycle effect fields | multiplier, offset |
| Fault trigger fields | lifecycle_stage, condition, probability |
| Fault effect fields | spike, multiplier, offset, duration_ticks, onset_ticks, recovery_ticks |
| Fault state bindings | fault-active, fault-count, active-fault-code, health-state |
| Lifecycle binding | lifecycle-stage |
Related pages
Twin models
Asset definitions with wear and faults.
Generators
Process values before fault effects.
CLI ⭢ miravo inject
Trigger and clear faults on a running instance.
AC induction motor
One built-in fault surface.
Was this page useful?
Last updated on
Miravo