You are on page 1of 20

Running head: [Shortened Title up to 50 Characters] 1

Application of
Graph Theory in
Traffic Management
Tania Bhardwaj, Udit Maheshwari
B.sc Computer Science (HONS)
Roll no – 20201428, 20201446
Ramanujan College, Delhi University
[Shortened Title up to 50 Characters] 2

Abstract

In order to solve the traffic problems in a city, the use of graph theory
concepts has been applied in this paper. After representing the road
network in the form of a graph, the presented methodology reduces the
number of interruptions as well as improves the efficiency of traffic
lights.

Keywords: Graph Theory, Genetic Algorithms, Traffic Management,


Flow Control, Signal Controlling,
[Shortened Title up to 50 Characters] 3

Introduction

Road Traffic Management is an important aspect in today's cities.


Efficient road traffic management, along with proper public transit
system greatly reduces the travel time in such cities and more
importantly its carbon footprint. Today's automobiles are heavily
dependent hydrocarbon fuels and the exhaust coming from these
vehicles has been regarded as a major cause of environmental
degradation Reducing the time the vehicle stays on the road helps in
reducing its effect on the environment.
Heavily congested roads in city areas are a common problem today.
Several attempts to solve this problem by improving road infrastructure
or imposing restrictions on motor vehicles entering city areas are not
feasible, especially in developing countries. This may be due to lack of
funds to improve the infrastructure, the objections of the general public
on applying restrictions on the inflow of vehicles or difficulties on
acquiring lands to construct roads in highly populated areas. Therefore,
it is important to have a different method to handle traffic congestions.
A methodology of handling city traffic in a very efficient way by proper
traffic management instead of modifying the road infrastructure is
presented in this paper.
This is achieved by rearranging the traffic flow in such a way that the
interruption to the continuous traffic flow is minimized. A tool was
developed using Flow Control Mechanisms, Genetic Algorithms and
Graph Theory in order to dynamically suggest improved traffic plans.

I. Problem Statement:
To improve the traffic conditions efficiency of roads we propose a 2-
point solution:
[Shortened Title up to 50 Characters] 4

 Improving the efficiency of roads by reducing traffic accumulation


at bottleneck areas i.e., intersections. This can be done by reducing
the number of intersections. In order to achieve the same, we need
to allow only one way traffic on a few roads, remove a few roads
altogether and also alter lane on the traffic patterns at that time of
the day. However, these changes should be made without
compromising the connectedness of each place to every other place
in the city.

 At every intersection, traffic is regulated by efficiently controlling


the timing patterns of traffic lights based on the capacity of each
incoming lane. Each signal is connected to its neighboring signal,
and its activation depends upon the average time a vehicle takes to
cross the distance between the two traffic lights.

II. Road Manipulation:

II.1 Problem Formation using Graph Theory:

We consider a given city map. The map contains roads and points
of intersections and certain major places. We consider the places
and intersections as nodes and the roads connecting them as edges.
Thus, we get a city map G (V, E).

The following parameters are required in the graph:

 Length of edge: signifying length of the road


 Direction of edges
 No of lanes in the road
[Shortened Title up to 50 Characters] 5

 Weight of edge: signifying the expected traffic at peak time


 Shortest path between two locations (based on original
graph)
 Deviation from shortest path between two locations (after
each modification of graph)

Consider this, when more than one incoming edges (roads) are at a
junction, regardless of the number of out-going edges (roads), at
least the traffic at one incoming road has to stop for the others to
pass. This is called an interruption.

The number of interruptions at a given node ‘i’ can be given by:


Xi = no. of incoming edges -1

These interruptions are the major cause of traffic issues. Our objective is
to minimize these by removal of edges, while keeping the graph
connected. However, removing of edges invariably means increasing the
distance between some pair of vertices (locations). This needs to be
minimized as well.
The deviation Yi , or the increased distance between 2 locations can be
calculated by subtracting the original shortest distance between the 2
vertices from the modified shortest distance after removal of edges.

II.2 Definitions:
Consider the following premise:
 The intensity of traffic problems are determined by the number of
interruptions at a node. To minimize this, we remove certain edges.
 This leads to increase in deviation from shortest path, which is
undesirable. However, since both cannot be minimized
simultaneously, we need to find an optimum solution for this.
[Shortened Title up to 50 Characters] 6

Thus, we can assign for a particular graph, a fitness function: f(G)


Where,
F (G) = ΣX i2+ ΣΥi

This is because reducing interruptions takes priority. Also, we can see


that the difference between the no if incoming edges and out-going
edges (when in > out) causes a stalling of vehicles for other vehicles to
pass. This can be reduced, too.

Therefore,
F(G) = ΣXi2 + ΣYi + Σ |Vi(in) -Vi(out) |
Where
Xi = No of interruptions on vertex i
Yi = ΣDeviation of shortest path on vertex i
Vi (in) = In degree of Vertex i
V.(out) = Out degree of Vertex i

