This project is a simulation miniproject developed for the Simulation and Optimization course. It implements various simulation techniques and optimization algorithms to solve practical problems.
SO-SIMULATION-MP/
├── assets/
│ ├── report.pdf # Project report document
│ ├── report_source_files.zip # Source files used to generate the report
│ └── simopt2425_SimProject.pdf # Project specification document
├── config/
│ ├── bus_config.yaml # Configuration template for bus maintenance simulation
│ └── projectile_config.yaml # Configuration template for projectile motion simulation
├── results/
│ ├── bus/ # Output directory for bus simulation results
│ │ └── [simulation outputs]
│ └── projectile/ # Output directory for projectile simulation results
│ └── [simulation outputs]
├── src/
│ ├── bus/ # Bus maintenance simulation module
│ │ ├── __init__.py # Package initialization
│ │ ├── config.py # Configuration loader and validator
│ │ ├── experiments.py # Experiment definitions and runners
│ │ ├── main.py # Entry point for bus simulation
│ │ ├── simulation.py # Core simulation logic
│ │ └── visualization.py # Result plotting and visualization
│ └── projectile/ # Projectile motion simulation module
│ ├── __init__.py # Package initialization
│ ├── analysis.py # Statistical analysis of simulation results
│ ├── config.py # Configuration loader and validator
│ ├── main.py # Entry point for projectile simulation
│ ├── simulation.py # Core simulation logic
│ └── visualization.py # Result plotting and visualization
├── .gitignore # Git ignore file
├── README.md # Project documentation
├── requirements.txt # Python dependencies
├── run.sh # Execution script
└── setup.sh # Environment setup script
The easiest way to set up the environment is to use the provided setup script:
# Clone the repository
git clone https://github.com/Sytuz/SO-Simulation-MP.git
cd SO-Simulation-MP
# Make the setup script executable
chmod +x setup.sh
# Run the setup script
./setup.shThe setup script will:
- Create a virtual environment
- Install all required dependencies
- Make the run script executable
If you prefer to set up manually:
# Clone the repository
git clone https://github.com/Sytuz/SO-Simulation-MP.git
cd SO-Simulation-MP
# Create a virtual environment
python3 -m venv venv
# Activate the virtual environment
# On Linux/macOS
source venv/bin/activate
# On Windows
# venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtThe project includes a convenient run script that automatically activates the virtual environment and executes the selected simulation:
# Make the run script executable (should be done by setup.sh)
#chmod +x run.sh
# Run the bus maintenance simulation
./run.sh bus [additional arguments]
# or
./run.sh ex1 [additional arguments]
# Run the projectile motion simulation
./run.sh projectile [additional arguments]
# or
./run.sh ex2 [additional arguments]If you prefer to run the Python scripts directly:
# Activate the virtual environment first
source venv/bin/activate # On Linux/macOS
# venv\Scripts\activate # On Windows
# Run the bus maintenance simulation
python src/bus/main.py [additional arguments]
# Run the projectile motion simulation
python src/projectile/main.py [additional arguments]|
Alexandre Ribeiro 108122 |
Miguel Pinto 107449 |