0% found this document useful (0 votes)
32 views

Vehicle Route Planning Using Dynamically Weighted

1) This document proposes a novel vehicle routing algorithm that improves upon Dijkstra's algorithm using a traffic prediction model based on traffic flow in a road network. 2) The algorithm dynamically weights Dijkstra's algorithm at each time step using predicted traffic parameters and travel times across each road from the traffic prediction model. 3) This allows the algorithm to find the optimal route by taking into account changing future traffic conditions rather than just current conditions like traditional implementations of Dijkstra's algorithm.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Vehicle Route Planning Using Dynamically Weighted

1) This document proposes a novel vehicle routing algorithm that improves upon Dijkstra's algorithm using a traffic prediction model based on traffic flow in a road network. 2) The algorithm dynamically weights Dijkstra's algorithm at each time step using predicted traffic parameters and travel times across each road from the traffic prediction model. 3) This allows the algorithm to find the optimal route by taking into account changing future traffic conditions rather than just current conditions like traditional implementations of Dijkstra's algorithm.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Vehicle Route Planning using Dynamically

Weighted Dijkstra’s Algorithm with Traffic


Prediction
Piyush Udhan1,a,* , Akhilesh Ganeshkar1,a , Poobigan Murugesan1,a , Abhishek Raj Permani1,a ,
Sameep Sanjeeva1 , Parth Deshpande1,b
arXiv:2205.15190v1 [math.OC] 30 May 2022

