Real-time Intelligent Traffic System

Rapid development of the novel techniques involved in Mobile Networks and Geographic Information Systems prompted ITS(Intelligent Transportation System) become an advanced method to achieve urba informatization. Analyzing the data collected by Floating Car can not only help people see for the traffic condition, but also help managers make the prediction of the traffic affairs and flows in the future, which exerts positive influence on the traffic control and management.
Therefore we implement the real-time traffic condition algorithms by real data in Shenzhen. Based on mySQL, the database is properly created and subsequently optimized with simple pre-processes. Thus the available data can be mapped with the real street and road in the city by Map Matching algorithm, which will finally be practical for the estimation of real-time traffic condition. Lastly, we proposes some optimal schemes to improve the procedure.
MOTIVATION
ACHIEVEMENT FLOW
Conducted research on intelligent traffic algorithm
Implemented the road mapping and real-time traffic condition algorithm
Designed and built database for Shenzhen floating car data by MySQL
Plot results on the map of Shenzhen
Proposed optimal schemes
ALGORITHMS
ROAD MAPPING ALGORITHM

-
Define a threshold value
-
Let the car (point P) become the center of the circle. Let the threshold value become the radius, then draw a circle.
-
Roads (edges) that have been covered by the circle would be the candidates of mapping roads.


-
Calculate distance between car and each candidate road.
-
If the projection point of car is on the road, then:
-
If the projection is out of road, for example:

then:




-
Here's the snapshot of result.
DRIVING DIRECTION JUDGEMENT
-
A road may have branches of two opposite directions. Therefore we need to determine the direction.
-
First, calculate the direction vector of the car.
-
Then, calculate the direction vector between intersection E and F.
-
Calculate the cosine value of two vectors to determine direction.
TRAFFIC CONDITION JUDGEMENT

CODE
-
Calculate average speed for all the cars that have been appeared in each road within 10 minutes.
-
Set the slowest threshold as Vs and the fastest threshold as Vj.
-
Label each road based on the left formula.
DATASET
FRONT-END
-
Visualization: javascript, html, css
-
UI library: Bootstrap
-
Building tools: npm;
BACK-END
-
Algorithm implementation: JAVA
-
Server: JAVA
-
Data persistency: MySQL
TECHNICAL SPECIFICATION

-
OriginalData: Date, Longitude, Latitude, Country, City, Area, Street, Speed, Angle
-
Street: StreetID, City, Area, Street
-
Intersection: Area, Street, IntersectionID, FirstID, FirstName, SecondID, SecondName
-
Location: VehicleID, Date, Speed, Direction, Street,FirstInterID, FirstInter_Longitude, FirstInter_Latitude, SecondInterID, SecondInter_Longitude, SecondInter_Latitude
-
AvgRate: Date, AvgRate, Area, Street, FirstInterID, FirstInter_Longitude, FirstInter_Latitude, SecondInterID, SecondInter_Longitude, SecondInter_Latitude
DATABASE DESIGN
DATA PRE-PROCESSING
-
Invalid data may affect calculation of average speed.
-
We use SQL statement to filter invalid data.
-
For example, we filter the data with value 0 of latitude and longtude.
VISUALIZATION
