What RUL is
Remaining Useful Life is the predicted number of operating hours before a UV lamp is expected to fail or require replacement. It is stored in thebwts_iot_predictions table and surfaced in the Predictive Maintenance tab.
A lamp with an RUL of 0 should be treated as imminently failed. A lamp with an RUL of 2,800 hours has most of its rated 3,000-hour life still ahead of it.
The prediction record schema
Each prediction record contains:How predictions are generated
Predictions are pre-computed by a separate ML pipeline — not by the dashboard. The pipeline analyses each lamp’s runtime history and efficiency degradation curve and writes prediction records to the database. The dashboard reads results via/api/predictions.
Dashboard deduplication logic
The/api/predictions endpoint may return multiple prediction records per lamp (one per prediction run). The Predictive Maintenance tab applies this deduplication:
- Fetch up to 100 prediction records
- Filter to
component_type === 'UV_LAMP' - For each
component_id, keep only the record with the most recenttimestamp - Sort remaining records by
failure_probabilitydescending (most at-risk first)
Failure probability thresholds
Lamp lifetime reference
When
current_state.runtime_hours approaches 2,500h, failure probability rises sharply on the degradation curve. Lamps beyond 2,500h with failure_probability ≥ 0.5 should be treated as high priority for replacement.
Cost implication
The Predictive Maintenance tab’s cost comparison (5,000 predictive annually) is based on the following logic:- Reactive: Emergency lamp replacements require expedited parts, unplanned dry-dock time, and elevated labour costs
- Predictive: Scheduling replacements based on RUL during planned port calls allows bulk procurement and standard crew schedules
References
- Health Score Calculation — how lamp health feeds into the composite score
- Predictive Maintenance Tab — where this data is displayed
/api/predictions— the endpoint serving this data