Hassankashi / Intelligent-Intersection

The SUMO simulation platform is used to realize the traditional traffic lights, intelligent traffic lights and intelligent traffic intersections.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intersection Management via V2I

The SUMO is used to simulate the traditional traffic lights, adaptive traffic lights, and the proposed V2I strategy. You can reproduce these results on your computer .

Install

Dependencies

You need dependencies below.

  • Python3
  • Plexe: Plexe added elements related to platooning to facilitate the construction of the Platooning scene. Plexe-sumo also provides a Python API that can be called in Python as a module, making programming easier. Further details on Plexe can be found on the Plexe website.

Install SUMO

The system we use is Ubuntu. If you use Ubuntu, you can install it directly as follows. If not, check out the SUMO. SUMO is already in Ubuntu's official repo and can be installed directly using the following command:

1. sudo apt-get install sumo sumo-tools sumo-doc

If you need a up-to-date ubuntu version, you can add:

1. sudo add-apt-repository ppa:sumo/stable
2. sudo apt-get update
3. sudo apt-get install sumo sumo-tools sumo-doc

We can use SUMO to simulate many actual traffic scenarios. SUMO is not a single program, but contains multiple packages/applications. It mainly includes the following applications:

SUMO application

You can go to SUMO-Application to learn the details.

Within each policy folder, there are the corresponding network information file.

cfg-file

If you want to learn the meaning of each file, or if you're interested in editing the network yourself, you can check out the SUMO tutorial.

Run the program

Once SUMO and python3 are installed, you can run the program. For examples, enter the folder 'traditional_traffic' and use python3 to run the main program.

1. cd traditional_traffic
2. python3 runner.py

This program will run the results in Simulation1; If you want to get the results in Simulation2, then you need to run the corresponding program in the folder ‘uneven’; If you want to get the result in Simulation3, then you need to modify the parameter ‘ADD_PLATOON_STEP’ in the main program to 300, 900 or 1200.

Simulation 1: Same traffic density on each lane

Vehicles are generated every 6 seconds with probability of 0.3 at the starting point of each lane.

Traditional phase-fixed light

traditional_1

Adaptive traffic light

adaptive_1

The proposed V2I strategy

v2i_1

Simulation 2: Unbalanced traffic density

We set the number of vehicles coming from the north-south road much greater than that from the east-west road. In the simulation, a vehicle is generated for every 6 seconds with probability of 0.3 in the north-south direction, while with probability of 0.03 in east-west direction.

Traditional phase-fixed light

traditional_2

Adaptive traffic light

adaptive_2

The proposed V2I strategy

v2i_2

Simulation 3: The influence of traffic density

In this part, we examine the influence of traffic density on the three IM strategies. The time intervals for generating a vehicle are chosen as 3 seconds, 6 seconds, 9 seconds, and 12 seconds, all with probability of 0.3.

3 seconds

Traditional phase-fixed light

traditional_3s

adaptive_3s

The proposed V2I strategy

v2i_3s

9 seconds

Traditional phase-fixed light

traditional_9s

Adaptive traffic light

adaptive_9s

The proposed V2I strategy

v2i_9s

12 seconds

Traditional phase-fixed light

traditional_12s

Adaptive traffic light

adaptive_12s

The proposed V2I strategy

v2i_12s

Data analysis

When you start to run SUMO, right-click on the SUMO interface and select ‘show parameter’ to view the current vehicle related information parameters. Parameter

We have added statements in the main program so that the result can generate an XML file named'xx_output_file.xml' that contains all vehicle information. Analyzing this XML file, you can get the average delay time and its variance.

You can perform data analysis according to the reference program given in this article. Different files only need to replace the file name in the program.

About the specific content of ‘xml.etree.ElementTree’, if you are interested, you can go to the relevant website to learn.

About

The SUMO simulation platform is used to realize the traditional traffic lights, intelligent traffic lights and intelligent traffic intersections.


Languages

Language:Python 69.2%Language:Jupyter Notebook 30.8%