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.py
python run_ql_dqn.py
python run_ql_frap.py
python run_ql_gat.py
For 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.py
Change the folder name in summary.py
as yours, and run:
python summary.py
models
: 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 .