Skip to content

Differentiable hybrid traffic simulation (SIGGRAPH ASIA 2022) : Traffic Simulators

License

Notifications You must be signed in to change notification settings

SonSang/diff-hybrid-traffic-sim

Repository files navigation

Differentiable Hybrid Traffic Simulation

This is the code repository for traffic simulation code that was used for our paper, Differentiable Hybrid Traffic Simulation, which was presented in SIGGRAPH ASIA 2022. In this repository, we provide scripts for solving inverse problems and intersection signal control problems in the paper. Please refer to the papers for more details.

alt text

Prerequisites

  • pytorch
  • numpy
  • scipy
  • tensorboard
  • tqdm
  • cma
  • highway-env
  • matplotlib

Inverse Problem

In this problem, we aim to find initial traffic states that end up in the final states which are given as input. The optimization graphs below (Macro, Micro, and Hybrid from left to right) show that our gradient based method converges to the better initial states much faster than the other gradient-free methods.

MacroMicro Hybrid

Users can run following commands to solve this problem.

python example/inverse/macro.py
python example/inverse/micro.py
python example/inverse/hybrid.py 

Intersection Signal Control Problem

In this problem, we aim to optimize the time allocations for traffic signals so that it can minimize the traffic flow that waits for the signal. For instance, we can optimize the traffic signals to reduce waiting traffic shown in left to right. Note that traffic rendered in red is reduced.

Before Before

The optimization graphs below (Macro, Micro, and Hybrid from left to right) show that our differentiable simulator can be used for this task successfully.

Macro Micro Hybrid

Users can run following commands to solve this problem.

bash ./run_itscp_macro.sh
bash ./run_itscp_micro.sh
bash ./run_itscp_hybrid.sh

Future Works

Currently, we are optimizing the code base to overcome the computational inefficiency of code presented here. Also, we are working on introducing more diverse set of traffic problems we can solve with our simulator. Pace car problem presented in our paper is also in the process of refactoring. Please keep eyes on our future works if you are interested in them!

Citation

If you refer to our paper, please consider citing our paper with:

@article{son2022differentiable,
  title={Differentiable hybrid traffic simulation},
  author={Son, Sanghyun and Qiao, Yi-Ling and Sewall, Jason and Lin, Ming C},
  journal={ACM Transactions on Graphics (TOG)},
  volume={41},
  number={6},
  pages={1--10},
  year={2022},
  publisher={ACM New York, NY, USA}
}

About

Differentiable hybrid traffic simulation (SIGGRAPH ASIA 2022) : Traffic Simulators

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published