Web Based Optimal Route Selection and Simulation for Urban...

13
Web Based Optimal Route Selection and Simulation for Urban Traffic Congestion S.Jayashree, R.Queen Suraajini, K.R.Sharanya and T.Sakthimari B.E Geo Informatics Department of Civil Engineering College of Engineering Guindy, Anna University India Abstract Traffic is a major problem for the urban population these days. Hence, through this paper, it is intended to provide an online portal that will help a user browse through for the real time traffic status of a particular area which he/she wants to reach. In case of heavy traffic congestion in that area, the next best shortest route(s) to reach the same location will be shown. The web portal will also contain dynamic querying facility to enable the user to find the possible traffic density in any particular area for some time in the near future. The real time traffic video is captured using CCTV. This CCTV video is processed using MATLAB software and the traffic density is calculated continually in the server end. The traffic density thereof is continually updated in a database. This database is in turn interfaced with a Geographical Information System (GIS) for finding the alternative optimal route to reach an area with high traffic congestion, using open source platforms. The bases for optimal route finding are the feature details of that area stored in spatial database and the traffic density that is continually updated in the database. Hence, ArcGIS is used to perform the route analysis and it is interfaced with Geo server for launching the results on the online portal. The GIS platform is also used for generating a traffic simulation pattern for a specified time in the future. Key words: Traffic congestion, GIS, Video processing, optimal route selection. Introduction Chennai is a congested city in India. Traffic congestion occurs when volume of traffic is greater than the road capacity. Road and traffic control has become one of the most important issues in Chennai city. Traffic information services help us to inform the public about optimal routes of use in order to avoid traffic delays. This paper aims at providing the solution for those kinds of traffic delays to commuters. The overall architecture of the system and procedure is described in this paper. The web based solution helps in improving road safety, reducing pollution level and in saving time. Geographic Information System (GIS) is used to store, maintain and analyze transportation and traffic data. The web based portal consists of following processes for selecting optimal path. It starts with finding the traffic density between the given two locations. Then shortest path between two given locations is found out by network analysis. The system provides traffic control decisions based on road characteristics and traffic density. The factors influencing the optimal path decision are traffic density, presence of accidents, construction, political meetings and special occasions, minimum travel time, average speed, road length, flooding and others. The shortest path algorithm has following steps:

Transcript of Web Based Optimal Route Selection and Simulation for Urban...

Page 1: Web Based Optimal Route Selection and Simulation for Urban ...caceros.docentes.upbbga.edu.co/I2012/SIM_I2012/laboratorios/lab5/... · route(s) to reach the same location will be shown.

Web Based Optimal Route Selection and Simulation for Urban Traffic Congestion

S.Jayashree, R.Queen Suraajini, K.R.Sharanya and T.Sakthimari B.E Geo Informatics

Department of Civil Engineering College of Engineering Guindy, Anna University India

Abstract Traffic is a major problem for the urban population these days. Hence, through this paper, it is intended to

provide an online portal that will help a user browse through for the real time traffic status of a particular area which he/she wants to reach. In case of heavy traffic congestion in that area, the next best shortest route(s) to reach the same location will be shown. The web portal will also contain dynamic querying facility to enable the user to find the possible traffic density in any particular area for some time in the near future. The real time traffic video is captured using CCTV. This CCTV video is processed using MATLAB software and the traffic density is calculated continually in the server end. The traffic density thereof is continually updated in a database. This database is in turn interfaced with a Geographical Information System (GIS) for finding the alternative optimal route to reach an area with high traffic congestion, using open source platforms. The bases for optimal route finding are the feature details of that area stored in spatial database and the traffic density that is continually updated in the database. Hence, ArcGIS is used to perform the route analysis and it is interfaced with Geo server for launching the results on the online portal. The GIS platform is also used for generating a traffic simulation pattern for a specified time in the future.

Key words: Traffic congestion, GIS, Video processing, optimal route selection.

