This repo contains the codebase for the paper titled "Learning Eco-Driving Strategies at Signalized Intersections" published in European Control Conference (ECC) 2022.
- The code has been tested on Ubuntu 20.04, and MacOS 13.0 Ventura.
- Follow instructions here to install Miniconda, likely
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
followed bybash Miniconda3-latest-Linux-x86_64.sh
. - Follow instructions in SUMO website to install SUMO simulator. Try running
sumo
in the terminal to confirm the successful installation. - Install PyTorch from pytorch.org.
- Make a clone of the repo.
- Set the environment variable 'F' to the code directory.
- Install dependencies
pip install -r requirements.txt
. - If you want to use fast libsumo instead of traci, set LIBSUMO os variable to true.
<agent_type>
is the type of agent that can be used to control CAVs. Available Options: RL, IDM
<res_dir>
is the result directory, which is where the model checkpoints, training logs, and training csv results will be saved. Add --test
as an argument to run the simulation in inference mode. E.g., python pexps/<script>.py --agent <agent_type> --res <res_dir> --test
.
python pexps/main.py --agent <agent_type> --res <res_dir>
If you are using this codebase for any purpose, please cite the following paper.
@INPROCEEDINGS{ecodrive2022jayawardana,
author={Jayawardana, Vindula and Wu, Cathy},
booktitle={2022 European Control Conference (ECC)},
title={Learning Eco-Driving Strategies at Signalized Intersections},
year={2022},
pages={383-390},
doi={10.23919/ECC55457.2022.9838000}}