How bsingh88/open-pit-mining-gym works
Mining-Gym benchmarks truck-dispatch policies in a configurable open-pit mine simulator. Users launch training or playback with an RL policy, or run classical schedulers for comparison; both approaches use the discrete-event simulation to model haulage and produce performance metrics. The RL path adapts the simulator through a Gymnasium environment, with observations and rewards exchanged through a CSV handshake. The graph preserves documented breakdown, rendering, and KPI capabilities. Some simulator internals are grouped because they share one source file; edges reflect excerpts, the source index, or README statements.
Main entry points: mGym_DesEnv.py Discrete-event simulator · mGym_GymEnv.py Gym environment · mGym_GymRun.py RL train and play · mgym_gui.py Experiment GUI
Components 13
User interfaces
- Experiment GUI
mgym_gui.py
RL workflow
- RL train and play
mGym_GymRun.py - Gym environment
mGym_GymEnv.py - PPO policy
mGym_GymRun.py
Mine simulation
- Discrete-event simulator
mGym_DesEnv.py - Haulage and resources
mGym_DesEnv.py - Equipment breakdowns
mGym_DesEnv.py - KPI tracking
mGym_DesEnv.py
Dispatch and configuration
- Classical run
mGym_DefSchdRun.py - Rule-based policies
scheduler.py - Config sampler
read_config.py - Mine settings
config_extend.txt
Other components
- Researcher
Connections 19
- Researcher → Experiment GUI: operates
README.md - Researcher → RL train and play: runs directly
README.md - Researcher → Classical run: runs directly
README.md - Experiment GUI → RL train and play: starts training or play
mgym_gui.py - Experiment GUI → Classical run: starts scheduler
mgym_gui.py - RL train and play → Gym environment: registers environment
mGym_GymRun.py - RL train and play → PPO policy: trains or loads
mGym_GymRun.py - PPO policy → Gym environment: acts in
- Gym environment → Discrete-event simulator: starts simulator
mGym_GymEnv.py - Gym environment → Discrete-event simulator: exchanges CSV actions and results
mGym_GymEnv.py - Classical run → Discrete-event simulator: runs episodes
mGym_DefSchdRun.py - Discrete-event simulator → Rule-based policies: uses dispatch policies
mGym_DesEnv.py - Discrete-event simulator → Config sampler: samples settings
mGym_DesEnv.py - Gym environment → Config sampler: samples settings
mGym_GymEnv.py - Config sampler → Mine settings: parses
- Discrete-event simulator → Haulage and resources: simulates haulage
README.md - Discrete-event simulator → Equipment breakdowns: models failures
README.md - Discrete-event simulator → KPI tracking: tracks performance
mGym_DesEnv.py - Haulage and resources → KPI tracking: supplies metrics
mGym_DesEnv.py