Abstract—Traditional vehicle routing algorithms do not con- Municipalities, the world over, keep making heavy invest-
sider the changing nature of traffic. While implementations of ments in building new roads, expanding the existing ones
Dijkstra’s algorithm with varying weights exist, the weights and repairing the damaged parts, although controversies on
are often changed after the outcome of algorithm is executed,
which may not always result in the optimal route being chosen. whether broader and a greater number of roads alleviate
Hence, this paper proposes a novel vehicle routing algorithm congestion persist [4]. Traffic congestion also causes increased
that improves upon Dijkstra’s algorithm using a traffic pre- vehicular emissions of harmful greenhouse gases such as
diction model based on the traffic flow in a road network. CO2 , CO, SO2 , NO2 which results in a significant rise of air
Here, Dijkstra’s algorithm is adapted to be dynamic and time pollutant exposures of commuters and urban populations due
dependent using traffic flow theory principles during the planning
stage itself. The model provides predicted traffic parameters and to the increased time spent in traffic [5]. Continued exposure to
travel time across each edge of the road network at every time such harmful emissions can lead to severe respiratory problems
instant, leading to better routing results. The dynamic algorithm and health risks [6] [7].
proposed here predicts changes in traffic conditions at each time One way to reduce traffic congestion is to enable traffic flow
step of planning to give the optimal forward-looking path. The optimisation. This would provide insights into more efficient
proposed algorithm is verified by comparing it with conventional
Dijkstra’s algorithm on a graph with randomly simulated traffic, routing in conjunction to smart roads networks. Better routing
and is shown to predict the optimal route better with continuously would eventually lead to better utilisation of all the roads in
changing traffic. the network, supporting optimal traffic flow and enabling a
reduction in emission.
Index Terms—Dijkstra’s algorithm, vehicle routing, traffic flow Bellman-Ford [8], A* [9], Floyd Warshall [10] and Dijk-
theory, traffic prediction model stra’s [11] are some of the common vehicle routing algorithms.
I. I NTRODUCTION One of the main advantages of Dijkstra’s algorithm is its
considerably low complexity, especially when dealing with a
Traffic congestion is a significant challenge in modern sparse road network. There are quite a few efforts studying
society, characterised by slower speeds, longer trip times, and the improvement of Dijkstra’s algorithm and its practical
increased vehicle queueing [1]. In a recent report by TomTom, applications. One such effort attempted to solve the Optimal
a leading Global Positioning System (GPS) company, the issue Route Planning in a Parking Lot based on the Dijkstra’s
of traffic congestion and the resultant loss of time, energy algorithm [12]. The authors combined an impedance function
and money of the commuters in major metro cities around model with the traditional Dijkstra’s algorithm to obtain the
the globe is highlighted and the time lost is estimated to be dynamic time of route. A balance function between distance
greater than three-fourths of the actual travel time [2]. Traffic and time was adopted as the weight matrix. In another paper,
congestion costed a total of $160 billion in the United States modelling of the optimal route-finding problem was carried out
of America (USA) due to 6.9 billion extra hours travelled and using a combination graph with three cost components namely
3.1 billion additional gallons of fuel purchased in 2014. As per travel distance, toll costs and road surface conditions [13]. An
the INRIX Roadway Analytics in 2017, the most congested optimal route was then calculated based on a combination of
25 cities of the U.S.A. are estimated to cost the drivers $480 these weights fed to the Dijkstra’s in the form of an adjacency
billion, over the next 10 years, owing to lost time, wasted fuel, matrix. In a related study, the authors optimized Dijkstra’s
and carbon emitted during congestion. In 2018, the total cost Algorithm from a control network scale and proposed a
of lost productivity due to congestion was found to be $87 shortest path algorithm based on the ellipse, which limits the
billion in the U.S.A., highlighting the massive effect of traffic search node collection in a certain area and greatly narrows
congestion on the global economy [3]. the search scale [14].
1 Vehicle Engineering Department, Jaguar Land Rover India Limited, Although the above studies tried to improve the efficiency of
Bengaluru 560 048, India
a Contributed equally
the Dijkstra algorithm, none of them actually solved the vehi-
b Present address: Department of Engineering, University of Cambridge, cle routing problem dynamically. The traffic density, average
Cambridge CB2 1PZ, UK speed on a patch of road, travel time and traffic flow keep
* Corresponding author (e-mail: [email protected]) changing dynamically, i.e., at nearly every instant. There is
need for a forward-looking traffic model that can predict the total weight of the shortest path to it from source, if a smaller
various traffic parameters in a road network at future time- distance is found in the iterative process. In this manner, the
steps and feed those in the form of adjacency matrices to shortest path from the source node to every other node in a
the routing algorithm. The routing algorithm itself needs to static graph can be found. Considering the graph shown in
be modified beyond the conventional Dijkstra’s algorithm, so the Figure 3 as an example, where the source and destination
that it can work with dynamic inputs and provide an optimal nodes are enumerated as 0 and 9 respectively. The highlighted
route calculated by taking into consideration the future traffic path, which has been arrived at by visiting neighbouring nodes
conditions in the road network. and iteratively updating their values, is the least weighted route
In this paper, traffic flow theory is used for developing a between the two nodes.
new routing algorithm based on the traffic model of the road
network. Consequently, Dijkstra’s algorithm is used here over
the A* algorithm, as it traverses through all the nodes of
the network. Fundamental diagrams from traffic flow theory
provide a good relation between traffic flow rate, traffic density
and average speed, that helps model traffic well. This paper
also uses the traffic flow conservation law to understand traffic
flow at junctions and a Gaussian probabilistic modelling for
external traffic inflows into the road network. Here, travel
times are chosen as the weights in the adjacency matrix
over which optimisation is carried out, instead of a common
metric like distance. This is because travel time is an all-
Fig. 3. Shortest Path on Weighted Graph using Dijkstra’s Algorithm
encompassing factor, calculation of which takes into consid-
eration all the traffic parameters in the road journey.
The rest of the paper is structured as follows. Section For the problem statement this paper attempts to solve,
II follows with the methodology used to modify Dijkstra’s the weights of the edges are dynamic and can change with
algorithm using traffic prediction. Section III discusses the time, in which is representative of a real traffic network.
implementation with the steps involved in generating and Here, the weight of an edge signifies travel time conforming
analysing the traffic. Section IV compares the proposed al- to traffic flow theory. The inputs to the proposed algorithm
gorithm with Dijkstra’s algorithm for various routes obtained are a graph,the source node number and the destination node
from real datasets, with concluding remarks in Section V. number. The graph is in the form of a dictionary with the
timestamps as keys and an adjacency matrix as the value at
II. M ETHODOLOGY
each key. The matrix is of Nth , where N is the total number
A. Dijkstra’s Algorithm of nodes in the graph, and the value of adj[i,j] gives the travel
Dijkstra’s algorithm is an algorithm used for finding the time between nodes i and j at the time instant t as given by the
path with the minimum sum of weights between two nodes in key. This matrix is obtained as an output from the prediction
a graph. A road network can be represented as a graph. Here, model, which is outlined further in the paper.
a ‘node’ represents a junction which connects two or more The algorithm is an iterative procedure that repeatedly
paths, and an ‘edge’ represents a road connecting the ‘nodes’ attempts to improve an initial approximation of the values of
[11]. Figures 1 and 2 below depict how a graph containing time[v]. The initial approximation is simply time[0] = 0 (as the
nodes and edges is generated from an underlying road network source node is indexed as 0) and time[v] = ∞ for v = 1, 2, . . . ,
obtained from Google Maps. (n-1). In each iteration, a new node is processed, and its time[v]
value is used to update the time[v] value of its immediate
successors if the time to reach them is lower through the parent
node v. Compared to standard Dijkstra’s algorithm, the visited
array is removed because this is a dynamic weights problem.
So, there might arise a condition where at a later time instant,
the weight of an edge falls, requiring the weights of all the
connected nodes to be updated, even if they were previously
visited. To keep a track of the path taken to reach a particular
Fig. 1. Actual Road Network Fig. 2. Derived Graph node minimally, there is a parent array, which is updated with
the new parent node if the path to reach the successor is lower
1) Modified Dynamic Weight Dijkstra’s Algorithm: Con- through the new node. When the destination node is reached,
ventional Dijkstra’s algorithm helps find the shortest path its neighbours are not pushed back into the queue since we
between a source node and a destination node in a static, will not leave the destination after reaching it, thus saving
weighted graph. The algorithm entails visiting each neighbour- computation cycles. The details of this are shown in Algorithm
ing node and updating its value, which is a measure of the 1.
Algorithm 1 Pseudocode for Modified Dynamic Dijkstra of the road per unit distance, and u(i,j) is the space mean speed
Input: Graph(dict), source node, destination node defined as the spatial average speed of all vehicles.
Initialisation : The conservation law states that the measurable parameters
1: for each node v do of an isolated physical system remain constant. In this system,
2: time[v] ← ∞ the conserved parameter is the number of vehicles on a given
3: parent[v] ← NULL stretch of road. Since the number of vehicles on a given stretch
4: end for of road between [x, x’] is constant, for there to be a change
5: time[source] ← 0 in the traffic density ρ, there must be an inflow or an outflow,
6: push(0, source) → Q such that the traffic flow is conserved, as illustrated in Figure
LOOP Process 4.
7: while Q not empty do
8: u ← node in Q with min time[u]
9: remove u from Q
10: for each neighbour v of u do
11: alt ← time[u] + TRAVELTIME[u, v] at time[u]
12: if alt < time[v] then
13: time[v] ← alt
14: parent[v] ← u
15: if v is not destination then
16: push(alt, v) → Q
Fig. 4. Conservation law illustration
17: end if
18: end if
19: end for In 1955, Lighthill, Whitman and Richards proposed a
20: end while
macroscopic traffic flow model known as the LWR model [15]
21: return time[], parent[]
[16]. According to this model, if a vehicle can be assumed to
be a molecule, then the traffic in the lane can be presented as
an incompressible fluid which cannot be compressed beyond a
certain density. Based on the conservation laws and the relation
In this case, Dijkstra’s algorithm would use the travel
between the traffic variables, traffic flow is represented by the
time[u, v] at time t = 0 which would give an initial path as well
model as follows
as a travel time. However, the traffic parameters would have
changed by the time a node u is reached. Hence, the travel ∂k ∂k
time at that time instant, which is the output of the prediction + Q0 (k) · = f (), (2)
∂t ∂x
model considering updated traffic parameters, is considered in where, k is the density, Q is the flux or the flow rate, and
this implementation. f () represents the source term which represents the inflow and
B. Prediction model outflow.
This methodology involves the representation of the system
1) Traffic Flow Theory: Traffic flow theory is used to in a state space form. The associated model then uses the
understand various parameters that help define the flow of conservation law and dynamic speed formula with a linear
traffic. The change in traffic parameters of a particular edge traffic stream model to study the traffic flow. The density and
over time is attributed to the flow of traffic in and out of the aggregate space mean speed are considered to be the state
corresponding lane. Each lane is represented as an edge and variables of interest in this model. The relative difference in
its weight is defined as the time taken to traverse the lane, the entry and exit flows is taken as the input variable and
which is directly dependent on the traffic in that lane and a the space mean speed is the output variable. The classified
few other factors as explained below. volume per minute and spot speeds are extracted from the
The travel time of the vehicle through a particular lane data collected, and the traffic variables, flow and space mean
depends on the length of the lane and the average speed, which speed, are calculated. The actual densities are calculated using
in turn depends on the traffic in that lane. Traffic flow theory an input-output analysis.
gives a relationship between the traffic flow rate q, density k Hence, the traffic flow at the next timestep is determined
and speed u given by by considering the present inflows and outflows.