Introduction Chennai is a congested city in India. Traffic congestion occurs when volume of traffic is greater than

the road capacity. Road and traffic control has become one of the most important issues in Chennai city. Traffic information services help us to inform the public about optimal routes of use in order to avoid traffic delays. This paper aims at providing the solution for those kinds of traffic delays to commuters. The overall architecture of the system and procedure is described in this paper. The web based solution helps in improving road safety, reducing pollution level and in saving time. Geographic Information System (GIS) is used to store, maintain and analyze transportation and traffic data. The web based portal consists of following processes for selecting optimal path. It starts with finding the traffic density between the given two locations. Then shortest path between two given locations is found out by network analysis. The system provides traffic control decisions based on road characteristics and traffic density. The factors influencing the optimal path decision are traffic density, presence of accidents, construction, political meetings and special occasions, minimum travel time, average speed, road length, flooding and others. The shortest path algorithm has following steps:

Page 2: Web Based Optimal Route Selection and Simulation for Urban ...caceros.docentes.upbbga.edu.co/I2012/SIM_I2012/laboratorios/lab5/... · route(s) to reach the same location will be shown.

1. The current location and desired destination are received from the user 2. The search is started at the neighboring node with the shortest distance

For implementing GIS database applications on internet, three-tier architecture is used. This architecture uses platform-independent Java applet as the front end for the client. The Java applet can run in any Java-enabled web browser, regardless of the operating system used. The client side is an interactive map applet. The server provides the user with the optimal path, simulated traffic density for the future. The information is obtained from the GIS database.

Study area Chennai, earlier known Madras, is one of the four major metropolitan cities, located in southern

India. It lies between 12° 09’, 80° 12’NE and 13° 09’, 80° 19’NE. It has a population of 6.04 million and an area of 170.47 Sq.km. The population growth is increasing at an average rate of 25 percent per decade. Chennai has two administrative boundaries; the outer boundary is Chennai metropolitan boundary which encompasses the suburban areas while the inner one is the corporation boundary which includes only the urban area. It shares its boundary with Andhra Pradesh at the North, Bay of Bengal at the East, Indian Ocean at the South and Kerala at its West. The various available routes are chosen from Anna University through Thiruvanmiyur for implementing and testing the project; there are three direct road routes between these two places. Their coordinates are 13°00’38.01” N, 80°14’09.88” E and 12°58’56.69” N, 80°15’44.56” E respectively.

Methodology This work involves the following processes:

TRAFFIC DENSITY ESTIMATION AND SIMULATION

USING

VIDEO CAPTURE USING CCTV

CREATING MS ACCESS DATABASE

EXPORT THE TRAFFIC DENSITY TO THE CREATED DATABASE

LINKING WITH GIS DATABASE

PERFORMING NETWORK ANALYSIS IN GIS

FINDING OPTIMAL ROUTE USING GIS

Page 3: Web Based Optimal Route Selection and Simulation for Urban ...caceros.docentes.upbbga.edu.co/I2012/SIM_I2012/laboratorios/lab5/... · route(s) to reach the same location will be shown.

Fig 1: Work flow

Traffic density estimation Computer vision technique is applied to the images in the traffic scene for measuring the level of

traffic congestion of the road in the scene. This information helps the commuters to plan the route to avoid traffic. There are two steps in traffic monitoring: detection of vehicles in the video, analyzing it from frame to frame and finding traffic density. For signal control and effective traffic management traffic density estimation is essential. The traffic density is estimated automatically using Matlab Simulink. Adaptive background subtraction and Kalman filter are used to detect and track vehicles or road. The traffic monitoring system consists of five parts.

Motion detection

Filtering

Labeling

Tracking

Counting vehicles.

Traffic monitoring system

Fig 2: Traffic monitoring system

1. Video acquisition: It consists of a CCTV camera suitable interface for connecting it to processor.

2. Processor: It consists of computer.

3. Video analysis: Certain tools are used to analyze the video captured and derive conclusions. It is used to count the number of moving objects in the video. Matlab provides easy platform to handle videos.

