sanky2501 / Microsoft-Hackthon

Microsoft Open Source Hackthon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Microsoft Open Source Hackathon 2020

TEAM: TECHNO PANDITS

Problem Statement

Smart Traffic Management System for Quick Commute and Carbon Reduction

Traffic congestion is rising in cities around the world. Contributing factors include expanding urban population, aging infrastructure, inefficient and uncoordinated traffic signal timing and a lack of real-time data.

Advanced traffic management technologies such as adaptive traffic control and traffic analytics can improve safety and significantly decrease traffic congestion levels and greenhouse gas (GHG) emissions.

Create a solution for smart cities with mature traffic management.

Idea

We are aiming to solve the traffic congestion problem by optimising the signal timer durations. This will be done by setting the timers proportional to their respective road traffic density. Do take a look at the Presentation Created by Us: CodeForTheFuture_TechnoPandits.pdf

Approach

  • The first step is to find traffic flow on every side of a crossroad. This is done by fetching data from 'Traffic Flow' API. Here we have used Azure Maps API. Azure Maps API is one of the leading traffic flow API with an accuracy over 96%. This traffic density data will be used in real-time to calculate the wait time for each signal.
  • Now that our model has the traffic distribution along the crossroad, the next step would be to find optimal traffic signal timings. We try to optimize signal timings by focusing more on equity over equality. In simple words, the signal wait time would be indirectly proportional to the traffic flow on a side rather than having same wait time for all sides of the crossroad. So, for eg on a 4-way crossroad, if one of the roads has a greater traffic density, then, the signal wait time will be proportionally lower.
  • After finding optimal signal timings, the signal timers are set as per those timings.
  • The whole process is repeated after an interval of 2 min. This is done to achieve the real time aspect of our model.

Flowchart :-

Flowchart

Structure

Structure

devDependencies

Python Libraries Used

  • numpy
  • random
  • time
  • json
  • requests

REPO:

STEP 1: Calculate the Traffic Signal Timer formula for a Cross-Road. (Sample Data used instead of Real Time Data)

FILE: Signal Timer Model 1

STEP 2: Accessing Real Time Data. (Trial was Done Using TomTom API - Later Shifted to AZURE MAPS API)

FILE: Signal Timer Model 2

STEP 3: Integration of STEP 1 and STEP 2 - Using Real Time data with Signal Timer Algorithm

FILES: Integration 1, Integration 2

We have implemented our model on a crossroad in Pune called as Parihar Chowk.

Following are the locations of each side that are fed to Azure Maps API to fetch traffic flow on each side. Side1, Side 2, Side 3, Side 4

To better understand about the locations fed to API refer the diagram below :-

  • A RED Dot denotes a location fed to the API

API Locations

Advantages of our Model :-

  • Real-Time Solution
  • Addresses All Ranges of Traffic Densities
  • Low Maintenance Cost
  • High Accuracy and Consistency
  • Does Not Depend on any External Factors like Weather, Road Construction, Human Intervention, etc

Drawback :-

  • The model may not work efficiently if the locations fed to the Maps API are not precise.

Future Scope:-

  • Include Pedestrian Timers
  • Integrating with other traffic solutions

Integration 2.ipynb is our FINAL PROTOTYPE.

The project has also been uploaded on Azure Repo.

About

Microsoft Open Source Hackthon


Languages

Language:Jupyter Notebook 100.0%