Logistics and maintenance
Rank equipment that is likely to fail from its maintenance history, and replan supply routes when a road closes.
Two logistics jobs arrive as surprises and are not surprises in the data. A vehicle fails on the road after weeks of the same fault code. A flood closes the bridge the convoy was going to use, and the planner redraws the route on a paper map. This lab ranks equipment for a maintainer and recomputes a route for a planner. Both outputs are proposals. A person issues the work order and dispatches the convoy.
Maintenance records into a ranked list
You need the history the unit already keeps: each asset, its type, hours or kilometres, fault codes, parts fitted, and whether the next event was a breakdown or a scheduled service. Export a sample to the lab. Ten assets and a year of rows are enough to prove the path. Production uses the same columns from the maintenance system, via the data pipeline, not a one-off spreadsheet forever.
Build a feature row per asset per week:
| Feature | Why it is there |
|---|---|
| Hours since the last service of this type | Captures overdue scheduled work |
| Count of each fault code in the last 30 and 90 days | Repeating codes precede repeat failures |
| Days since that code was last cleared | A code cleared yesterday differs from one carried for a month |
| Parts replaced, by class | Shows what has already been tried |
| Asset type and year | Failure patterns differ by fleet |
Train a simple model that scores the chance of a breakdown in the next planning window. A gradient-boosted tree or a regularised linear model is enough and can be explained to a maintainer. On the sovereign platform, train it in an OpenShift AI workbench. GPU acceleration with RAPIDS matters when the fleet history no longer fits a comfortable CPU job, not for the sample.
The product is a list: asset, score, the three features that contributed most, and the rows those features came from. The maintainer reads the list and raises work orders in the maintenance system. The model does not ground an asset and does not order a part. Publish the score beside the evidence, because a score with no fault code attached will be ignored, correctly.
Judge the list on the sample before anyone uses it. Hold out the last months, and check whether the assets that did fail sit near the top of the list more often than a list sorted by "whichever vehicle is oldest." If they do not, the features or the labels are wrong. Fix that with the maintainers in the room. Do not quote a performance number from a different fleet.
Data quality dominates. Duplicate work orders, codes typed into the wrong column, and assets with two identities will outvote the model. Put those checks in the pipeline and fail the run when the row counts do not reconcile.
Replan when a road closes
Roads are a graph. Intersections are nodes. Segments carry a distance, a class (highway, track, ferry, dry-season only) and a state (open or closed). A closure is an update to state, from a flood report, a unit report or the disaster picture. It is not a new map.
# networkx is enough for a district graph
path = nx.shortest_path(
graph.subgraph(open_segments),
source="depot-dhaka",
target="unit-north",
weight="hours",
)
Weight by time, not only distance, so a ferry and a highway do not look the same. When the preferred path used a segment that is now closed, recompute and show the planner three things: the new path, the segments that differ from the previous order, and any drop that the new path cannot carry because of a bridge class or a vehicle width you stored on the segment. If no path remains, say so. Inventing a route across a closed segment is the failure mode that matters.
The planner confirms the path and only then is it written as a movement order in the logistics system, under their user id. The assistant's copy is marked draft. Log the closure that triggered the recompute and the path that was proposed, so a later review can see why the convoy moved.
Monsoon attributes belong on the segments: a road that is dry-season only is closed by the calendar and the rainfall report together. The training lab's terrain twin can supply the geometry. This lab supplies the state and the draft route.
Sample you can finish in a lab
Two files are enough to prove the path.
Maintenance. A CSV of work orders: asset id, date, hours, fault code, parts, and a column for whether a breakdown followed. Build the weekly feature row. Fit the model on the earlier months. Score the held-out months. Sit with a maintainer and read the top of the list aloud, including the fault codes. If they cannot see why an asset is there, the explanation is wrong even when the rank is lucky.
Routes. A handful of nodes and segments, one depot, one unit, one bridge. Compute the path. Set the bridge closed. Compute again. Show the segments that differ. Close every remaining path and confirm the result is "no path", not a route across the closed segment.
before: depot -> bridge-7 -> unit-north
after: depot -> ferry-2 -> unit-north
closed: bridge-7
The planner's confirmation is a row: their user id, the path, the closure id, the time. The movement order, if there is one, is written in the logistics system after that row exists. The lab stores the draft either way, so a drill can be replayed without pretending an order was issued.
Data checks before the model: one row per work order, asset ids that match the register, fault codes from the allowed list. Fail the run when those checks fail. A ranked list on dirty codes will be believed once and then ignored.
What the maintainer and the planner see
The screen is part of the lab. A score with no rows under it will not be used.
- Asset id, fleet and hours, so the row is recognisable.
- The score and the window it refers to ("breakdown risk in the next planning period").
- Three features that pushed it up, each linked to the work orders they came from.
- A comparison with the previous week's list, so a vehicle that jumped can be explained.
- For routes: the path, the segments that differ, the closure that caused the recompute, and
no pathwhen that is the truth.
Neither screen has a button that creates a work order or a movement order. Those buttons stay in the systems that already own them. The lab stores the draft and the user id of anyone who copied it across.
Re-fit the model when the fault-code list changes. A code added in the maintenance system and missing from the feature row becomes a silent blank, and the vehicle with that fault drops down the list.
Before anyone uses the list
- The held-out failures rank ahead of an age-only list, on this fleet's data.
- A closed segment never appears in a proposed path.
What's next
- Disaster response: the closures this router consumes during a flood or a cyclone.
- Data processing engine: Spark on the fleet history when it outgrows the workbench.
- Pilots and roadmap: success measures a maintainer and a planner will actually sign.