Xiang Fu and George Jiang
This repository accompanies the paper "Decentralized Neural Traffic Orchestration" at CDS DS 340 Fall 2024, at Boston University.
- Create and activate a new conda environment (recommended):
conda create -n maestro python=3.8
conda activate maestro
- Install the package and dependencies:
# Install the package in development mode
pip install -e .
# Install required dependencies
pip install -r requirements.txt
- Python 3.8+
- PyTorch
- SUMO (Simulation of Urban MObility)
- Other dependencies listed in
requirements.txt
This project supports GPU acceleration for training deep learning models. To use GPU:
- Ensure you have CUDA-compatible GPU
- Install CUDA toolkit and cuDNN
- PyTorch will automatically detect and use available GPU
We use Weights & Biases (WandB) for experiment tracking and visualization. To use WandB:
- Install wandb:
pip install wandb
- Login to your WandB account:
wandb login
- Set your project name in the configuration files
- Experiments will automatically log metrics and hyperparameters
The dataset is organized in the data/
directory, containing:
- Traffic scenarios
- Network configurations
- Traffic demand patterns
data/
├── scenarios/ # Different traffic network scenarios
├── demand/ # Traffic demand patterns
└── configs/ # Configuration files for different setups
Model checkpoints are stored in the experiments/models/
directory. To use a checkpoint:
- Navigate to the checkpoint directory
- Load the model using the appropriate configuration file
- Checkpoints contain model weights and training state
Training experiments are organized in the experiments/train/
directory. To run an experiment:
- Configure your experiment parameters in the config files
- Execute the training script with your chosen configuration
- Monitor progress through WandB dashboard
Evaluation scripts are in the experiments/evaluate/
directory:
- Select the model checkpoint to evaluate
- Choose the evaluation scenario
- Run the evaluation script
- Use scripts in the
tools/
directory for data analysis - Generate performance metrics and statistical comparisons
- Export results in various formats (CSV, JSON)
The project includes tools for:
- Traffic flow visualization
- Performance metrics plotting
- Learning curves and training statistics
- Model checkpoints:
{model_name}_{scenario}_{timestamp}.pth
- Configuration files:
{scenario}_{config_type}.yaml
- Results:
{experiment_name}_{date}_{metrics}.csv
- Based on PyTorch for deep learning components
- Uses SUMO's TraCI interface for traffic simulation
- Modular architecture for easy extension and modification
- Supports multiple traffic signal control algorithms
MIT License