q(i, j) = k(i, j) · u(i, j) (1) III. IMPLEMENTATION


A. Definitions
where, q(i,j) is the traffic flow rate between nodes i and j,
defined as the average number of vehicles passing a specific B. Prediction Pipeline
point per unit time. Similarly, k(i,j) is the traffic density, In this section, the architecture of the proposed prediction
defined as the average number of vehicles occupying a section model is briefly introduced. The prediction model consists
TABLE I TABLE II
D EFINITIONS C LASS I NFORMATION

Parameter Definition Class Parameters Significance


Unique number assigned to a given edge in Basic: ID, Latitude,
Edge ID
the graph for identification purpose. Longitude, Category Basic requirements
Node
Unique number assigned to a given node in Routing: Node connections,
Node ID Edge connections
the graph for identification purpose.
Edge thickness Width of the road represented by given edge. External Traffic: Gaussian mean,
Calculate external
Vehicle thickness Width of given vehicle. Gaussian sigma, Number of
traffic
Number of vehicles present on a unit length external vehicles
Traffic density Basic: ID, Start node, End node,
of road. Basic requirements
Edge traffic Traffic density on the given edge. Distance, Category
for graph
Traffic density calculated when traversing Edge Category: Thickness,
Edge forward traffic Free flow speed, Jam speed
from start node to end node of given edge.
Traffic density calculated when traversing Traffic: Forward traffic, Required to calculate
Edge backward traffic Backward traffic, current traffic flow in
from end node to start node of given edge.
Max allowed speed of vehicle when given Vehicle forward list, a particular edge and
Edge free flow speed edge is in free-flow state i.e., has very low Vehicle backward list to predict future traffic
traffic density. Output Parameters: Forward
Predict internal traffic
Max speed of vehicle when given edge is travel time, Backward travel
Edge jam speed flow
in jam state i.e., has very high traffic density. time
Hyper-parameters used for tuning prediction Basic: ID, Edge ID, Category,
α, β Class required to
model. State
Vehicle simulate traffic in the
Category: Thickness,
given road network
Maximum speed
Prediction: Current speed, Calculate current
Time to complete traffic on a
of two parts, data simulation and prediction, as shown in (current edge/road) given edge
Figure 5. The road network is forwarded to the data sim-
ulation component in a suitable format, which is then used
to generate data at time t = 0 and pass it to the prediction that enter the network from outside it are characterized as
component for predicting traffic flow at future time instances. external traffic, and the vehicle data generated at every node
The components are designed to be independent of each other. has an open edge for external traffic inflow. Thus, at time t
= 0, the graph and traffic data are provided to the prediction
component.

