Optimization-of-traffic-light-as-the-junction

General

  • This is the repository of my final project B.Sc in Software engineer for year 2016-2017
  • The project takes place in the jerusalem College of Engineering, in Ramat Bet HaKerem, Jerusalem, Israel.
  • The project is scheduled between October 2016 untill July 2017
  • This repository will include all the codes and informations about the progress of the project, from the zero stage to the presentation.

Staff

Presentor: Ori Amir

Ori

Academic advisor: Dr. Guy Leshem


Abstract

As part of the requirements for the BSc Software Engineering degree in Azrieli – College of Engineering Jerusalem, I will implement a final project for the company SHEMER ENERGY LTD. This company develop a “smart city” and want to create smart system to control on traffic in the city by automatically system and without control center. Today, at most junctions where traffic lights are exist, a traffic light program is fitted to the junction condition and changes according to the hours or according to the predetermined events according to the specific junction, but the main problem is that the traffic light program is not automatically updated when there is an extreme state at the junction. The goal of the project is to streamline the traffic lights by replacing the traffic light program with a program that matches traffic conditions at the junction and in fact minimizes waiting time at the junction. As part of the project, two main directions were examined in order to do so:

  1. Choosing a static program from preset programs: The idea is to prepare a certain amount of traffic lights plans, run them all on the current situation at the junction and take the program will give the lowest total delay time at the junction.
  2. Preparation of a dynamic program according to delays at the junction: The idea is not to choose from pre-prepared plans, but to prepare a real-time traffic plan, which is according to the total delay times at the intersection. In order to simulate an junction I wrote a simulation program.

The simulation simulates movement at the intersection for a certain time according to the plans of pre-prepared traffic volumes, and changes the light program according to the situation at the intersection.

In the end, the goal of the simulation is to show that when we change the traffic light program to a program suitable for traffic volume at the junction, we will see an improvement in the time delay at the junction and in the number of vehicles that will cross the junction.


How to run

For run this project you must have:

  • Operating System - Windows or macOS.
  • MATLAB software version 2016b or higher.

Steps:

  1. Clone the branch 'master' to your computer.
  2. Import the files into MATLAB.
  3. Go to gui1.m file in your files list.
  4. On navigation bar click editor -> play.

Demo

The main screen of this simulation is:

You need to choose 3 different parameters for running:

  • Plan: There is 3 different plans , every plan contain a different traffic volumes for simulation running.
  • Time: Time for running the simulation (It's not the real time , just time we imagine a junction).
  • Simulation type: You have 2 options here:
    Static: to choose a traffic light program from a prepared programs.
    Dynamic: to create a dynamic traffic light program by the delay times at the junction .

After click on 'Start' button the simulation start to run :

The information on screen contains:
  • Number of round and how long the simulation run until now.
  • Current traffic light program.
  • Mark for vehicles:
    Red: How many total vehicles arrival to specific lane on last 3.5 minutes. Green: How many vehicles cross the junction with traffic light program does change on last 3.5 minutes. Blue: How many vehicles cross the junction with traffic light program does not change on last 3.5 minutes.

If there is some change in traffic light a yellow square will blinking on the current traffic light program.

After simulation finish to run :

The information on screen contains:

  • Number of round and how long the simulation run until now.
  • Current traffic light program
  • Mark for vehicles:
    Red: How many total vehicles arrival to specific lane on all simulation run. Green: How many vehicles cross the junction with traffic light program does change on all simulation run. Blue: How many vehicles cross the junction with traffic light program does not change on all simulation run.

We could export all infromation from simulation running by click on 'export statics' button .


Credits

Professor Tomer toledo and Doctor Tamir Balasha from the Technion – Israel Institute of Technology