CREATING INTERFACE WITH JAVA FOR USERS.

Video acquisition device( CCTV camera).

Video processor

(Computer)

Video analysis tool

( Matlab)

Page 4: Web Based Optimal Route Selection and Simulation for Urban ...caceros.docentes.upbbga.edu.co/I2012/SIM_I2012/laboratorios/lab5/... · route(s) to reach the same location will be shown.

MATLAB stands for MATrix LABoratory, software developed by Mathworks. MATLAB provides support for computations and simulations.

Algorithm for traffic monitoring

Motion detection

The motion detection is done by using adaptive difference method, which is change-detection, based on subtraction of a background image. Background model is created using Gaussian mixture modeling. Since the background varies with change in lighting conditions, the background has to be updated. The variance of the new pixel with the pixel in the background model helps to find whether the object belongs to foreground or background. The color value of each pixel is compared with the background model. Then the foreground objects are detected and labeled using connected component analysis.

The basic idea in background subtraction is to integrate the new incoming information into the current background image using Kalman filter formalism:

B(t+1) = Bt + [ a1*(1-Mt) + a2*Mt]*Dt

Where Bt represents the background model at time t, Dt is the difference between the present frame and the background model, and Mt is the binary moving objects hypothesis mask. The gain a1 and a2 are based on an estimate of the rate change of the background.

The detection starts by computing pixel based absolute difference between each incoming frame and an adaptive background frame Bt . The pixels are assumed to contain motion if the difference exceeds a predefined threshold level. As a result, a binary image is formed where active pixels are labeled with a “1” and non-active ones with a “0”, with the updated background image strategy using Kalman filter.

Labeling

After thresholding and filtering, the system needs to find connected components and defines regions. The connected component labeling operation, based on region growing is used to generate candidate regions. After this operation, we had collected regions that are different from the background. From the fact that a vehicle has almost regular shape, we remove the small and irregular shape regions by a specific threshold. By using the total number of pixels in a candidate region divided by the area of the rectangular window covered that region, and compare with the specific threshold value (keep the region having bigger value than threshold), the moving object regions in the binary image is obtained.

Tracking

Kalman filtering technique is used for vehicle tracking. The tracking phase attempts to connect these regions to from previous frames. This association occurs when the current region spatially overlaps a region from the previous time frame. After the connected component labeling images are received, the overlap regions are matched and a master list created.

Page 5: Web Based Optimal Route Selection and Simulation for Urban ...caceros.docentes.upbbga.edu.co/I2012/SIM_I2012/laboratorios/lab5/... · route(s) to reach the same location will be shown.

Traffic Monitoring

A boundary is defined on the image for each outbound and inbound lane to form a region of interest. When the tracked vehicles move out of this region in terms of pixel values, the counting algorithm increases the vehicle count by 1 for the corresponding lane. The vehicle count is obtained in this step. A virtual line is defined perpendicular to the road. The count is increased when the vehicle crosses the line each time.

Traffic density calculation

The number of vehicle that passed through the road for the given time period is obtained from the above process.

Traffic density = Vi/T

Where Vi is number of vehicle type i that passed the road in time period, T is time period.

Simulation using Matlab Simulink Our simulation was based on so-called "follow-the-leader" theories of traffic flow. According to this,

each driver slows down or speeds up on the basis of his own speed, the speed of the vehicle ahead of him, and the distance to the vehicle ahead of him. Human drivers take a certain amount of time (about a second) to observe what is going on around them and to press the brake, as appropriate. The standard "follow-the-leader" theory supposes that

Un (t + T) = (un -1(t)-un (t)) Where t is time, T is the reaction time, un is the position of the nth car, and the "sensitivity