D. Prediction Component
The task of the prediction component is broken down as
predicting the future states of external and internal traffic.

1) External traffic: A Gaussian probability distribution


function (GPDF) is used here to simulate external traffic.
GPDFs are used to represent the probability distribution func-
tion of a normally distributed random variable, with a mean
µ and variance σ 2 .
The Gaussian equation is given by
Fig. 5. Prediction Model Pipeline
 2 !
1 1 x−µ
p(x) = √ exp − , ∀x ∈ X, (3)
σ 2π 2 σ
C. Input Data and Simulation
A road network represented in the form of a graph is fed as where, µ is the mean, σ 2 is the variance, and X is the domain
an input to the model. All the information about the graph is of the random variable.
organised into two files: one providing information about the High-order Gaussian process dynamical models for traffic
nodes and the other about the edges and edge weights. Table flow prediction [17] and a probabilistic model fusing multi-
2 provides details about various classes used in the model and source data on road traffic [18] are two models which use
their significance in the model. The classes described as basic Gaussian models extensively for both prediction and data
requirements are required for expressing the road network in aspects of their model. These have provided valuable insights
the form of a graph. The table also shows the parameters that and superior results regarding the use of Gaussian models
are used as outputs. in the vehicle routing problem. Hence, this study uses the
At time t = 0, the traffic data simulated consists of vehicle Gaussian model.
positions that are generated randomly over the graph by It is assumed that external traffic enters the road network
specifying the number of vehicles as an argument. Vehicles from a node at time t = 0. The value corresponding to the
TABLE III Step 3: Using the average speed of an edge and the edge
P REDICTION M ODEL length, the travel time for a particular edge is calculated and
Step Input Principles Output assigned as the edge-weight for that particular edge.
1
Vehicle positions
Flow conservation Traffic Density
3) Other background processes: When a vehicle reaches
Edge data the end of an edge, i.e., it reaches a node X, it needs to decide
Traffic density Average speed
2
Edge data
Fundamental diagrams
Traffic flow which edge it will travel along next. Hence, the model then
Average speed Distance-speed-time analyses the traffic in all the edges directly connected to node
3 Travel time
Edge weight equation X, by calling the function described in Algorithm 4 which
uses the transformation function defined in Algorithm 3. In
Algorithm 3, α and β are hyper-parameters used for tuning
number of vehicles about to enter the graph from a particular
the prediction model. In doing so, a probability distribution
node is used as the mean value for the GPDF, and the variance
is generated that is used to select the next edge to travel to.
is initialised in the range of 0 to 3. This is done for every node
A vehicle can also exit the network when it reaches an open
at which external traffic can enter the road network. After
node. In such a case, it chooses an edge with edge id = (-1).
every time instance, this step is repeated, and the number
Output: For every time instant, the predicted travel time for
of vehicles generated in the last iteration is assigned as the
every edge is assigned as the weight of that edge, and the
new mean for the GPDF for that node. Consequently, external
transformed graph is then passed on to the routing algorithm
traffic is generated at nodes in the graph and passed on to the
for route planning.
internal traffic component.
2) Internal Traffic: This section covers how internal traffic Algorithm 3 Transformation Function Logic
is predicted using the data provided at time t = 0. The graph
Input: Edge traffic
(road network) is received via data buses A1 and A3 from the
{two thresholds predefined, α and β where β > α, α and
Data and External traffic components, respectively, as shown in
β are thresholds for edge states
Figure 5. The steps for predicting the internal traffic specified
- traffic less than α ⇒ edge in free flow state
in Table 3 are as follows.
- traffic greater than α and less than β ⇒ edge is in normal
Step 1: Taking vehicle positions and edge data as argu-
flow state
ments, the model applies traffic flow conservation. Using the
- traffic greater than β ⇒ edge is in jam state
vehicle positions, it calculates the number of vehicles present
based on state, a quadratic functional diagram transforma-
along every edge. Furthermore, using vehicle characteristics
tion is applied on edge traffic and this transformed value
(like thickness) and edge characteristics, the traffic density is
is stored in result}
calculated at every edge. At this stage, the value assigned to
1: return result
the edge, i.e., the traffic along that edge, is the ratio of the
number of vehicles to the edge thickness.

