The goal of this project is to develop a simulation for a space mining operation. This simulation will manage and track the efficiency of mining trucks and unload stations over a continuous 72-hour operation.
Project Design and sample result files are available at:
./docs/design.md-> System architecture documentation./docs/sample_results.md-> Sample results documentation
NOTE: The MiningSimulator python scripts was developed
- Create virtual enviroment and activate it.
python -m venv .venv
# For Windows based systems
.\.venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt
- Run the simulation:
At the end of simulation, results are saved to:
python run_simulation.py
- Station stats are saved to
./results/station_stats.json - Truck stats are saved to
./results/truck_stats.json
- Station stats are saved to
Run unit tests (if needed):
pytest tests/- Mining Simulator is developed using Python 3.12.7
- Flake8 is used for linting and Black is used for formatting.
- Pytest is used for unit and integration tests.
- Project structure:
mining-simulator/
│-- mining_sim/ # Core simulation logic and components
│ │-- nodes/ # Data nodes for simulation
│ │-- enums/ # Enum values used for simulation
| |-- utility/ # Utility and analysis scripts used for simulation
│ │-- __init__.py # Module initialization
│-- tests/ # Unit and integration tests
│ │-- test_truck.py # Unit Tests for MiningTruck nodes
│ │-- test_unloadstation.py # Tests for UnloadStation nodes
| |-- test_simulator.py # Unit Tests for MiningSimulator
| |-- test_utility_functions.py # Unit Tests for utility functions
│
│-- docs/ # Documentation and guides
| │-- design.md # System architecture documentation
│ │-- sample_results.md # Sample results from Simulation
|
|-- .github/workflows/
| |--run-sim-tests.yaml # Github Actions YAML
│-- run_simulation.py # Script to run the simulation
│-- conftest.py # Pytest conftest file
│-- .flake8 # Flake8 linting configuration
|-- requirements.txt # Python (pip) requirements file
│-- pyproject.toml # Project dependencies and configurations
│-- README.md # Project overview and setup instructions