Author: Hsien-wen "Steven" Deng
This is a starter kit for Simulation Urban MObility (SUMO) with Traffic Control Interface (TraCI). In this case, we build a scenario referenced our testbed in Perimeter Rd., Clemson, SC. 10 vehicles are generated in this scenario and all vehicles are following a speed limit of 35 mph and perform a time headway of 1 second. Besides, 3 traffic controllers (signals) are deployed in 3 intersections and all controllers are fixed time.
SUMO is a traffic engineering simulator to simulate different traffics in macroscopic or microscopic view.
TraCI is a python-based platform to engage interactions (control, feedback) between user's scripts and SUMO.
- Python 3.8
- Python IDE, recommend Pyzo
- Download SUMO
- Install SUMO
- Place downloaded SUMO_Sample folder in installed SUMO directory:
../sumo/
- Run SUMO_Base.py by Pyzo or by command:
python SUMO_Base.py
- From SUMO GUI, tune the delay to max (1000ms)
- Hit the Run button in SUMO GUI
Here are the tips for expanding your own application by TraCI
- Get vehicles number
- Get vehicles states (positions, speeds)
- Change vehicles states (speeds)
- Get traffic controllers phase
- Get traffic controllers timer