Offical code for article AttentionLight: Rethinking queue length and attention mechanism for traffic signal control.
If you use our method, please cite our article.
@misc{https://doi.org/10.48550/arxiv.2201.00006,
title = {AttentionLight: Rethinking queue length and attention mechanism for traffic signal control},
author = {Zhang, Liang and Wu, Qiang and Deng, Jianming},
publisher = {arXiv},
year = {2022},
copyright = {arXiv.org perpetual, non-exclusive license}
}python3.6,tensorflow=2.4, cityflow, pandas, numpy
cityflow needs a linux environment, and we run the code on Manjaro Linux.
For the method in our article, run:
python run_max_ql.pypython run_ql_dqn.pypython run_ql_frap.pypython run_ql_gat.pyFor the baseline methods,
- Fixed-Time
python run_fixedtime.py- Max-Pressure
python run_maxpressure.py- PressLight
python run_presslight.py- MPLight
python run_mplight.py- FRAP
python run_frap.py- Colight
python run_colight.pyChange the folder name in summary.py as yours, and run:
python summary.pymodels: contains all the models used in our article.utils: contains all the methods to simulate and train the models.
The code is modified from Efficient_XLight.
The Max-Pressure is created by ourselves, based on MaxPressure .