Skip to content

iamorishi/mining-simulator-py

Repository files navigation

Mining Simulator

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.

Python 3.12 Tested on Windows Tested on Ubuntu Tested on macOS

Project Design and Sample Results

Project Design and sample result files are available at:

  • ./docs/design.md -> System architecture documentation
  • ./docs/sample_results.md -> Sample results documentation

Getting Started

NOTE: The MiningSimulator python scripts was developed

  1. Create virtual enviroment and activate it.
python -m venv .venv
# For Windows based systems
.\.venv\Scripts\activate
  1. Install dependencies:
    pip install -r requirements.txt
  2. Run the simulation:
    python run_simulation.py
    At the end of simulation, results are saved to:
    • Station stats are saved to ./results/station_stats.json
    • Truck stats are saved to ./results/truck_stats.json

Unit Tests

Run unit tests (if needed):

pytest tests/

Python Project Information

  • 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

About

Mining Simulator developed in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages