SubterraX: TBM boring rates, spoil math, depth heat + pressure, Dijkstra routing, REFUSED bad plans!
152
Underground Transport & Tunneling Lab — by Darion Kellar
Educational underground transport lab in ONE pure-Python file: a TBM advance-rate model by rock type (penetration per revolution × RPM × utilisation), excavation volumes and spoil mass with a bulking factor, the depth environment (geothermal gradient, lithostatic pressure, ventilation cooling load), a deterministic station/shaft graph routed with Dijkstra over depth-penalised edges, a pod piston-effect and headway-capacity model, and safety interlocks that REFUSE plans — egress spacing, ventilation rate, rock temperature, water ingress — with the violated rule named.
Pure Python standard library. Zero dependencies. Zero network. Honest scope: this is a planning and learning simulator — it designs nothing buildable and guides no excavation. Real tunnels (Gotthard Base 57 km, Channel 50.5 km, Laerdal 24.5 km) are labelled published facts, never computed results, and every real-world construction / blasting / operation action is a permanent HOLD gate (14 total).
docker pull credkellar/subterrax:latest docker run --rm credkellar/subterrax:latest
The default command runs the full demo plus the built-in self-checks (CHECKS 64/64).
Run a specific command instead:
docker run --rm credkellar/subterrax:latest python3 main.py checks # CHECKS 64/64 docker run --rm credkellar/subterrax:latest python3 main.py boring # 10 km schedule per rock type docker run --rm credkellar/subterrax:latest python3 main.py spoil # excavation + spoil accounting docker run --rm credkellar/subterrax:latest python3 main.py depth # heat / pressure / cooling vs depth docker run --rm credkellar/subterrax:latest python3 main.py routing # fastest vs compliant route docker run --rm credkellar/subterrax:latest python3 main.py plans # interlock plan book docker run --rm credkellar/subterrax:latest python3 main.py holds # 14 HOLD gates
python:3.12-slimTransportation · Science · Developer tools
credkellar/subterrax:latestdocker pull credkellar/subterrax:latest