/AttentionLight

Official code for "Knowledge intensive state design for traffic signal control"

Primary LanguagePython

1. Introduction

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}
}

2. Rquirements

python3.6,tensorflow=2.4, cityflow, pandas, numpy

cityflow needs a linux environment, and we run the code on Manjaro Linux.

3. Quick start

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

3.1 Evaluate the results

Change the folder name in summary.py as yours, and run:

python summary.py

4. Code details

4.1、structure

  • models: contains all the models used in our article.
  • utils: contains all the methods to simulate and train the models.

4.2、Reference

The code is modified from Efficient_XLight. The Max-Pressure is created by ourselves, based on MaxPressure .