Cargo-Pro — residue-aware loading for coal rail

TL;DR

We track each rail carriage with RFID, capture gross + tare at the power plant, compute actual residue, and tell loaders exactly how much to top up on the next cycle. A lightweight GCP web app + a couple of Cloud Functions + MS SQL (RFID reads) + MongoDB (app data) tie it together. Result: +12% effective loading year-over-year, with fewer overloads and far fewer underloads.


Introduction

At the mine, loaders used to “go by feel.” The legal cap is 90t per carriage. In reality, carriages come back dirty — 2t, 5t, sometimes 7t of leftover coal—so fixed presets don’t work. Cargo-Pro closes that loop: we measure what actually left the plant (gross vs. tare), match it to the returning carriage via RFID, and give the loader a target number that lands just under 90t, residue included.

What made it hard

Architecture at a glance

High-level pieces: 1. RFID ingestion (MS SQL): Antennas log scans at weighbridges. 2. Weighbridge data: At the plant, each carriage is weighed twice: gross (loaded), then tare (after deload). 3. Cloud functions (GCP): Match scans → compute residue → calculate next-load target. 4. App Engine web app: Admin tools, worker UI, and performance dashboards. 5. MongoDB: Application truth (carriages, cycles, workers). 6. Sync jobs: Push/pull between MS SQL (raw scans) and MongoDB (normalized domain data).

Flow, in practice

  1. Outbound: A loaded carriage is weighed at the plant (RFID #1 + gross).
  2. Deload: Coal is emptied to the electric plant.
  3. Post-deload: The same carriage is weighed again (RFID #2 + tare). Net shipped = gross − tare.
  4. Return: The empty carriage travels ~300km back to the mine.
  5. Identify: Loader scans the carriage QR or types a 4-digit code (RFID is auto if available).
  6. Guidance: The app shows “Load X t”—a residue-aware target that aims just under 90t.
  7. Load: Worker fills to target; carriage heads back to the plant.
  8. Repeat: Each cycle refines the next recommendation.

How the math works (plain language)

Data model (simplified)

Worker & admin UX

Reliability, ops, and cost

Edge cases we handle

Results that mattered