Algorithm 2 Determine Speed of Vehicles Algorithm 4 Algorithm for Selecting Next Edge
Input: Traffic density Input: node X
1: K ← dictionary with edge id as key and traffic situation
Initialisation :
1: vret ← free-flow speed of the edge, where the vehicle is
as value
2: sum ← 0
present
3: for every edge E directly connected to node X do
2: curr tr dens ← traffic density × vehicle thickness
4: tr ← get value of traffic in that edge
curr tr dens 5: if node X ≡ start node of edge E then
3: curr tr dens ← × edge thickness 6: tr ← transformation function(E.forward traffic)
edge length
7: else
4: if curr tr dens < β & curr tr dens ≤ α then 8: tr ← transformation function(E.backward traffic)
5: vret ← (edge.free flow speed - edge.jam speed) × (1 9: end if
– curr tr dens) + edge.jam speed 10: K[E.id] = tr
6: else if curr tr dens > β then 11: sum += K[E.id]
7: vret ← jam speed of edge is assigned 12: end for{Normalising values in K}
8: end if 13: for every edge E id in K do
9: return vret {speed value for vehicle returned} 14: K[E.id]/ = sum
10: return time[ ], parent[ ] 15: end for{Using these values assigned for every directly
connected edge in dictionary K as probabilities}
Step 2: Using the traffic densities, the speed of every vehicle 16: choice = random.choices(node connections, weights=k)
is calculated using the function shown in Algorithm 2. The {this returns chosen edge id}
average speed is then calculated by taking the mean of the 17: return choice
speed of all vehicles along that particular edge.
IV. EXPERIMENTATION, RESULTS AND
OBSERVATIONS
In the dataset [19] used for testing, the road networks of five
major cities of the globe are expressed in the form of a graph.
The junctions are exhibited as nodes, and the roads connecting
them as edges. The rationale behind using this dataset for road
networks is to calibrate and evaluate the model on data which Fig. 7. Road Network at t = 6 Fig. 8. Road Network at t = 8
mimics real life road networks and traffic conditions as much
as possible. As this dataset is designed to replicate actual road
networks, it serves as an ideal data feed for the model.

Fig. 9. Road Network at t = 20 Fig. 10. Road Network at t = 32

of that edge at a particular time instant. The change from one


time stamp to another can be considered as a transition. The
eights of those edges that are permissible and are under evalua-
tion at that time stamp are highlighted in bold and underlined.
The weights of those edges that constitute the optimal path
Fig. 6. Road Network at t = 0
selected by the proposed algorithm are highlighted in yellow.
As covered in the input data and simulation component of A. Comparison
the prediction pipeline in Section 3, random traffic data is Comparing results from Dijkstra’s algorithm and the routing
generated over the road network. The model is tested with algorithm proposed in this paper, the final paths selected by
different hsource node, destination nodei pairs to get the total both can be seen in Figures 13 and 14, respectively.
travel time as an output for both, the model proposed in this A comparative analysis of the above results is carried out
paper and Dijkstra’s algorithm. next. When using Dijkstra’s algorithm, the shortest path has a
In the case of conventional Dijkstra’s algorithm, the shortest total travel time of 46 units. Whereas when using the proposed
path is computed by applying the unmodified routing algo- dynamic routing algorithm with from the traffic prediction
rithm on the graph shown in Figure 7 at t = 0, without con- model, the shortest path is [ 0 → 1 → 3 → 7 → 9 ], with a
sidering the dynamic nature of traffic and resulting dynamic total travel time of 36 units. This comparison shows that the
edge weights. final path determined by the proposed algorithm is shorter in
Figures 8 and 9 depict the implementation of the proposed terms of travel time as compared to the one obtained without
routing algorithm. This algorithm considers the dynamic na- considering predicted traffic flows. In this case, the new model
ture of traffic over the road network in subsequent timestamps. leads to a 21.7% decrease in travel time by simply looking
It computes the total time required for every route to reach forward in time for traffic movement.
destination node by considering the traffic at future time steps
from the prediction model. All the possible edge combinations
at different time stamps are computed to obtain the shortest TABLE IV
DYNAMIC W EIGHTS OF E DGES ON T RANSITIONS
route.
As seen in the graph, there are two possible paths from the Time t=0 t=6 t=8 t=14 t=18 t=18 t=20 t=32
source node 0, E0-1 and E0-2 . The proposed algorithm evaluates Stamp/
Edges
each of these two edges at t = 0, and then further evaluates E0-1 8 1 1 8 8 8 1 8
the following edges at corresponding future time stamps based E0-2 6 3 2 3 2 2 2 2
on the dynamic traffic and edge weight inputs from prediction E1-3 12 13 12 16 15 15 14 14
model. The detailed computation data is presented in Table 4. E1-4 6 5 6 5 5 5 5 5
E2-4 8 16 11 11 1 1 7 7
The graph changes at every time instant, as the weights of E2-5 16 12 12 12 12 12 12 12
the edges of the graph change with time. The proposed routing E3-6 13 4 4 4 4 4 4 4
algorithm evaluates all the dynamic weights and time stamp E3-7 12 12 12 14 16 16 12 14
E4-6 6 6 4 4 4 4 4 4
permutations to determine the shortest path from source to E5-8 17 17 17 17 17 17 17 21
destination, as shown in Figures 10 and 11. E6-9 23 23 23 23 23 23 7 7
Table 4 shows the weights of the edges as rows and time E7-9 16 7 7 11 7 7 7 4
stamps as columns. The value in each cell denotes the weight E8-9 17 15 15 15 15 15 15 15
Note: In Figure 13, the arbitrariness in results can be
attributed to a difference in choice of next edge for the vehicle
between simulations for different α-β values.