Here a point to note is that if a considered place is not a point of


intersection of roads the edges connecting it are series edges and do not
affect the calculations but at the same time make sure that the places on
the roads also remain connected to the rest of the network.

The aim is to get a modified graph so that f(G) is minimum (or at least
below threshold) and at the same time the graph stays connected at all
stages.
[Shortened Title up to 50 Characters] 7

II.3 Procedure:

 To find the shortest path between 2 vertices we use Floyd-Warshall


algorithm as it solves for all pairs shortest path and gives a matrix
result. This algorithm is applied at every stage after removal of an
edge. And if for any one pair, the algorithm outputs infinity (or a
maximum threshold) we discard that modification because the
graph has become disconnected.

 This takes care of 2 problems


The deviation can be obtained in a matrix format by subtracting the
original matrix from the new matrix of all pairs shortest path. (Yi)

The connectedness of a graph can be checked at every stage.

 To find interruptions on each Vertex we use the given formula


(Xi). We find its square, calculate f(G) and store it in a record.

 To remove edges, we could use the concept of Genetic Algorithm:

Mutation: removing edges at random

Crossover: combining 2 graphs obtained from previous stages i.e.,


union of the edge sets as the vertex set in the same.

 We start the edge removal process in a breadth first manner by


selecting the node with most interruptions and removing its
incident edges one by one to form the 1st set of mutations. This set
also includes the graphs obtained by removing single edges at a
[Shortened Title up to 50 Characters] 8

time starting from the node with highest interruptions and going
concentrically outwards(breadth-first).

 When at a node, the weight of the edge is considered before


removal. Above a certain threshold the edge cannot be removed.
High weighted edge means the road is well travelled and expects a
high traffic in the peak time and cannot be removed. Also, when
removing edges, we start by lowest weighted edges or the less
travelled roads to avoid inconvenience to majority of the traffic.

 When the one the entire breadth-first is done and the consequent
graphs are obtained we compute the deviation as mentioned above.
We check the connectedness, if not connected the graph is
discarded.

 The function f (G) is calculated for each of these graphs and the
lowest 3-5 are chose for the next stage. These are clearly better
than the original graph i.e., f(G) if lower than the original graph.
The next stage is repetition of the previous step on the newly
obtained graphs.

 Clearly our graphs, representing road system, keep getting better.


Once a graph reaches a minimum threshold or we find min f(G)
from all possible crossovers. That graph is chosen as the most
efficient graph and is used for further manipulations when dealing
with Signal Systems.

II.4 Outcome:
[Shortened Title up to 50 Characters] 9

Thus, we obtain a city map with fewer roads and fewer interruptions, yet
connected, resulting in an efficient layout of the roads and reduced
congestion problems.

III. Signal Controlling:

III.1 Problem Formation:


Having reduced the number of interruptions to a considerably low value,
we now proceed onto the second part of our solution. Here we try to
reduce the traffic accumulation at intersections by regulating the flow of
traffic in an effective way. This is done by controlling the traffic lights
based on the pattern of its adjacent traffic lights and the capacity of
incoming roads.
We start the approach by introducing traffic lights on all junctions
having an interruption. The working pattern of the lights for individual
lanes has been satisfactorily explained in the paper, Intelligent Control
over the Crossing Traffic Lights by Graph Theory 121. The paper solves
the traffic lights problem for junctions with 3 and 4 intersecting roads.
They then extend the idea for a junction having 5 incident roads and
prove the efficiency of the proposed system using the software
MATLAB.
Since we know the working pattern of these traffic signals, we are left
with the timing control of these systems to minimize traffic
accumulation. The timing patterns are decided using the proportionality
principle, with the incoming road having the maximum capacity gets the
longest "green signal”. The calculation also takes into account the
capacities of the outgoing roads.

III.2 Procedure:
[Shortened Title up to 50 Characters] 10

 We start with the node having the maximum number of


interruptions (Vmax). This signal serves as the main bottleneck
of the entire network as it affects the greatest number of the
paths.

 Each lane is provided with a signal, controlling the traffic


flow for the concerned incoming lane. For each road. the
leftmost (or rightmost) lane is provided a free pass as it does
not create any interruptions in the traffic flow.

 Using the proportionality principle, the set off time for each
traffic light is calculated. The lane having higher traffic
capacity is allocated a higher percentage of "green light"
time, compared to the other lanes.

 The total time is calculated based on the capacity of the


incoming lanes and the capacity of the outgoing lane. The
capacity of the outgoing lane is an important parameter too as
the signaling should not clog the road beyond its capacity,
which will create problems for the next set of lights. In
extreme cases, it may lead to the breakdown of the entire
system.

 Now, the set off time for the next set of traffic lights for the
vertices adjacent to Vmax is calculated. The calculation of the
timing patterns of these lights, and in fact, all lights along
that path can be based on the timing pattern of Vmax. In order
to prevent the traffic from stopping, we calculate the average
time taken by any vehicle to travel from one traffic light to
the other and make sure they get a green signal at the
[Shortened Title up to 50 Characters] 11

