ES
← Back to Portfolio
Mining & Optimization July 2026

DispatchLab — Truck-to-Shovel Dispatch Bench for Open-Pit Mining

An in-browser truck-to-shovel dispatch bench: a deterministic discrete-event simulation of an open pit where you pick a case and a dispatch policy and watch tonnes, match factor and queues form. Nine policies (heuristic, OR-Hungarian, and learned) compete against a closed-form capacity oracle, over cases generated by minehaulsim, the author's own Apache-2.0 PyPI package. Honest by design: the distilled Monte-Carlo rollout is a published null result, winning 0 of 8 seeds under cycle-time uncertainty.

Policies
9 compared: 5 heuristics + Hungarian joint assignment (OR) + 2 learned (RWR, behaviour-cloning) + distilled Monte-Carlo rollout
Engine
Deterministic next-event-time-advance DES: integer-tick clock, seeded common random numbers, rimpull/grade kinematics, road traffic, match factor, 1x1 capacity oracle
Cases
8 synthetic (anchored to published Cat 793F figures) + 12 structure-real samples (10 from minehaulsim, 2 OpenMines configs desensitized from the Huolinhe coal mine)
Learned tier (ONNX)
Imitation of the sim decisions: RWR 0.771, BC-best 0.740, rollout 0.841 accuracy; trained on 141,149 logged decisions; best imitated policy is Hungarian
Null result
Certainty-equivalent rollout: win false, 0 of 8 eval seeds under uncertainty; only the deterministic >= base bound holds (C03 +0.42%, C05 +1.16%, C08 +1.64%)
Compute
100% in-browser: TypeScript DES + three.js 3D pit + onnxruntime-web; 60 TS + 8 Python tests; static GitHub Pages, no backend
DispatchLab — Truck-to-Shovel Dispatch Bench for Open-Pit Mining — Architecture
#mining-optimization #dispatch #discrete-event-simulation #open-pit #operations-research #hungarian-algorithm #imitation-learning #monte-carlo-rollout #onnx #mining

Business Context

Truck dispatch is one of the highest-leverage software decisions in an open pit: production fleet management systems (Modular DISPATCH, Wenco, MineStar) exist precisely because reassigning trucks in real time moves measurable extra tonnes off the same capital. But the market is noisy with claims, and a mine cannot A/B-test a policy on live production. A deterministic simulation bench with common random numbers lets you compare policies on identical stochastic conditions and score every one against a capacity ceiling, so the comparison is fair. The value is a testbed that shows how far each recipe closes the gap to the oracle, and that is disciplined enough to publish when a sophisticated policy does not beat a simple one.

Strategic Value

DispatchLab demonstrates a fair, common-random-numbers comparison of nine dispatch policies on one deterministic simulation, scored against a closed-form capacity oracle, and it leans on honesty rather than a winning-policy headline. Its centerpiece is a published null result: the distilled certainty-equivalent Monte-Carlo rollout wins 0 of 8 evaluation seeds under cycle-time uncertainty, and only the exact deterministic policy-improvement bound (rollout at least matches the base, with measured gains of +0.42 to +1.64 percent tonnes) holds. There is zero real fleet data: the cases are generated by minehaulsim, the author own Apache-2.0 PyPI package, plus two OpenMines configs desensitized from a real coal mine, and the learned policies are imitation, not reinforcement learning. Best policy reaches 94.9 to 96.0 percent of the oracle on the symmetric cases and only 47.6 percent on the hardest. Publishing where a clever policy fails to beat a simple one is the reusable pattern.

The Challenge

In an open pit, a fleet of haul trucks feeds a set of shovels, and the dispatch decision (which truck goes to which shovel next) sets how much ore moves in a shift. Get it wrong and trucks queue at one shovel while another starves; get it right and the same fleet moves more. The hard part is that the decision is made under uncertainty (cycle times vary, roads bunch, shovels stall) and the field is full of competing recipes, from simple heuristics to operations-research assignment to reinforcement learning, with little honest comparison of when each actually helps. It is easy to claim a clever policy wins; it is harder to test it fairly and report when it does not.

Our Approach