Fig. 11. Shortest path using conventional Dijkstra

Fig. 13. Mean time difference between the proposed algoritm and Dijkstra’s
Fig. 12. Shortest path using modified dynamic Dijkstra algorithm with varying values of α and β

B. Further Experiments and Results V. C ONCLUSION


As mentioned earlier, the road network for the city of This paper extended Dijkstra’s algorithm to solve the dy-
California is used in the form of a graph as an input to namic vehicle routing problem by incorporating traffic move-
the model. From the total of 21,047 nodes and 21,692 edges ment prediction in the planning stage. It was shown that the
present in the graph a subset of 80 nodes and 150 edges are weights derived from the traffic flow data dynamically affect
chosen as our experimentation set. the calculations in Dijkstra’s algorithm based on time. The
In the input data and simulation component of the prediction simulation results showed that compared to standard Dijkstra’s
pipeline, random traffic data is generated over the road net- algorithm that only considers static traffic data, the proposed
work. The model is tested with the specified graph and around routing algorithm with traffic prediction gives optimal routes
10,000 different hsource node, destination nodei pairs to get with a significant reduction in travel time with flowing traffic.
the average difference between the least travel time returned This algorithm can be modified in the future for several
by the proposed routing algorithm and conventional Dijkstra’s applications and specializations of the vehicle routing problem
algorithm. The average difference parameter is given by by adding constraints pertaining to specific use cases.