coefficient" l may depend on un-1(t)-un (t), the spacing between cars, and/or un(t), the speed of the nth car. A driver will tend to decelerate if he is going faster than the car in front of him, or if he is close to the car in front of him, and will tend to accelerate if he is going slower than the car in front of him. In addition, a driver (especially in light traffic) may tend to speed up or slow down depending on whether he is going slower or faster (respectively) than a "reasonable" speed for the road (often, but not always, equal to the posted speed limit). Since our road is circular, in this equation u0 is interpreted as uN, where N is the total number of cars.

The theoretical predictions are implemented with a simulation using SIMULINK. The simulation is tested for the roads of Old Mahabalipuram Road, Lattice Bridge road and Kasturba Nagar 3rd cross street, the three road routes that we had considered between our places of interest.

Database A database is created in MS Access as shown in Fig 3. It contains road ID, video signal ID, place of

interest (from/to) and time of video capture. The traffic density which is calculated using Matlab is added as a new column in the created database. The database now contains traffic density as another column in it. It is then ready for route analysis in GIS.

Page 6: Web Based Optimal Route Selection and Simulation for Urban ...caceros.docentes.upbbga.edu.co/I2012/SIM_I2012/laboratorios/lab5/... · route(s) to reach the same location will be shown.

The database is connected to the GIS through Open Database Connectivity (ODBC). Open Database

Connectivity (ODBC) is a widely used application programming interface (API) for database access. ODBC inserts a middle layer, called a database driver, between an application and the DBMS. The purpose of this layer is to translate the application’s data queries into commands that the DBMS understands. For this to work, the application must be capable of issuing ODBC commands, and the DBMS must be capable of responding to them.

ODBC Connection Setup:

1. Check if the Sybase ODBC driver is installed on the PC. 2. Check if a sql.ini file exists on the PC with a reference to the Sybase server housing the Data Warehouse. 3. Create a data set name (DSN) referring to the Data Warehouse server. 4. Connect to Data Warehouse server in Microsoft Access, and link desired Data Warehouse tables into MS Access.

Fig 3: Traffic information system in MS Access.

Page 7: Web Based Optimal Route Selection and Simulation for Urban ...caceros.docentes.upbbga.edu.co/I2012/SIM_I2012/laboratorios/lab5/... · route(s) to reach the same location will be shown.

Fig 4: Simulink model for vehicle counting.

Network analysis In our project, there is a need for finding the shortest route between the start point of a road and the

destination of a road. We’ve designed the GUI to ultimately show the end user, the traffic densities in all the available routes between 2 places and also the order of the shortest path between the 2 points. Once the traffic density is estimated and the updated in the Database thereof, it is linked with ARCGIS’ Geodatabase, for performing network analysis. Network analysis is done in a GIS environ to find the optimal route between 2 points. There are several parameters that are used to gauge the best route. It depends on a factor called impedance.

In our case, impedance is taken as time to find the shortest route between two locations. Therefore, the optimal route in our case can be defined as the route that has the lowest impedance, where the impedance is chosen by the user to be time. For the purpose of performing network analysis, we had used ArcGIS Desktop’s Network analyst extension. The main reason for having selected ARCGIS to perform our network analysis is that it uses Dijkstra’s algorithm.

In general, there are 2 types of routing algorithm.

1. Bellman Ford Algorithm

2. Dijkstra’s Algorithm

In the latter case the router has a complete view of the network, whereas in the former, each router only has a local view consisting of its directly attached neighbors.

The Dijkstra’s algorithm goes though the following procedures The router builds a graph of the network and identifies source and destination nodes, as V1 and V2

for example. Then it builds a matrix, called the "adjacency matrix." In this matrix, a coordinate indicates weight. For example, [i, j] is the weight of a link between Vi and Vj. if there is no direct link between Vi and Vj, this weight is identified as "infinity."

Page 8: Web Based Optimal Route Selection and Simulation for Urban ...caceros.docentes.upbbga.edu.co/I2012/SIM_I2012/laboratorios/lab5/... · route(s) to reach the same location will be shown.

1. The router builds a status record set for every node on the network. The record contains three fields:

• Predecessor field - The first field shows the previous node. • Length field - The second field shows the sum of the weights from the source to the node. • Label field - The last field shows the status of node. Each node can have one status mode: "permanent" or "tentative."

2. The router initializes the parameters of the status record set (for all nodes) and sets their length to "infinity" and their label to "tentative."

3. The router sets a T-node. For example, if V1 is to be the source T-node, the router changes V1's label to "permanent." When a label changes to "permanent," it never changes again. A T-node is an agent and nothing more.

4. The router updates the status record set for all tentative nodes that are directly linked to the source T- node.

5. The router looks at all of the tentative nodes and chooses the one whose weight to V1 is lowest. That node is then the destination T-node.

6. If this node is not V2 (the intended destination), the router goes back to step 5.

7. If this node is V2, the router extracts its previous node from the status record set and does this until it arrives at V1. This list of nodes shows the best route from V1 to V2.

We had used the route solver ‘route’ of ARCGIS to solve for the shortest route between two point using hierarchy attributes.

Establishing connection between Geo server and ArcGIS

After all the routes had been arranged in the increasing order of their route, they need to be displayed as a map on the GUI. Since we had designed our website using java, we had chosen Geoserver, an open source map and geographic data serving software, written in Java to show the final map output on the user end’s GUI.

A connection is established between ArcGIS and Geoserver via the WMS service. This is done to access services provided by Geoserver. The Open Geospatial Consortium (OGC) has defined Web Mapping Service (WMS) specification protocols for the transfer of geospatial data from servers to client applications.

Now the ArcGIS-Geoserver output is transferred to GUI using Java Database Connectivity (JDBC).

JDBC: Java Database Connectivity is a technology we had used to enable our java program to manipulate

traffic data stored in our database. We had used API classes and interfaces for connecting Java front end with the database. It provides the ability to access RDBMS data stored in databases locally throughout the Internet. Therefore, to create a complete GIS application, JDBC provides the ability to access, modify and

Page 9: Web Based Optimal Route Selection and Simulation for Urban ...caceros.docentes.upbbga.edu.co/I2012/SIM_I2012/laboratorios/lab5/... · route(s) to reach the same location will be shown.

display tabular information as needed. To Internet enable a GIS application JDBC provides the ability to access a database on a server and display the results on the client.

JDBC uses four types of drivers to connect to the databases

Type 1 driver

Type 2 driver

Type 3 driver

Type 4 driver

Type 1, 2 and 4 are two-tier (client-server) drivers. There is no application server in the middle. Type 3 driver is a multi-tier (n-tier) driver. Type 3 driver itself connects to an application server. The application server in turn connects to a database using Type 1, 2 or 4 drivers. The user just specifies the Type 3 driver’s class name and a data source name to connect to. Generally used in applet deployment.

Conclusion Thus traffic density between the two places of interest across the three roads had been found using

Matlab-Simulink. Using ArcGIS, the shortest route with the least traffic density had been calculated and it had been facilitated to be shown as a map output. A GUI for the user end had been developed for the same. Our GUI also shows the futuristic (for about next half-an hour) traffic density between two areas. We had hence found that this system can be implemented across the entire city, just as how it had been done already in Canada and the US. This avoids traffic clogging on the roads. We had also found that this system is more advantageous than using GPS to calculate traffic density because of the high cost of the GPS and the practical difficulty in installing GPS in all the vehicles.

References

[1] Jared Friedman, “Finding Mean traffic speed Low Frame-rate Video”, January 14, 2005, Final project report, Computer science 283

[2] Erhan Bas, A. Murat Tekalp, Fellow, IEEE, and F. Sibel Salman, “Automatic Vehicle Counting from Video for Traffic Flow Analysis”, Proceedings of the 2007 IEEE Intelligent Vehicles Symposium Istanbul, Turkey, June 13-15, 2007, College of Engineering, Koç University, 34450 Sariyer, Istanbul, Turkey

