Design a Railcar Wheel Defect Detection Platform
Collect per-wheel readings from trackside detectors, raise urgent alerts for dangerous wheels within minutes, track each wheel's history, and predict which wheels will need replacement soon.
Problem statement
A railroad wants to detect damaged train wheels before they fail. Design the system that collects wheel data, analyzes it, and predicts which wheels are wearing out.
For this exercise, assume detectors are installed beside the track at about 3,000 sites. When a train passes a site, the site measures every wheel, for example the impact force from a flat spot and the wheel's temperature, and also reads each car's identification tag.
A site sends one batch per train pass: the car IDs in order and, for each wheel, its car, axle and side plus the measurements. Sites sometimes lose their network connection; they keep up to 24 hours of batches locally and send them when the connection returns, and they may send a batch more than once.
A missing or unreadable tag leaves some readings without a known car.
For this exercise, also assume a reading over a critical limit means the wheel is dangerous now: the railroad's operations desk must get an alert within 2 minutes so the train can be slowed or stopped, and someone must acknowledge it. Below that limit, a wheel's readings over weeks show whether it is getting worse.
Maintenance planners want a daily list of the wheels most likely to need replacement within 30 days, and the inspection results they record afterwards (defect found or not, wheel replaced) are the outcomes used to judge and improve the predictions.
Track signals, dispatching trains, building the detector hardware and the planners' scheduling tool are outside scope.
What to build
- Detector sites upload per-wheel readings for each train pass; for this exercise, late and repeated uploads are accepted without counting a reading twice, and each reading is linked to its car, axle and side when the tag was read.
- For this exercise, a reading over a critical limit alerts the operations desk within 2 minutes, once per wheel per train pass, and the alert stays open until someone acknowledges it.
- For this exercise, engineers can see a wheel's readings across sites and time and see whether it is getting worse.
- For this exercise, planners get a daily ranked list of wheels likely to need replacement within 30 days, and recorded inspection results are used to measure and improve it.
At scale
- For this exercise, assume about 3,000 detector sites, each passed by about 30 trains a day, and about 800 wheels per train, which is roughly 72 million wheel readings a day.
- For this exercise, assume uploads average about 830 wheel readings per second (roughly 1,000), with peaks of about 10,000 per second when sites that were offline reconnect.
- For this exercise, assume each reading is about 1 KB, readings are kept for 5 years for trend analysis and training, and only flagged readings also keep a raw signal of about 50 KB.
- For this exercise, assume about 1.5 million cars, each with 8 wheels, so the nightly job scores about 12 million wheels, while planners can inspect only about 500 wheels a day.