N
VI. ACKNOWLEDGEMENT
X Ti − τi
λ= (4) The authors would like to thank Mr. Piyush Laddha (Soft-
i=1
N ware Product Manager, Jaguar Land Rover India) and Mr.
where, Terence Soares (Software Architect, Jaguar Land Rover India)
for their continued support, guidance and encouragement
λ = Average difference throughout the project. The authors also thank Ms. Isabella
τi = Travel time by proposed algorithm for ith test case Panela (Senior Manager, Jaguar Land Rover Ireland), Mr.
Ti = Travel time by Dijkstra’s algorithm for ith test case Sravan Kallam (Senior Engineer ADAS, Jaguar Land Rover
N = Total number of test cases Ireland) and Dr. Damien Dooley (former Senior Engineer
The average travel time difference is recorded to be 387 ADAS, Jaguar Land Rover Ireland) for reviewing the work
seconds, i.e., 6.45 minutes. Model performance was also anal- and providing valuable feedback for the team to work on. This
ysed for different values of α and β, and the results achieved work was supported by Jaguar Land Rover.
are shown in Figure 15. This depicts the significant deduction R EFERENCES
in travel time achieved when using the proposed routing
[1] R. W. Caves, Encyclopedia of the City. Routledge, 2004.
algorithm with traffic prediction as compared to conventional [2] S. Çolak, A. Lima, and M. C. González, “Understanding congested travel
Dijkstra’s algorithm. in urban areas,” Nature communications, vol. 7, no. 1, pp. 1–8, 2016.
[3] T. Afrin and N. Yodo, “A survey of road traffic congestion measures
towards a sustainable and resilient transportation system,” Sustainability,
vol. 12, no. 11, p. 4660, 2020.
[4] D. Braess, A. Nagurney, and T. Wakolbinger, “On a paradox of traffic
planning,” Transportation science, vol. 39, no. 4, pp. 446–450, 2005.
[5] H. Xue, S. Jiang, and B. Liang, “A study on the model of traffic flow
and vehicle exhaust emission,” Mathematical Problems in Engineering,
vol. 2013, 2013.
[6] K. Zhang and S. Batterman, “Air pollution and health risks due to vehicle
traffic,” Science of the total Environment, vol. 450, pp. 307–316, 2013.
[7] M. Zuurbier, G. Hoek, M. Oldenwening, K. Meliefste, P. van den Hazel,
and B. Brunekreef, “Respiratory effects of commuters’ exposure to air
pollution in traffic,” Epidemiology, pp. 219–227, 2011.
[8] R. Bellman, “On a routing problem,” Quarterly of applied mathematics,
vol. 16, no. 1, pp. 87–90, 1958.
[9] P. E. Hart, N. J. Nilsson, and B. Raphael, “A formal basis for the heuristic
determination of minimum cost paths,” IEEE transactions on Systems
Science and Cybernetics, vol. 4, no. 2, pp. 100–107, 1968.
[10] R. W. Floyd, “Algorithm 97: shortest path,” Communications of the
ACM, vol. 5, no. 6, p. 345, 1962.
[11] E. W. Dijkstra et al., “A note on two problems in connexion with graphs,”
Numerische mathematik, vol. 1, no. 1, pp. 269–271, 1959.
[12] G. Xiaoxue et al., “Optimal route planning of parking lot based on
dijkstra algorithm,” in 2017 International Conference on Robots &
Intelligent System (ICRIS), pp. 221–224, IEEE, 2017.
[13] A. R. Soltani, H. Tawfik, J. Y. Goulermas, and T. Fernando, “Path
planning in construction sites: performance evaluation of the Dijkstra,
A?, and GA search algorithms,” Advanced engineering informatics,
vol. 16, no. 4, pp. 291–303, 2002.
[14] H. Wei, S. Zhang, and X. He, “Shortest path algorithm in dynamic
restricted area based on unidirectional road network model,” Sensors,
vol. 21, no. 1, p. 203, 2020.
[15] M. J. Lighthill and G. B. Whitham, “On kinematic waves ii. a theory of
traffic flow on long crowded roads,” Proceedings of the Royal Society
of London. Series A. Mathematical and Physical Sciences, vol. 229,
no. 1178, pp. 317–345, 1955.
[16] A. Ali, L. S. Andallah, et al., “Inflow outflow effect and shock wave
analysis in a traffic flow simulation,” American Journal of Computa-
tional Mathematics, vol. 6, no. 02, p. 55, 2016.
[17] J. Zhao and S. Sun, “High-order gaussian process dynamical models for
traffic flow prediction,” IEEE Transactions on Intelligent Transportation
Systems, vol. 17, no. 7, pp. 2014–2019, 2016.
[18] L. Lin, J. Li, F. Chen, J. Ye, and J. Huai, “Road traffic speed prediction:
a probabilistic model fusing multi-source data,” IEEE Transactions on
Knowledge and Data Engineering, vol. 30, no. 7, pp. 1310–1323, 2017.
[19] Department of Computer Science, The University of Utah, “Real datasets
for spatial databases: Road networks and points of interest,” 2005. data
retrieved from The University of Utah.

You might also like