[3] Hassan Mohammed, Malik Amayreh. Issa Abdulhakim, “Web-based Traffic System”, Department of Information Systems & Computer Science Amman Al-Ahlya University, Jordan Department of Computer Science-Zarka Private University

[4] Justin Deoliveira ,”Uniting the “GeoWeb” and Spatial Data Infrastructures”,The Open Planning Project United States of America

Page 10: Web Based Optimal Route Selection and Simulation for Urban ...caceros.docentes.upbbga.edu.co/I2012/SIM_I2012/laboratorios/lab5/... · route(s) to reach the same location will be shown.

[5] Malik, A.S. Tawfik, H.M. Adeel, M, “SmartRNA: A Road Network Analysis Simulator”,Liverpool Hope Univ. Coll., Liverpool

[6] van Lint, J.W.C. Hoogendoorn, S.P. van Zuylen, H.J (2005),” Accurate freeway travel time prediction with state-space neural networks under missing data”, Transportation Research Part C: Emerging Technologies

Author details

Jayashree Surendrababu

B.E Geo-Informatics, Department of Civil Engineering, College of Engineering Guindy, Anna University, Chennai-600025. Email address: [email protected]

Mobile number: +91 9445718914 Mailing address: No.1, Third cross street, Indira Nagar, Adyar, Chennai – 600020.

Page 11: Web Based Optimal Route Selection and Simulation for Urban ...caceros.docentes.upbbga.edu.co/I2012/SIM_I2012/laboratorios/lab5/... · route(s) to reach the same location will be shown.

R.Queen Suraajini B.E Geo-Informatics, Department of Civil Engineering, College of Engineering Guindy, Anna University, Chennai-600025. Email address: [email protected] Mobile number: +91 9750759140 Mailing address: B4/12, Baskara appt, No:1 Tollgate, Bikshandar Koil- P.O, Trichy-621216.

K.R.Sharanya B.E Geo-Informatics, Department of Civil Engineering, College of Engineering Guindy, Anna University, Chennai-600025. Email address: [email protected] Mobile number: +91 9486208761 Mailing address: 0/82, Josium Shanmugam street, Aruppukottai, Virudhunagar - 626101.

T.Sakthimari B.E Geo-Informatics, Department of Civil Engineering, College of Engineering Guindy, Anna University, Chennai-600025. Email address: [email protected]

Page 12: Web Based Optimal Route Selection and Simulation for Urban ...caceros.docentes.upbbga.edu.co/I2012/SIM_I2012/laboratorios/lab5/... · route(s) to reach the same location will be shown.

Mobile number: +91 9047164885

Mailing address: 6/2, 7th

Main Road Extension, Akshaya Balaji Flats, New colony,

Chrompet, Chennai – 600044.

Names of the presenter:

1. Jayashree Surendrababu

Biography: Jayashree Surendrababu is a third year Geoinformatics Engineering student at College of Engineering Guindy. She is amicable, inquisitive and a good team player. She has presented papers on Information Warfare, Anti-Stealth technologies, Crime Simulation and the like in several inter departmental symposia in her college. Besides, she has done her First level certificate course in Japanese language in Anna University. She is also good in singing and participated in several television programmes.

2. R.Queen Suraajini

Biography: R.Queen Suraajini is a third year Geoinformatics Engineering student at College of Engineering Guindy. She is extremely hardworking, independent and a methodical person. She has learnt programming languages like C, C++ and applications such as Oracle, VB, CAD (using Micro Station), ArcGIS, Photoshop and Matlab. She has presented papers on Site selection for e-waste using Remote Sensing and GIS, Global environmental issues and Soft skills for Engineers, 3D reconstruction and visualization from a single view and also won the prizes for the same. She has also done her First level certificate course in Japanese language in Anna University.

Page 13: Web Based Optimal Route Selection and Simulation for Urban ...caceros.docentes.upbbga.edu.co/I2012/SIM_I2012/laboratorios/lab5/... · route(s) to reach the same location will be shown.