subsequent lights. This calculation is a function of the


average speed of every vehicle and the distance between the
two traffic lights. i.e., the length of the road (edge).

 In case a conflict occurs, wherein a junction has two


interrupting lanes which should be allowed passage at a given
instance of time, we repeat the proportionality principle we
applied for Vmax to this vertex.

 The timing patterns of the vertices which follow the


conflicting vertex are set based on the newly calculated
timing patterns.

 Proceeding in this way, we try covering all the paths of the


graph and try to ensure minimal delays in the travel along
any given path. The timing pattern calculations are made for
maximum capacities which the roads can handle. In all
practical cases, the chances of the roads carrying their full
capacity load, except certain peak hours are bleak.

III.3 Outcome:
Using the solution, we have ended up with a city map having a
reduced number of roads and interruptions along any route. The
second part of the solution has further optimized the bottlenecks
but improving the efficiency of the signaling systems. This ensures
that the commuter experiences fewer delays on the way and makes
their journey far more convenient. The reduced traffic congestion
has many other advantages like reducing pollution and the
preventing wastage of precious fuel.
[Shortened Title up to 50 Characters] 12

IV. Solved Example:

IV.1 Solution as per 2.2:

 Let the number of the edges also be their weights or


their vehicular capacity at peak capacity. This is highly;
unlikely in a real scenario but helps in understanding
the procedure in Section 2.2 of this paper.

 The algorithm involves removing edges and checking


for connectedness afterwards so as to ensure an
optimum tradeoff between minimizing interruptions
and the actual distances between two nodes.
[Shortened Title up to 50 Characters] 13

 We try removing the edge from C to E starting in a


breadth first manner. The graph remains connected and
the interruption is lessened.

 For the sake of supposing we remove the next edge


from B to E and see that it disconnects the graph. Hence
this edge be removed in any circumstances as it will
turn E into an isolated vertex.

 The edge from A to B is removed and as the graph


remains connected this is permitted according to our
algorithm
[Shortened Title up to 50 Characters] 14

 The concepts of genetic algorithms and other data


collection such as weights and edge, length must be
considered in order to make the fitness function in real
world which are far more complex than this simple
solved example.

IV.2 Solution as per Section 3.2

 For the procedure stated in section 3.2, the above


problem been considered as a simple example.

 The weights of the edges have been written along them


and it is obvious that the vertex 6 has most number of
incoming along with vertex 3.

 Vertex 6 has on an assumption 100 seconds of green


light time and according to the proportionality principle
this must be divided as per the weights of the edges
entering it,
[Shortened Title up to 50 Characters] 15

 Here,

• Edge 8 6 gets 50 seconds of green light


• Edge 5 6 gets 30 seconds of green light
• Edge 7 6 gets 20 seconds of green light

 For the adjacent vertex 3, the lights must be


synchronized preferably in multiples of 50 so as to allow the
traffic along edge 8 1 to commute smoothly.

 To make this more accurate, a function must be


constructed which takes into account the average speed
of vehicles on this route.

V. Application to a problem:
V.1 Problem Formation:

• The city's traffic flows must be studied and defined as a


graph G (V.E).

• This would need careful monitoring and data collection


over a period of at least a whole year in order to have wider
range of data to base our aggregates on.
• Data such as peak traffic volume or the weight of every
node must be calculated as an average over a longer period of
time.
[Shortened Title up to 50 Characters] 16

• All the parameters specified in sections 2 and 3 must be


collected and filed for ready reference.

• The entire city road structure must be mapped onto software


such as MATLAB or any other software that finds
application in Graph theory.

V.2 Procedure:

• It is impractical to attempt such an optimization of


a city's road structure due to the variables and
multiple nodes that exist even in the smallest of
such areas.
• We hence use the steps drafted in Sections 2.2 and
3.2 in an algorithmic manner so as to harness
computing power for the enormity of this task.
• Determining the threshold value is an important
task and must be given precedence while
calculation the requisite data for the optimization.
V.3 Outcome:
On application of the given steps, a more ergonomic graph is obtained
that avoids unnecessary bottlenecks and interruptions.
This in turn leads to a smoother and hassle-free driving experience while
redistributing traffic as optimally as possible.
[Shortened Title up to 50 Characters] 17

References
[1] Ming Li Xiaoming, Wang Jun Yang Xianguo, Wu Yuan 2
"Study on Complex Planning and Development of City Traffic and Its
Properties," MASS '09 International Conference, September 2009.

[2] Koggalagge R., Dissanayake H. “A supporting tool for efficient city traffic
Planning," 2010 International Conference on Industrial and Imformation Systems
(ICIIS), Aug 2010
[Shortened Title up to 50 Characters] 18
[Shortened Title up to 50 Characters] 19
[Shortened Title up to 50 Characters] 20

You might also like