DispatchLab is a browser bench built on a real next-event-time-advance discrete-event simulation of an open pit: an integer-tick clock with a (time, priority, seq) event key, seeded named random streams for common random numbers across policies, rimpull and grade-resistance truck kinematics, a road-network topology with traffic (bunching, safety distance, no overtaking, two-way crossing), match factor, and a closed-form capacity oracle to score against. You pick a case and a dispatch policy and watch tonnes, match factor and queues form. Nine policies compete: five heuristics (fixed, greedy earliest-completion, shortest-wait, max-trucks and max-shovels criteria), an operations-research tier (Hungarian joint truck-to-shovel-slot assignment), two learned policies (an MLP scorer trained by imitation and a behaviour-cloning of the best policy, both ONNX), and a distilled Monte-Carlo rollout MLP whose true bounded rollout also runs live on demand in an inspector panel, never on autoplay. A replay and counterfactual lane re-simulates generated cycle logs under an alternative policy. Everything is client-side, static on GitHub Pages.

Key Performance Indicators

KPIBaselineResultImpact
Learned policy, reported honestlyA claimed win for a sophisticated policyPublished NULL result: the Monte-Carlo rollout wins 0 of 8 eval seeds under cycle-time uncertaintyOnly the exact deterministic policy-improvement bound holds (+0.42 to +1.64% tonnes)
Fair comparisonPolicies tested on different conditions9 policies on one DES with common random numbers, scored vs a closed-form capacity oracleBest policy reaches 94.9-96.0% of the oracle (symmetric cases), 47.6% on the hardest
Learned by imitation, not RLAn RL-win claimImitation of the sim decisions on 141,149 logged decisions; rollout distillation reaches 0.841 accuracyStated as imitation learning; true RL is backlog, not claimed
Data provenanceNeeds a proprietary FMS dispatch logZero real fleet data: 10 samples from minehaulsim (author Apache-2.0 PyPI package) + 2 desensitized OpenMines configsReproducible; no real operation log used or claimed

Architecture

dispatchlab pipeline

dispatchlab pipeline

A fair bench for the truck-to-shovel decision

DispatchLab is an in-browser truck-to-shovel dispatch bench: a deterministic discrete-event simulation of an open pit where you pick a case and a dispatch policy and watch tonnes, match factor and queues form. Nine policies compete against a closed-form capacity oracle, on identical stochastic conditions via common random numbers. Live at dispatchlab.fasl-work.com, part of the Faena mining-analytics hub.

Nine policies, one engine

Five heuristics (fixed, greedy earliest-completion, shortest-wait, the max-trucks and the provably-opposite max-shovels criteria), an operations-research tier (Hungarian joint truck-to-shovel-slot assignment), two learned policies (an MLP scorer and a behaviour-cloning of the best policy, both ONNX), and a distilled Monte-Carlo rollout whose true bounded rollout also runs live on demand in an inspector panel, never on autoplay. The engine underneath is real: a next-event-time-advance DES with an integer-tick clock, seeded common random numbers, rimpull and grade-resistance kinematics, road traffic (bunching, safety distance, no overtaking) and a capacity oracle to score against.

The data, stated plainly

There is zero real fleet data: no ground-truthed open-pit dispatch log is public. The eight synthetic cases are anchored to published Cat 793F figures. The twelve “real” samples are structure-real generated cycle logs: ten from minehaulsim, the author own Apache-2.0 DES package published on PyPI, plus two OpenMines configs desensitized from the Huolinhe coal mine (only the config traces to the mine, not the rows). No calibration to any real operation is claimed, and the coal-versus-copper domain-transfer caveat is recorded.

The honest null result

The learned policies are imitation (a scorer and a behaviour-cloning), not reinforcement learning; true RL is backlog. Trained on 141,149 logged decisions, the rollout distillation reaches 0.841 imitation accuracy. The headline finding is a published null: the certainty-equivalent Monte-Carlo rollout wins 0 of 8 evaluation seeds under cycle-time uncertainty, because the base policies are already within a few percent of the oracle. What is validated is the exact deterministic policy-improvement bound: the rollout at least matches the base, with measured deterministic gains of +0.42 to +1.64 percent tonnes. Best policy reaches 94.9 to 96.0 percent of the oracle on the symmetric cases and 47.6 percent on the hardest. Counterfactual tonnes are model estimates, not a generator re-run.

Live demo · Source on GitHub

Technology Stack

TypeScript React Vite three.js ONNX onnxruntime-web PyTorch uPlot KaTeX

In action

A short tour of the live app — the real interface, recorded from the deployed site.

DispatchLab — Truck-to-Shovel Dispatch Bench for Open-Pit Mining in action

Application Screenshots

DispatchLab — Truck-to-Shovel Dispatch Bench for Open-Pit Mining
DispatchLab — Truck-to-Shovel Dispatch Bench for Open-Pit Mining