Difference between revisions of "Intersection Optimalization"
(One intermediate revision by the same user not shown) | |||
Line 13: | Line 13: | ||
This simulation portrays the intersection of Anglická and Bělehradská / Škrétova. During afternoon, there are traffic jams on only one street leading to the intersection - on Anglická street. | This simulation portrays the intersection of Anglická and Bělehradská / Škrétova. During afternoon, there are traffic jams on only one street leading to the intersection - on Anglická street. | ||
− | The intersection is displayed on the picture below. There are two ways from which cars approach the intersection. Vast majority of the cars leave the intersection on Anglická street. For the cars arriving from Bělehradská street, this means turning left, crossing the tram rail. | + | The intersection is displayed on the picture below (source: Google Maps). There are two ways from which cars approach the intersection. Vast majority of the cars leave the intersection on Anglická street. For the cars arriving from Bělehradská street, this means turning left, crossing the tram rail. |
The intersection is directed by traffic lights. | The intersection is directed by traffic lights. | ||
Line 93: | Line 93: | ||
=Conclusion= | =Conclusion= | ||
+ | Based on the results I obtained from the different settings, the following setting seems to reduce cars' waiting times to minimum: | ||
+ | * tram lights - '''60s''' | ||
+ | * car lights for Bělehradská street - '''5s''' | ||
+ | * car lights for Anglická street - '''15s''' | ||
+ | |||
+ | These results show, that the intersection is not set optimally regarding the waiting times of the cars. | ||
=Code= | =Code= | ||
+ | [[File:Xvatj00_simulation.nlogo]] |
Latest revision as of 19:52, 29 January 2018
Project Name: Intersection Optimalization
Class: 4IT496 – Simulation of Systems
Author: Jana Vataščinová
Model type: Agent-Based Simulation
Software used: NetLogo
Contents
Problem definition
This simulation portrays the intersection of Anglická and Bělehradská / Škrétova. During afternoon, there are traffic jams on only one street leading to the intersection - on Anglická street.
The intersection is displayed on the picture below (source: Google Maps). There are two ways from which cars approach the intersection. Vast majority of the cars leave the intersection on Anglická street. For the cars arriving from Bělehradská street, this means turning left, crossing the tram rail.
The intersection is directed by traffic lights.
Goal of the Simulation
The goal of the simulation is to portray the current situation of the intersection (with the actual current lights' setting and number of incoming cars), and to find out and optimal lights' setting that would minimize the waiting time of the cars.
The fact that the cars are waiting only on one of the incoming streets points to the opinion, that the current setting is not optimal.
Data
I obtained data about the current intersection situation by observing the intersection on Friday from 2.30pm till 3.30pm. This is one of the times when cars are waiting from one side only.
The times of the lights' setting and number of incoming cars were averaged to get regular times that repeat.
Method
NetLogo 6.2. was used for this simulation. This software is suitable for multi-agent system, such as this simulation. Also, it provides visualization and quick results.
Model
Blueprint and Limitations
For the purpose of this simulation, I simplified the intersection. NetLogo world size was set to {{-15,..,15},{-15,..,15}} and the intersection is placed in the middle, as you can see in the following picture.
Black color displays the roads where cars drive. Blue color signifies tram rail. The arrows point to the direction in which cars or trams go.
- Vast majority of the cars coming from Bělehradská street turn left to Anglická street. The number of cars continuing straight to Škrétova street is so small, that all the cars in the simulation turn left to Anglická street.
- Similarly as mentioned above, almost none of the cars coming from Anglická street turn right to Škrétova street. As visible on the map of the intersection, there is an extra line solely for cars turning right. But for the purpose of this simulation, this line has no importance, and thus was omitted.
- Because the roads are full, the cars don't change lines. Thus, this simulation doesn't allow the cars to change lines.
- The light are set and are not dependent on whether there are any pedestrians or not. Therefore, pedestrians were not included in the simulation as they are not important for it's purpose.
- There is limited space for the cars going to Anglická street. This led to the choice that the time of green lights from both sides should stay the same - this means that I kept the time of green light for trams (= red lights for all cars) the unchanged.
Agents
Cars
Cars are coming from the beginnning of Bělehradská and Anglická street. They are using roads that are displayed in black color in this simulation. According to my research, one third of all the cars coming to the intersection are coming from Anglická street. Cars will stop, if any other car or pedestrians are in front of it.
- speed – the distance agent travels in one tick
- waiting – Is the car waiting on the green light? (boolean)
- start-time – time (ticks) when agent was spawned
Trams
Trams drive on tram rails that are of blue color in this simulation. There are two tram rail, one for each direction.
- speed – the distance agent travels in one tick
- start-time - time (ticks) when agent was spawned
Lights
Traffic lights are of two types - for cars (2) and for trams. When the tram lights are green, the car light are red. After that, car lights for Bělehradská street are greet (and other lights red), then car lights for Anglická street are green (and other lights red).
Then the cycle repeats.
Results
I let each simulation case run for approximately 36 000 ticks (1 second = 5 ticks). For each setting, I run the simulation multiple times and the times provided below are the average from all the runs.
The times for tram lights are the same throughout all the simulated cases, thus the average waiting time of the trams stays very similar. It is of no importance for us, but I will list this information as well. For each case, I will provide the average waiting times of cars and of trams (in seconds and minutes).
Reality-Based Case
The simulation with the settings based on reality provides results that correspond with the reality I experience on the actual street (mainly driving from Anglická street). As you can see on the following picture, which was captured during one of the simulation runs, there are cars accumulated on Anglická street, while there are just few cars on Bělehradská street.
- Average waiting time of cars: 590 seconds, 9.8 minutes
- Average waiting time of trams: 16.4 seconds
In this case, the setting is as follows (lights showing green light):
- tram lights - 60s
- car lights for Bělehradská street - 10s
- car lights for Anglická street - 10s
Other Cases
As I mentioned above, I kept the tram lights setting the same in all cases. I worked only with the car lights times, while the sum of the green light times of both car lights stays the same (20s).
The table below shows the results of all the cases I measured. Once the average waiting time of cars of the next setting started increasing, it wasn't necessary to continue onto the next case.
For all the cases, tram lights are green for 60s. The table shows the times (in seconds) of green light for Bělehradská street, followed by green light for Anglická street.
Conclusion
Based on the results I obtained from the different settings, the following setting seems to reduce cars' waiting times to minimum:
- tram lights - 60s
- car lights for Bělehradská street - 5s
- car lights for Anglická street - 15s
These results show, that the intersection is not set optimally regarding the waiting times of the cars.