Professional Documents
Culture Documents
Dynamic Traffic (Final Year Project - Conor O' Neill) PDF
Dynamic Traffic (Final Year Project - Conor O' Neill) PDF
Models
By
Conor O’ Neill
2015
Sciences
Supervised by
Table of Contents
Introduction ............................................................................................................................... 3
Chapter 1: Background .............................................................................................................. 7
1.1 What is a traffic flow model? ........................................................................................... 7
1.2 A Physical Interpretation of Differential Equations ......................................................... 9
1.2.1 Ordinary Differential Equations ................................................................................ 9
1.2.2 Partial Differential Equations .................................................................................. 10
1.3 The Method of Characteristics....................................................................................... 12
1.3.1 The Nature of Solutions to PDEs ............................................................................. 12
1.3.2 Geometric Approach to Characteristics .................................................................. 14
1.3.3 Parameterisation ..................................................................................................... 15
1.3.4 Algebraic Approach ................................................................................................. 19
Chapter 2: The Simple Traffic Flow Model .............................................................................. 22
2.1 Conservation of Mass .................................................................................................... 24
2.2 Linear Model of Velocity ................................................................................................ 26
2.3 Characteristics................................................................................................................ 29
2.4 The Simple Model in Motion ......................................................................................... 31
Chapter 3: Other Models and Shocks ...................................................................................... 37
3.1 LWR models ................................................................................................................... 37
3.2 Shocks ............................................................................................................................ 41
3.3 Characteristic Lines and Shocks ..................................................................................... 48
Conclusion ............................................................................................................................... 55
Appendix .................................................................................................................................. 56
Chapter 1 Graphs ................................................................................................................. 56
Chapter 2 Graphs ................................................................................................................. 56
Chapter 3 Graphs ................................................................................................................. 57
References ............................................................................................................................... 60
2
Dynamic Traffic: Simple Traffic Flow Models
Declaration
I certify that this Project which I now submit for examination in partial fulfilment of
the requirements for the award of BSc (Honours) Mathematical Sciences is entirely
my own work and has not been taken from the work of others save and to the
extent that such work has been cited and acknowledged within the text of my work.
This project was prepared according to the regulations of the Dublin Institute of
Technology.
Signed:________________________________
Date: ________________
3
Dynamic Traffic: Simple Traffic Flow Models
Acknowledgements
A great deal of thanks is owed to all those who have helped me and guided me
writing this project the last year. Thank you to my friends and family, particularly
my mother Elizabeth O’ Neill and my girlfriend, Laura Nic Aodh, who have given
me the focus to apply myself fully to my college work and the support to keep me
optimistic.
Thanks also to my supervisor, Dr. Chris Hills who has given me guidance and
encouragement throughout the writing of this report which has been invaluable.
4
Dynamic Traffic: Simple Traffic Flow Models
Introduction
In 2011, an international survey was carried out by The World Bank Group[1] which
estimated that there are 0.491 road motor vehicles per person in Ireland. In some
countries this ratio is greater than 1. Road traffic is a common backdrop to the
modern age and the patterns inherent therein are intrinsically mathematical.
Day to day, we see gridlock in city centres and we hear debates about the efficiency
of different traffic solutions such as roundabouts and motorways. We read about
traffic jams and road accidents in newspapers. Granted, much of the time these
problems are caused by unusual factors such as road works or sporting events but
some of the time the problem is infrastructure. There are sharp turns with poor
visibility that cause accidents but how much visibility is enough and how many
speed bumps are enough?
5
Dynamic Traffic: Simple Traffic Flow Models
The nature of modelling will be discussed. The background theories behind the
models used in this project will be explained and contextualised. The flaws in these
theories will be examined and demonstrated as well as their strengths.
This project will require significant research on my part into both traffic systems,
the modelling methods to be used, partial differential equations and visual
programming for mathematics. This project will present its material in a manner
suitable for students in their fourth year of an undergraduate degree in
mathematics. The visual aids in this project will be digitally drawn using the
technical computing environment Maple using flexible and robust algorithms. The
code for these drawings will be added to the appendix and will be formatted in such
a way as to make the changing of key variables in important formulae simple and
intuitive.
6
Dynamic Traffic: Simple Traffic Flow Models
Chapter 1: Background
conditions of the problem. Similarly to ODEs, PDEs may have initial and boundary
conditions.
8
Dynamic Traffic: Simple Traffic Flow Models
𝑑𝑠
=𝑣 (1.1)
𝑑𝑡
This describes a system where the variable 𝑠 changes with respect to the variable 𝑡
at a rate 𝑣. If 𝑠 is defined as the distance from an initial point and 𝑡 is defined as
time, 𝑣 is then the rate of change of distance with respect to time. In this context, 𝑣
is velocity.
This interpretation is literal and can be used to describe a body in motion. Further,
the second derivative of 𝑠 with respect to time can be taken, arriving at the rate of
change of speed with respect to time, i.e. acceleration.
9
Dynamic Traffic: Simple Traffic Flow Models
By examining figures 1.2.1 and 1.2.2, one can see how 𝑠 increases over time in a non-
1
linear way. The equation used to generate this graph was 𝑠 = 2 𝑡 2 . The vertical axis
𝑑𝑠
in figure 1.2.2 is 𝑑𝑡 = 𝑡 and can be thought of as the slope of figure 1.2.1. In other
words, figure 1.2.2 graphs the rate of change of velocity and the appearance of a
non-linear change in distance over time in figure 1.2.1 is due to acceleration.
Equation (1.1) is simply a scientific definition of velocity but in the models we will
construct later, there will be functions that have rates of change in more than one
variable such as density. Hence more advanced techniques must be employed to
describe them, namely partial differential equations.
10
Dynamic Traffic: Simple Traffic Flow Models
changes in both of those variables. In general terms, PDES can be used to describe
how a dynamic system varies. The following PDE describes such a dynamic system:
𝜕𝑢 𝜕𝑢
𝑎(𝑥, 𝑦) + 𝑏(𝑥, 𝑦) + 𝑐(𝑥, 𝑦)𝑢(𝑥, 𝑦) = 𝑑(𝑥, 𝑦). (1.2)
𝜕𝑥 𝜕𝑦
In this general, first order, linear PDE, 𝑎, 𝑏, 𝑐 and 𝑑 are functions of 𝑥 and 𝑦 and 𝑧 =
𝑢(𝑥, 𝑦) is a surface with height z at the point (x, y). The equation combines the
derivatives of the height with respect to x and y with particular coefficient functions
to accurately describe the surface.
Let us now discuss a method of solving PDEs particularly important to this project.
11
Dynamic Traffic: Simple Traffic Flow Models
𝜕𝑢 𝜕𝑢
𝑦 + 5x + 𝑥2𝑢 = 0
𝜕𝑥 𝜕𝑦
3
𝜕 2 𝑢 𝜕𝑢 𝜕 2 𝑢 𝜕𝑢 2 𝜕𝑢 2
𝑢 + +𝑢+( ) −( ) = 𝑥
𝜕𝑥 2 𝜕𝑥 𝜕𝑦 2 𝜕𝑥 𝜕𝑦
is a quasi-linear PDE of degree 2. The coefficients of the second derivatives are all
functions of 𝑥, 𝑦, 𝑢, 𝑢𝑥 and 𝑢𝑦 that is, functions of the independent variables and
derivatives of the dependant variable lower than 2. Notice derivatives of dependant
variables lower than 𝑛 (𝑛 = 2 in the above case) can appear outside of the
aforementioned coefficients as part of non-linear functions.
The method of characteristics works by reducing the PDE to a set of ODEs which
can be solved more simply. We will find an expression that tells us how 𝑢 changes
along special curves called characteristic curves and by “stitching” them together,
we can form the solution surface. These curves will be found using initial
conditions, boundary conditions and parameterisation.
12
Dynamic Traffic: Simple Traffic Flow Models
solution to a two dimensional PDE (equation 1.3) under initial conditions (which
will be discussed in section 1.3.4) and its solution surface.
is satisfied by
𝑢(𝑥, 𝑦) = 𝑥 + 𝑦 + 𝑥 2 + 𝑦 2 .
The equation 𝑧 = 𝑢(𝑥, 𝑦) uses the solution function to graph a surface in three
dimensions that allows us to visualise the solution. This surfaced is graphed in
Figure 1.3.1 below.
Fig. 1.3.1 A 3D visualisation of the solution surface to (1.3). See appendix for maple
script
13
Dynamic Traffic: Simple Traffic Flow Models
Note that the surface in figure 1.3.1 is only one possible representation of the
solution. For instance, we may think of one of the independent variables to be time
and use an electronic environment such as maple to animate the evolution of the
function as time passes. This is shown in the 3rd maple script in the appendix which
lets 𝑡𝑖𝑚𝑒 = 𝑦. Animations done in this way are analogous to the surface. The
animation could be understood simply as a display of the cross-section of the
equivalent surface changing in values for the time variable. The animation scripted
in this report looks at the cross-section which shows only the 𝑥 and 𝑧 axis in the
range 𝑦 = [−5,5].
This PDE can be expressed, as the dot product of the coefficient vector and the
gradient vector equal to zero as follows,
𝑎(𝑥, 𝑦, 𝑢) 𝑢𝑥 𝑎(𝑥, 𝑦, 𝑢) 𝑢𝑥
[𝑏(𝑥, 𝑦, 𝑢)] . [ 𝑢𝑦 ] = 0 ↔ [𝑏(𝑥, 𝑦, 𝑢)] ⊥ [ 𝑢𝑦 ].
𝑐(𝑥, 𝑦, 𝑢) −1 𝑐(𝑥, 𝑦, 𝑢) −1
This expression also states that the two vectors are orthogonal, which is important
to note. The gradient vector is comprised of the first derivatives of 𝑢 with respect to
14
Dynamic Traffic: Simple Traffic Flow Models
each of its independent variables. At any particular point (𝑥, 𝑦, 𝑢), the gradient can
be evaluated by substituting the particular values for 𝑥 and 𝑦. The resulting vector
describes the direction of the steepest increase in 𝑢 (in two dimensions this is
commonly referred to as slope). In other words, the gradient vector describes the
overall rate of change of the function at a point (𝑥, 𝑦, 𝑢).
𝑢𝑥
𝑢
In order to understand the relation between [ 𝑦 ] and the solution surface, let 𝑆 be
−1
a surface defined implicitly as 𝑆(𝑥, 𝑦, 𝑧) = 𝑢(𝑥, 𝑦) − 𝑧. Notice how if 𝑆 = 0, 𝑧 =
𝑢(𝑥, 𝑦). It can also be seen from this equation that 𝑆𝑥 = 𝑢𝑥 , 𝑆𝑦 = 𝑢𝑦 and 𝑆𝑧 = −1.
i.e.
𝑆𝑥 𝑢𝑥
[𝑆𝑦 ] = [ 𝑢𝑦 ] = ∆𝑆
𝑆𝑧 −1
1.3.3 Parameterisation
In geometry, parameterisation is the practice of creating a set of one or more
variables which can be use to describe a geometric object or surface. In the
15
Dynamic Traffic: Simple Traffic Flow Models
Cartesian plane, 𝑥 and 𝑦 may be functions of these variables. One parameter could
be used to denote the distance along a curve while it would take at least two to
describe position on a surface. For instance, consider the following
parameterisation.
𝑦(𝑠) = 𝑠 2 , 𝑥(𝑠) = 𝑠 − 1
𝑠 =𝑥+1
=> 𝑦 = (𝑥 + 1)2
In other words, 𝑠 may be units of lenth along the curve 𝑦 = (𝑥 + 1)2 . We may also
inspect the rate of change of 𝑥 and 𝑦 along the curve by calculating
𝑑𝑦 𝑑𝑥
= 2𝑠 and =1
𝑑𝑠 𝑑𝑠
shape of the characteristic curves. We can integrate to find the union of these
curves to create the solution surface. The method of characteristics is illustrated in
the following example.
Example 1.1:
𝑢𝑥 + 𝑢𝑦 = 𝑢
𝑥 ′ (𝑠) = 1
𝑦 ′ (𝑠) = 1
𝑢′ (𝑠) = 𝑢
𝑥(𝑠) = 𝑠 + 𝛼 (1.8)
𝑦(𝑠) = 𝑠 + 𝛽 (1.9)
𝑢(𝑠) = 𝛾𝑒 𝑠 (1.10)
𝑦 = 𝑥 + 𝐴 where 𝐴 = 𝛽 − 𝛼
We know now that the characteristics are parallel straight lines. We can also
eliminate 𝑠 in equation (1.10) to get
𝑢 = 𝐵𝑒 𝑥 (1.11)
17
Dynamic Traffic: Simple Traffic Flow Models
where 𝐵 = 𝛾𝑒 −𝛼
𝐵 = 𝑓(𝐴)
=> 𝑢 = 𝑓(𝑦 − 𝑥)𝑒 𝑥 (1.12)
The function 𝑓 here is unknown but can be found using initial conditions. For
instance, let
𝑢 = 1 on 𝑦 = 0
This condition gives the value for 𝑢 along the 𝑥 axis which can be used to
extrapolate the value for 𝑢 at all points. This is done by using the initial condition to
discover the nature of the function 𝑓. When 𝑦 = 0, we get
𝑢 = 𝑓(0 − 𝑥)𝑒 𝑥 = 1
=> 𝑓(−𝑥) = 𝑒 −𝑥
=> 𝑓(𝑥) = 𝑒 𝑥
By implementing the boundary conditions and solving equation (1.12) for 𝑓(𝑥), we
can re-write 𝑓(𝑦 − 𝑥) and get the particular solution
𝑢 = 𝑒 𝑦−𝑥 𝑒 𝑥
=> 𝑢 = 𝑒 𝑦 .
18
Dynamic Traffic: Simple Traffic Flow Models
𝑑𝑥 𝑑𝑦 𝑑𝑢 (1.13)
𝑑𝑠 = = =
𝑎 𝑏 𝑐
Two pairs of these alternative parametric equations can be integrated and solved to
find two functions 𝜑(𝑥, 𝑦, 𝑢) and 𝜔(𝑥, 𝑦, 𝑢). The general solution is then given by an
arbitrary function 𝐹(𝜑, 𝜔). The process is very much the same as the geometric
approach in section 1.2.2. The key difference being we avoid the parameter 𝑠 and
instead use differential algebra to arrive at the functions 𝜑 and 𝜔.
Example 1.2:
𝑥𝑢𝑥 + 𝑦𝑢𝑦 − 𝑢 − 1 = 0
𝑑𝑥 𝑑𝑦 𝑑𝑢
= =
𝑥 𝑦 𝑢+1
19
Dynamic Traffic: Simple Traffic Flow Models
𝑑𝑥 𝑑𝑦
=
𝑥 𝑦
𝑥
=> 𝑦 2 𝑑 ( ) = 0
𝑦
𝑥
=> 𝑑𝜑 = 𝑑 ( ) = 0
𝑦
𝑥
=> 𝑑𝜑 =
𝑦
𝑑𝑥 𝑑𝑢
=
𝑥 𝑢+1
𝑥
=> 𝑑( ) = 0 = 𝑑𝜔
𝑢+1
Thus
𝑦 𝑢+1
𝜑 = 𝑥 and 𝜔 = 𝑥
20
Dynamic Traffic: Simple Traffic Flow Models
𝑦
𝑢 = 𝑥𝑓 ( ) − 1
𝑥
This point in the solution process is equivalent to equation (1.12) in the problem in
section 1.2.2. The method of characteristics will come up again throughout this
project in order to better explain and work with the mathematics that will arise.
21
Dynamic Traffic: Simple Traffic Flow Models
This chapter will explain some of the core concepts around which the models in this
project are built. This chapter will also introduce the first model we will study, the
Greenshield model. The method of characteristics will be applied here to develop
some of the mathematics being studied in order to understand how to use traffic
models like Greenshield’s. We will also construct an initial traffic density
distribution and observe how it changes over time.
The models in this report will describe ρ, traffic density. Traffic density is a measure
of the number or cars per unit distance along a road. In figure 2.0.1 above, traffic
density in the region [𝑎, 𝑏] is less than in [𝑏, 𝑐]. This is because the region [b,c] has
less space between cars i.e. more cars per unit of distance. Density is a non-negative
function and in these models will be a function of two variables, position and time.
We focus on traffic density as the variable of interest because it most directly relates
to congestion and allows us to observe the traffic system as a whole. Alternative
methods follow a single car or focus on particular patterns within the system such
as particularly dense clusters of cars and treat them as travelling waves of
congestion.
In these models, ρ will vary with respect to both position in a system and time.
Models will also be constructed to describe the velocity of cars at a certain point
and time in terms of ρ. What follows is an explanation of the initial, intuitive
models from which more complex, realistic models will be devised. These later
22
Dynamic Traffic: Simple Traffic Flow Models
models will explore factors like drivers being aware of the density ahead of them
and how traffic density changes as traffic lights turn green or red.
Firstly, let us consider the simple model. In order to construct a model one must
consider the physical system in question. It is necessary to identify a rule or physical
law that the system abides by and then express that law mathematically in context.
23
Dynamic Traffic: Simple Traffic Flow Models
The law of conservation of mass states “in the absence of a source or a sink, the
total mass of any material system is neither increased nor diminished by reactions
between the parts”. The use of the term ‘mass’ in physics refers to the amount of
matter in a system but in the context of this project, when discussing the
conservation of mass, it means traffic density. The most important implication of
this law is that any change to the total mass of the system must result from mass
being added to or removed from the system.
The concept of the conservation of mass is simply that cars along this stretch of
road cannot be created or destroyed nor can they enter or leave the system except
at the points x and x + 𝛿𝑥. The change in density over a time 𝛿𝑥 is demonstrated in
figure 2.1.1 below. The fields either side of [𝑥, 𝑥 + 𝛿𝑥] show a change in cars i.e. the
blue cars to the right in the first image represent the movement that is about to
take place of the two blue cars from the centre region.
Fig. 2.1.1 shows a length of road [𝑥, 𝑥 + 𝛿𝑥] and the movement of cars in and out.
This leads to the conclusion that the change in the number of cars on the road over
a time 𝛿𝑡 is simply the number of cars on the road at time 𝑡 + 𝜕𝑡 minus the number
of cars present at time 𝑡. The expression for the number of cars in a stretch of road
of length 𝛿𝑥 is approximately ρ(𝑥, 𝑡)𝛿𝑥. We now formulate the change in the
number of cars over a period of time 𝛿𝑡 to be
24
Dynamic Traffic: Simple Traffic Flow Models
The distance cars travel in time 𝛿𝑡, denoted 𝛿𝑠, is given by 𝛿𝑠 = 𝑣𝛿𝑡 where 𝑣 is the
velocity of the cars and is non-negative.
The change in the number of cars on the road over a time 𝛿𝑡 is simply the number
of cars that have entered at the point 𝑥 minus the number that have left at the point
𝑥 + 𝛿𝑥. The number of cars passing through the point 𝑥, thus entering the region, in
time 𝛿𝑡 is given by the number of cars per unit of distance times distance travelled
in that time. i.e.
ρ(𝑥, 𝑡)𝑣𝛿𝑡|𝑥 .
This leads to the second expression for change in the number of cars which is as
follows:
Equations (2.1) and (2.2) can be equated as they are both expressions for the
change in the number of cars in the system derived from the law of conservation of
mass.
By simplifying the resulting equation, allowing 𝛿𝑥 and 𝛿𝑡 to tend to zero and solving
for 𝜕ρ/ 𝜕𝑡 gives:
𝜕ρ 𝜕(ρv)
+ = 0. (2.3)
𝜕𝑡 𝜕𝑥
This equation is general and simply describes a natural relationship between these
rates of change. One can see from equation (2.3) that the velocity 𝑣 is a critical
component of the equation and how we model 𝑣 will have a significant impact on
25
Dynamic Traffic: Simple Traffic Flow Models
the nature of the model. Let us now explore one way to do this, called the linear
model of velocity particularly, the Greenshield model.
The velocity of cars can be described in terms of the other variables we have
discussed in previous sections.
Velocity may change with respect to 𝑥. In reality, drivers make changes to the speed
of their car due to their position on the road. Coming up to a turn or on an incline,
they may slow down or be forced to by speed bumps. Any vehicle undergoing a
change in velocity goes so over a distance, however the models we will discuss may
not reflect this as they do not follow individual cars.
Consider now how velocity might change with respect to time. At different times of
day, speed may be limited differently. At night, visibility is lower and so a driver’s
desired speed is lower for safety. For a car undergoing acceleration, velocity changes
over time. Additionally, for a car in motion, as time changes so does position, which
has already been identified as an important variable when considering velocity.
Velocity also changes with respect to density as cars in a congested length of road
must travel slower than those on a road free of other cars.
The first model we will construct, the Greenshield model, considers velocity to
change with respect to ρ alone.
How a model defines velocity varies depending on what concepts are being
considered and neglected. For example, one might consider drivers to react
instantly to changes in their environment. All such considerations should be
directly reflected by the model.
The linear velocity model is so called because velocity changes linearly with another
variable, in this case 𝜌(𝑥, 𝑡). The considerations for Greenshield’s model are
26
Dynamic Traffic: Simple Traffic Flow Models
𝜌
𝑣 = 𝑐 (1 − ) (2.4)
𝜌0
In this model, c is the speed limit and 𝜌0 is maximum density, a constant. This
succinct equation describes every concept we outlined in the paragraph above and
in equation (2.3), 𝑣 can be replaced with this expression.
𝜕𝜌 𝜕 𝜌
+ (𝜌𝑐 (1 − )) = 0
𝜕𝑡 𝜕𝑥 𝜌0
𝜕𝜌2
𝜕𝜌 𝜕𝜌
=> + 𝑐 ( − 𝜕𝑥 ) = 0
𝜕𝑡 𝜕𝑥 𝜌0
𝜕𝜌2 𝜕𝜌 𝜕𝜌2 𝜕𝜌
= = 2𝜌
𝜕𝑥 𝜕𝑥 𝜕𝜌 𝜕𝑥
27
Dynamic Traffic: Simple Traffic Flow Models
𝜕ρ 𝜕(ρv) 𝜕𝜌 2𝜌 𝜕𝜌
=> + = + 𝑐 (1 − )
𝜕𝑡 𝜕𝑥 𝜕𝑡 𝜌0 𝜕𝑥
𝜕𝜌 2𝜌 𝜕𝜌
=> + 𝑐 (1 − ) =0 (2.5)
𝜕𝑡 𝜌0 𝜕𝑥
28
Dynamic Traffic: Simple Traffic Flow Models
2.3 Characteristics
Let us examine the nature of the characteristic curves of the PDE in equation (2.5).
The equation
𝜕𝜌 2𝜌 𝜕𝜌
+ 𝑐 (1 − ) =0
𝜕𝑡 𝜌0 𝜕𝑥
2𝜌
𝑎(𝑥, 𝑦, 𝑢) 𝑐 (1 − )
[𝑏(𝑥, 𝑦, 𝑢)] = [ 𝜌0 ].
𝑐(𝑥, 𝑦, 𝑢) 1
0
2𝜌
𝑥 ′ (𝑠) = 𝑐 (1 − ),
𝜌0
𝑡 ′ (𝑠) = 1,
𝜌′ (𝑠) = 0.
𝑡 =𝑠+𝑎
2𝜌
𝑥 = 𝑐 (1 − )𝑠 + 𝑏
𝜌0
𝜌=𝐴
29
Dynamic Traffic: Simple Traffic Flow Models
𝑠 =𝑡−𝑎
2𝜌
=> 𝑥 = 𝑐 (1 − ) (𝑡 − 𝑎) + 𝑏
𝜌0
2𝜌 2𝜌
=> 𝑥 = 𝑐 (1 − ) 𝑡 − 𝑎𝑐 (1 − ) + 𝑏
𝜌0 𝜌0
Since 𝜌 = 𝐴, a constant,
2𝜌
=> 𝑏 − 𝑎𝑐 (1 − )=𝐵
𝜌0
for some constant 𝐵.
2𝐴
=> 𝑥 = 𝑐 (1 − )𝑡 + 𝐵 (2.6)
𝜌0
This expression describes straight lines on the 𝑥 − 𝑡 plane, differing in their value
for 𝐴 and 𝐵 only. These are the characteristic curves that arise from using the linear
velocity model described in section 2.2. As shown in section 1.3.3, The constants B
and A may be expressed in terms of one another.
𝐴 = 𝑓(𝐵)
2𝜌
𝜌(𝑥, 𝑡) = 𝑓 (𝑥 − 𝑐 (1 − ) 𝑡) (2.7)
𝜌0
Using this equation, we can now explore how traffic density evolves over time by
constructing initial conditions.
30
Dynamic Traffic: Simple Traffic Flow Models
In this section we will use equation (2.7) to create distributions of density along a
stretch of road (i.e. in the 𝑥-𝜌 plane). First, we will let 𝑡 = 0 and make a distribution
based on the resulting expression 𝜌(𝑥, 0) = 𝑓(𝑥). We will then generalise that
distribution for 𝜌(𝑥, 𝑡).
𝜌0 𝑥<0
𝜌(𝑥, 0) = {𝜌0 (1 − 𝑥) 0 < 𝑥 < 1. (2.8)
0 𝑥>1
31
Dynamic Traffic: Simple Traffic Flow Models
This graph was generated by setting 𝜌0 = 1 and removing tickmarks on the density
axis. Consider now how this graph might change over time. To formulate this we
find an expression for the equation (2.8) at the point (x, t). We generalise each of
the three regions for which ρ(x, 0) is defined separately, considering the expression
for density as in equation (2.7).
The first region, that is the region furthest in the negative 𝑥 direction, is bounded
by the inequality
𝑥 < 0.
This is taken at 𝑡 = 0 and so 𝜌(𝑥, 0) = 𝑓(𝑥). After this initial state the argument of
2ρ
the function 𝑓 becomes x − c (1 − ρ ) t. The above inequality should thus change to
0
2𝜌
𝑥 − 𝑐 (1 − ) 𝑡 < 0,
𝜌0
but in this first region 𝜌 = ρ0 which does not depend on the argument of 𝑓, thus
2𝜌0
𝑥 − 𝑐 (1 − ) 𝑡 < 0.
𝜌0
=> 𝑥 + 𝑐𝑡 < 0
The rest of the boundaries of the regions can be generalised by following the same
procedure for the second and third regions. The second region is bounded for
32
Dynamic Traffic: Simple Traffic Flow Models
0 < 𝑥 < 1,
and becomes
2𝜌
0 < 𝑥 − 𝑐 (1 − ) 𝑡 < 1.
𝜌0
In order to remove ρ from this inequality (and thereby simplify it) we must find the
generalised for of 𝑓 for this region. Initially 𝜌 = 𝑓(𝑥) gave 𝜌 = ρ0 (1 − 𝑥) but now we
find
2𝜌 2𝜌
𝜌 = 𝑓 (𝑥 − 𝑐 (1 − ) 𝑡) = 𝜌0 [1 − 𝑥 + 𝑐 (1 − ) 𝑡]
𝜌0 𝜌0
2𝑐𝜌
=> 𝜌 = 𝜌0 [1 − 𝑥 + 𝑐𝑡 − 𝑡]
𝜌0
=> 𝜌 = 𝜌0 − 𝜌0 𝑥 + 𝜌0 𝑐𝑡 − 2𝑐𝜌𝑡
𝜌0 (1 − 𝑥 + 𝑐𝑡)
=> 𝜌 =
1 + 2𝑐𝑡
𝜌0 (1 − 𝑥 + 𝑐𝑡)
2
0 < 𝑥 − 𝑐 [1 − 1 + 2𝑐𝑡 ]𝑡 < 1
𝜌0
(1 − 𝑥 + 𝑐𝑡)
=> 0 < 𝑥 − 𝑐 [1 − 2 ]𝑡 < 1
1 + 2𝑐𝑡
=> 0 < 𝑥(1 + 2𝑐𝑡) − 𝑐[1 + 2𝑐𝑡 − 2(1 − 𝑥 + 𝑐𝑡)]𝑡 < 1 + 2𝑐𝑡
=> 0 < 𝑥 + 2𝑐𝑡𝑥 − [𝑐𝑡 + 2(𝑐𝑡)2 − (2𝑐𝑡 − 2𝑐𝑡𝑥 + 2(𝑐𝑡)2 )] < 1 + 2𝑐𝑡
33
Dynamic Traffic: Simple Traffic Flow Models
=> 0 < 𝑥 + 2𝑐𝑡𝑥 − [𝑐𝑡 + 2(𝑐𝑡)2 − 2𝑐𝑡 + 2𝑐𝑡𝑥 − 2(𝑐𝑡)2 ] < 1 + 2𝑐𝑡
𝑥>1
Generalise in the same way as the other two regions, this becomes
2𝜌
𝑥 − 𝑐 (1 − )𝑡 > 1
𝜌0
In this region 𝜌 = 0 so
𝑥 − c𝑡 > 1
And so we have the piecewise function for ρ(x, t) based on the initial function in
equation (2.8) using the ranges for the regions n equations (2.9 − 2.11) defined as
𝜌0 𝑥 < −𝑐𝑡
𝜌0 (1−𝑥+𝑐𝑡)
𝜌(𝑥, 𝑡) ={ −𝑐𝑡 < 𝑥 < 1 + 𝑐𝑡 (2.12)
1+2𝑐𝑡
0 𝑥 > 1 + 𝑐𝑡
34
Dynamic Traffic: Simple Traffic Flow Models
It can be seen in the conditions of equation (2.8) that the edges of the function’s
sub-domains are dependent on time. As time increases, the length of the centre
region grows. This is intuitive as both of the points (−𝑐𝑡, 𝜌) and (1 + 𝑐𝑡, 𝜌) change
simply due to the motion of cars. As time passes, stopped cars at the point (−𝑐𝑡, 𝜌)
begin to move because the density around them decreases.
By definition, the third region must remain empty. However, the point (1 + 𝑐𝑡, 𝜌)
moves to the right as cars at that point also move to the right and in order to
preserve its emptiness, the third region’s left boundary must also move with the
cars. We know the speed of these cars to be approximately c because 𝑙𝑖𝑚 𝑣 = 𝑐.
𝜌→0
One might illustrate the piecewise break at 𝑥 = 1 + 𝑐𝑡 lying on the front of the
foremost car.
The following (Fig 2.4.2) is a graph of the evolution of a model with these initial
conditions. In this case, we let 𝑐 = 1 and 𝜌0 = 1, i.e. 𝑣 = 1 − 𝜌.
See appendix for maple script of both this and an animated version
35
Dynamic Traffic: Simple Traffic Flow Models
As time progresses, the overall distribution becomes flatter and the slope of the
centre region tends to zero. Figure 2.4.2 shows the distribution at five equally
spaced time intervals. In this example, 𝑡 ≥ 0. This is to avoid encountering a more
complex phenomenon that will be discussed in the next chapter.
It can be seen that at all times the centre line passes through the point (0.5,0.5). Let
us now investigate if this is due to the values that were set for 𝑐 or 𝜌0 .
𝜌0 (1 − 0.5 + 𝑐𝑡)
𝜌(0.5, 𝑡) =
1 + 2𝑐𝑡
𝜌0 (0.5 + 𝑐𝑡)
=> 𝜌(0.5, 𝑡) =
1 + 2𝑐𝑡
1 𝜌0 (1 + 2𝑐𝑡)
=> 𝜌(0.5, 𝑡) =
2 1 + 2𝑐𝑡
1
=> 𝜌(0.5, 𝑡) = 𝜌0
2
It appears that at the point 𝑥 = 0.5, the density is a constant value equal to half of
the maximum density. It is interesting to theorise that this is due to the initial
conditions set by the constructed function. This will be investigated in the next
chapter where the next distribution is studied.
Apart from changing the equation for velocity, this model can be expanded upon by
changing the initial conditions. Some initial conditions using this simple model
evolve to exhibit interesting and unusual behaviours. The following chapter
explains one of these behaviours and why it occurs.
36
Dynamic Traffic: Simple Traffic Flow Models
In this chapter, further detail into the nature of different traffic models will be
given. This chapter will also discuss a particularly interesting phenomenon, known
as a shock, which arises from various traffic models including the Greenshield’s
model under certain conditions. These conditions and shocks themselves will be
observed and explained using diagrams and mathematical formulae. This chapter
will also examine two other models and compare them to the Greenshield’s model
in terms of empirical accuracy. This will be done using conclusions made by other
studies, namely work done by Z. Lu and Q. Meng[5] on analysing these relations and
by Vikram et al. on the behaviour of Lighthill-Whitham-Richards (LWR) models.
Much of the theory in this chapter was gathered from D. Vikrama, P. Chakrobortya,
S. Mittalb (2013), Exploring the behavior of LWR continuum models of traffic flow in
presence of shock waves[3] and from M. Jabeena (2013), Comparative Study of Traffic
Flow Models and Data Retrieval Methods from Video Graph[6]
In the field of traffic modelling, LWR models are among the most eloquent.
According to M. Treiber and A. Kesting (2013)[4], these models were independently
proposed by Lighthill and Whitham (in 1955) and Richards (in 1956). The theory
behind the models is what links them together and it is based heavily on existing
theories in fluid dynamics. In this way, LWR models conceptualise traffic density as
the density of a body made up of many objects and makes the assumption that
there is little practical different between this concept and fluids. As a result of this
assumption all LWR models assume that each vehicle behaves according to the
same laws, thereby ignoring human nature. Drivers in these models can be thought
of as ‘perfect’ drivers.
The core concepts that LWR models borrow from fluid dynamics are the
conservation of mass, an equilibrium velocity-density relationship and a
fundamental equation of traffic flow. We will discuss each of these concepts now.
37
Dynamic Traffic: Simple Traffic Flow Models
Recall the definition for the law of conservation of mass given in section 2.1 (“the
total mass of any material system is neither increased nor diminished by reactions
between the parts”). In fluid dynamics this law is taken to apply to systems of
flowing mass and LWR models assume this to be analogous to traffic flow. In the
context of fluid and traffic it is sometimes called “the continuity equation”. In
section 2.1, we derived this equation for a simple system.
The fundamental equation of traffic flow that these models share is simply 𝑣𝜌 = 𝑄
where 𝑄 is flow rate. This equation simply states a physical definition but it is
important to note that LWR models can be used to calculate 𝑄 as a variable of
interest.
This relation was devised in 1959, 24 years after Greenshield’s was published.
Greenberg recorded data in the Lincoln Tunnel to arrive at his famous relation. The
main criticism of the model is that at lower densities, the speed of cars tends to
infinity (as can be seen in figure 3.1.1 on the next page). Part of the reasoning behind
this feature of the model is that, in the congested Lincoln Tunnel, it is assumed
free-flow never occurs. Lu and Meng (2013) compared Greenshield’s, Greenberg’s
and Underwood’s models by using regression analysis to predict the 𝑣 − 𝜌 curve on
different roads and comparing the predictions to data gathered in the field. They
found Greenberg’s performed well in modelling a notoriously congested road
(Beijing Third Ring Road). Perhaps more surprisingly, they found Greenberg’s
model was among the most accurate in predicting a sparse highway (Jing Jin Tang
Highway).
38
Dynamic Traffic: Simple Traffic Flow Models
In this graph, 𝜌0 = 1, 𝑐 = 1. The maple code for this graph can be found in the
appendix.
39
Dynamic Traffic: Simple Traffic Flow Models
These models each show their own strengths and weaknesses; no particular one of
them is objectively superior to the others. Despite their differences, however, all of
these models provide a good idea of how velocity and density change with each
other in real life. Unfortunately, some of the assumptions that are made by LWR
models are not always valid, particularly in the presence of shocks.
40
Dynamic Traffic: Simple Traffic Flow Models
3.2 Shocks
In this section, we will explain the nature of shocks and why they occur. The
method of characteristics will be used to explore the phenomenon.
0 𝑥<0
𝜌(𝑥, 0) = {𝜌0 𝑥 0<𝑥<1 (3.1)
𝜌0 1<𝑥
This function is illustrated by figure 3.2.1 and describes a particular density function
of 𝑥 and 𝑡 at time 𝑡 = 0. The 𝑣 − 𝜌 relation for this example is Greenshield’s
relation, written in chapter 2 as equation (2.4). Previously, we examined a density
function that described a system going from high density to low density in the
positive 𝑥 direction. In that model, the region in which density varied grew wider
and flatter with time. We will see this model behaves in quite the opposite way.
41
Dynamic Traffic: Simple Traffic Flow Models
Fig. 3.2.1 shows an initial density distribution in which 𝜌 = 0 for 𝑥 < 1 and then
climbs linearly until it reaches 𝜌 = 𝜌0 at 𝑥 = 1.
In the scenario presented by figure 3.2.1, density goes from low to high. Recall that
at lower densities, the velocity of cars increases. This means that cars will begin to
slow to a stop as density reaches a maximum, at what we will call a stopping point.
The stopping point is initially at 𝑥 = 1 but gradually that point will travel in the
negative 𝑥 direction as the stopping cars extend the region of maximum density in
the negative 𝑥 direction.
Let us now find ρ at the point (𝑥, 𝑡). This is done in a similar way to the
generalisation of the previous density distribution we looked at. In fact, this model
is based on the same law of conservation that the previous one was, meaning
equation (2.3) is valid here. This is the same for all LWR models. Substituting the
Greenshield’s model for velocity in equation (2.3) leads us once again to equation
(2.7), i.e. for the density distribution in equation (3.1), the following is true,
2𝜌
𝜌(𝑥, 𝑡) = 𝑓 (𝑥 − 𝑐 (1 − ) 𝑡)
𝜌0
2𝜌
In order to generalise equation (3.1) for t, we substitute 𝑥 − 𝑐 (1 − 𝜌 ) for 𝑥 in both
0
42
Dynamic Traffic: Simple Traffic Flow Models
the sub-functions and the boundaries of each region of the piecewise function. In
the first, 𝜌 = 0 which will not change as time passes (as it does not depend upon 𝑥)
but the boundary does contain 𝑥 and so must change like so,
𝑥<0
2(0)
=> 𝑥 − 𝑐 (1 − )𝑡 < 0
𝜌0
=> 𝑥 − 𝑐𝑡 < 0
ρ = ρ0 𝑥
2ρ
=> 𝑝0 (𝑥 − 𝑐 (1 − ) 𝑡)
ρ0
=> ρ = ρ0 𝑥 − ρ0 𝑐𝑡 + 2ρct
The boundaries for the range of 𝑥 in this region must also be generalised,
0<𝑥<1
Becomes
2ρ
0 < 𝑥 − 𝑐 (1 − )𝑡 < 1
ρ0
43
Dynamic Traffic: Simple Traffic Flow Models
2ρ0 𝑥 − 𝑐𝑡
=> 0 < 𝑥 − 𝑐 [1 − ( )] 𝑡 < 1
ρ0 1 − 2𝑐𝑡
In the third region, ρ = ρ0 . This does not depend upon 𝑥 so it will not change but
the boundary condition is generalised.
𝑥>1
becomes
2ρ0
𝑥 − 𝑐 (1 − )𝑡 > 1
ρ0
=> 𝑥 + 𝑐𝑡 > 1
0
𝑥 < 𝑐𝑡
ρ0 (𝑥 − 𝑐𝑡)
𝜌(𝑥, 𝑡) = { 𝑐𝑡 < 𝑥 < 1 − 𝑐𝑡 (3.5)
1 − 2𝑐𝑡 1 − 𝑐𝑡 < 𝑥
𝜌0
44
Dynamic Traffic: Simple Traffic Flow Models
From this expression we can see two things. Firstly, the boundaries for the middle
region draw narrower as time progresses. This is the opposite of the distribution
studied in the chapter 2. Secondly, in the expression for 𝜌 in the centre region, the
1
divisor tends to zero as 𝑡 → 2𝑐. At this point, 𝜌 would be undefined. It is here that
At the point 𝑥 = 0 in figure 3.2.1, cars travel with velocity 𝑣 = 𝑐 (𝑐 being the
maximum speed of cars) and must begin to slow down as density increases. As time
passes the first cars along the road, catch up those ahead of them. When this
happens, the point at which density becomes non-zero (and speed falls below 𝑐)
moves in the positive 𝑥 direction and the slope of the middle section of the graph
becomes steeper.
On the other side of the centre region, cars stop moving. This causes a growing line
of cars in a collective state of maximum density. This causes the right hand
boundary of the centre region to move in the negative 𝑥 direction.
The defining aspect of the shock is that the gradient of the line that joins the two
pieces of the function together tends to infinity. This creates a discontinuity which
does not fit into the core theories behind LWR models. LWR models do not account
for the formation of shocks and cannot rationalise the fact that the mathematics
shows two differing values for 𝜌 at one point in space. This phenomenon is simply a
symptom of the flaws in how traffic is conceptualised under LWR models. Drivers,
in reality, are not identical particles with instant reactions and the ability to sense
only the density of traffic in their immediate vicinity.
From the time-lapse graph in figure 3.2.2, we can see that a shock occurs at time 𝑡 =
0.5 (in this graph, 𝑐 = 1 and 𝜌0 = 1)
45
Dynamic Traffic: Simple Traffic Flow Models
Fig 3.2.2 shows the evolution of a system with an initial density distribution
illustrated by the red line here or by figure 3.2.1. See appendix for maple script of
In figure 3.2.2, the gold line labelled “t = 0.5” is an approximation and actually
represents t evaluated at 0.499. This is to avoid a singularity as that would interfere
with Maple. It is at this point in time that the range of the centre region becomes
zero and the slope of that line becomes infinite. At this point, density appears to be
at both a minimum and a maximum which is physically unrealisable.
As time continues to pass, we see that the centre region overlaps with the left and
right regions, forming a growing space in which density is physically inconsistent.
The cause of this is that the boundaries 𝑥 < 𝑐𝑡 and 𝑥 > 1 − 𝑐𝑡 continue to move in
the positive and negative 𝑥 directions respectively because there is no rules that
suggests the function should change.
If, in reality, drivers were to behave in exactly the way LWR models suggest they do,
there would be a road traffic accident at the point 𝑥 = 0.5, 𝑡 = 0.5 as cars must
46
Dynamic Traffic: Simple Traffic Flow Models
Let us briefly discuss the fact that, similar to the distribution in the previous chapter
which had the same values for 𝑐 and 𝜌0 , density appears to be constant at the point
𝑥 = 0.5. This is even true after the shock has occurred. Let us investigate the
variables upon which, in this model, this phenomenon depends.
𝜌0 (0.5 − 𝑐𝑡)
𝜌(0.5, 𝑡) =
1 − 2𝑐𝑡
1
𝜌0 (1 − 2𝑐𝑡)
=> 𝜌(0.5, 𝑡) = 2
1 − 2𝑐𝑡
1
=> 𝜌(0.5, 𝑡) = 𝜌0
2
This is the same result as for the distribution constructed in chapter 2. Evidently,
this must be due to the 𝑣 − 𝜌 relation. Greenshield’s relation is gives a straight line
in a 𝑥 − 𝜌 graph. In each distribution constructed in this project, a straight line
would join two points, one at 𝜌0 and one at 0. These points would move but with
the same speed in opposite directions, meaning the centre point on those lines was
at a constant value for 𝑥. The centre point would also always be half way between
the lower and higher point because the line joining them was straight. Thus, at any
𝜌0
time, the density at centre point of the lines would be constant and of the value .
2
LWR models have now been shown to be accurate in some circumstances but are
not realistic in their depiction of drivers, meaning so long as shocks are not present
they elegantly approximate the density distribution on a single-lane stretch of road.
In the presence of shocks the model breaks down, suggesting unrealistic traffic
behaviour.
47
Dynamic Traffic: Simple Traffic Flow Models
In this section, the characteristic lines associated with systems that encounter
shocks will be examined. In this sense, we will discuss the differences between the
two density functions we have encountered in this project. We will find that shocks
occur when characteristic lines conflict and that this problem arises when LWR
models are used to describe systems that go from low density to high density.
𝜕ρ 𝜕(ρv)
+ =0 (3.6)
𝜕𝑡 𝜕𝑥
which is the conservation law that all LWR models rely on,
dρ
=0
ds
In other words, along the characteristic lines, 𝜌 remains constant. Let us now find
the characteristic curves for the density distribution in equation (2.12).
In the first region, 𝑥 < −𝑐𝑡, 𝜌 = 𝜌0 and so the substituting this into the equation for
the characteristic curves (that is, equation 2.7) we get
2𝜌0
𝜌(𝑥, 𝑡) = 𝑓 (𝑥 − 𝑐 (1 − ) 𝑡)
𝜌0
48
Dynamic Traffic: Simple Traffic Flow Models
On the other hand, in the third region of the same density distribution, 𝑥 < +𝑐𝑡,
𝜌 = 0 and so the characteristics are defined by
2(0)
𝜌(𝑥, 𝑡) = 𝑓 (𝑥 − 𝑐 (1 − ) 𝑡)
𝜌0
These are lines perpendicular to the ones on the negative side of the x-axis.
Characteristics in the centre region are defined by a different function which gives
them a slope that varies with 𝑥. The expression for these lines is derived as follows.
𝜌0 (1−𝑥+𝑐𝑡)
In the centre region, 𝜌 = thus the function
1+2𝑐𝑡
2𝜌
𝑓 (𝑥 − 𝑐 (1 − ) 𝑡)
𝜌0
2𝜌0 1 − 𝑥 + 𝑐𝑡
= 𝑥 − 𝑐 (1 − )𝑡
𝜌0 1 + 2𝑐𝑡
1 − 𝑥 + 𝑐𝑡
= 𝑥 − 𝑐 (1 − 2 )𝑡
1 + 2𝑐𝑡
1 + 2𝑐𝑡 − (2 − 2𝑥 + 2𝑐𝑡)
= 𝑥−𝑐( )𝑡
1 + 2𝑐𝑡
49
Dynamic Traffic: Simple Traffic Flow Models
1 + 2𝑐𝑡 − 2 + 2𝑥 − 2𝑐𝑡
= 𝑥−𝑐( )𝑡
1 + 2𝑐𝑡
−1 + 2𝑥
= 𝑥−𝑐( )t
1 + 2𝑐𝑡
−𝑐𝑡 + 2𝑥𝑐𝑡
=𝑥−( )
1 + 2𝑐𝑡
𝑥 + 2𝑥𝑐𝑡 − 2𝑥𝑐𝑡 + 𝑐𝑡
=
1 + 2𝑐𝑡
𝑥 + 𝑐𝑡
=
1 + 2𝑐𝑡
This expression corresponds to straight lines with varying slopes of the form
𝑥 + 𝑐𝑡
= 𝛾,
1 + 2𝑐𝑡 (3.9)
where 𝛾 is a constant.
50
Dynamic Traffic: Simple Traffic Flow Models
Fig 3.3.1 graphs the characteristic lines of the three regions together
on the 𝑡 − 𝑥 plane. See appendix for Maple script
The characteristic curves here are integral curves which abide by the existence and
uniqueness theorems[8] which means that none of the characteristics cross, despite
being mutually exhaustive of the points in the plane. So, at no point in time or
space is density ever two different values at once. This seems intuitive but there are
cases where this is not true.
51
Dynamic Traffic: Simple Traffic Flow Models
Consider the characteristics curves for the distribution in equation (3.5). The
expressions for 𝑓(𝑥, 𝑡) in the first and third regions are identical to that of the third
and first regions of the previous distribution, respectively. I.e. the characteristics in
the first region are shaped by 𝜌(𝑥, 𝑡) = 𝜌0 so they are of the form
𝑥 − 𝑐𝑡 = 𝛼.
Similarly, the characteristics in the third region (where 𝜌 = 0) are of the form
𝑥 − 𝑐𝑡 = 𝛽.
The characteristics in the centre region may be calculated in the same way as
before.
𝜌0 (𝑥 − 𝑐𝑡)
𝜌=
1 − 2𝑐𝑡
2𝜌
=> 𝑥 − 𝑐 (1 − )𝑡
𝜌0
2𝜌0 (𝑥 − 𝑐𝑡)
=> 𝑥 − 𝑐 (1 − )𝑡
𝜌0 1 − 2𝑐𝑡
1 − 2𝑐𝑡 − 2𝑥 + 2𝑐𝑡
=> 𝑥 − 𝑐 ( )𝑡
1 − 2𝑐𝑡
1 − 2𝑥
=> 𝑥 − 𝑐 ( )𝑡
1 − 2𝑐𝑡
𝑥 − 2𝑐𝑡𝑥 𝑐𝑡 − 2𝑐𝑡𝑥
=> −( )
1 − 2𝑐𝑡 1 − 2𝑐𝑡
52
Dynamic Traffic: Simple Traffic Flow Models
𝑥 − 2𝑐𝑡𝑥 − 𝑐𝑡 + 2𝑐𝑡𝑥
=>
1 − 2𝑐𝑡
𝑥 − 𝑐𝑡
=>
1 − 2𝑐𝑡
𝑥 − 𝑐𝑡
=𝛾
1 − 2𝑐𝑡
in time (𝑥 = 0.5, 𝑡 = 0.5) is illustrated more clearly in figure 3.2.2 by the gold line.
The gradient of the function here becomes infinite and so there are an infinite
number of values for 𝜌 at the point (0.5,0.5). This is illustrated in figure 3.3.2 by the
fact that any line beginning in the centre region passes through that point. For 𝑡 >
0.5, it can be seen that there is a fan-shaped array of characteristic curves spreading
out above that point of intersection, where lines from both the green and red
families cross those in the centre. This corresponds to the range in 𝑥 over which
there are three values for 𝜌 for any one value for 𝑥.
53
Dynamic Traffic: Simple Traffic Flow Models
Recall that in models based on equation (2.5), the value for 𝜌 along the
characteristics remains constant. In other words, at any point on a red characteristic
line, 𝜌 = 0 according to the value for 𝜌 in the first region of equation (3.2). For
instance, at the point (0,0), 𝜌 = 0. Similarly, at any point along a green
characteristic line, 𝜌 = 𝜌0 . This means that at a point that lies on both a green and
red line, 𝜌 = 0 and 𝜌 = 𝜌0 . This is mathematically sound but physically unrealisable
for our traffic models.
54
Dynamic Traffic: Simple Traffic Flow Models
Conclusion
In conclusion, this project has developed some of the ideas studied by the reader in
the area of partial differential equations and put them to use, examining
Greenshield’s velocity-density relation. Through this study, we have developed a
better understanding of physical interpretations of PDEs and some of the
mathematics behind traffic flow. The traffic theory studied in this project is also
substantial, the strengths and weaknesses of LWR models have been demonstrated.
The methods used in this project are among the first steps to understanding and
constructing more realistic traffic models. This project has also combined the
subject material into a practical context, hopefully allowing for better
understanding on the part of the reader.
The material covered in this project may also act as a basis for further study into
traffic flow models and the applications of partial differential equations. Further
study could include exploration of the phenomena described in the research piece
“Traffic Modelling - Phantom Traffic Jams and Traveling Jamitons”[8] by M. Fylnn et
al. Included therein are examinations of the similarities to wave motion in traffic
flow models. The propagation of patterns in traffic systems is also covered using
higher order PDEs by M. Treiber and A. Kesting[5].
55
Dynamic Traffic: Simple Traffic Flow Models
Appendix
Chapter 1 Graphs
Fig. 1.2.1-1.2.2 – Graphing rates of change
Restart: with(plots):
S := (1/2)*t^2:
dSdt := diff(S, t):
plot(S, t = -5 .. 100, s = 0 .. 100, view = [0 .. 5, 0 .. 10], thickness = [3], labels = [Time(t),
Distance(s)]);
plot(dSdt, t = -5 .. 5, s = -5 .. 5, view = [0 .. 5, 0 .. 10], thickness = [3], colour = [blue],
labels = [Time(t), Velocity(ds/dt)]);
Animated plot using the equation from fig. 1.3.1 taking y as the time variable.
restart: with(plots):
animate(plot, [x^2+y^2+x+y, x = -10 .. 10], y = -5 .. 10);
Chapter 2 Graphs
Z:=(x,t)-> piecewise(x < -t, 1, `and`(-t < x, x < 1+t), (1+t-x)/(1+2*t), 1+t < x, 0):
plot(Z(x, 0), view = [-2 .. 2, 0 .. 2], tickmarks = [5, 0], labels = [x, ρ[0]]);
56
Dynamic Traffic: Simple Traffic Flow Models
Fig. 2.4.2 – Superimposed graphs of the first distribution at different times t={0, 1, 2,
3, 4}
restart: with(plots):
Z:=(x,t)-> piecewise(x < -t, 1, `and`(-t < x, x < 1+t), (1+t-x)/(1+2*t), 1+t < x, 0):
p0:= plot(Z(x, 0), color = [red], legend = [t = 0]):
p1:= plot(Z(x, 1), color = [orange], legend = [t = 1]):
p2:= plot(Z(x, 2), color = [gold], legend = [t = 2]):
p3:= plot(Z(x, 3), color = [green], legend = [t = 3]):
p4:= plot(Z(x, 4), color = [cyan], legend = [t = 4]):
plots[display]([p0, p1, p2, p3, p4], view = [-5 .. 6, 0 .. 1.2], labels = [x, ρ]);
Chapter 3 Graphs
Fig. 3.1.1 – Greenberg’s relation compared to Greenshield’s
restart: with(plots):
restart: with(plots):
57
Dynamic Traffic: Simple Traffic Flow Models
restart: with(plots):
restart: with(plots):
plots[display]([P(1, cyan, t = 1), P(.75, green, t = .75), P(.499, gold, t = .5), P(.25, orange, t
= .25), P(0, red, t = 0)]);
restart: with(plots):
restart: with(plots):
58
Dynamic Traffic: Simple Traffic Flow Models
plots[display]([seq(pos(1, i), i = 1 .. 6, .5), seq(neg(1, i), i = 0 .. -6, -.5), seq(ph(1, i), i = .10
.. .90, .10), plot([.5, t, t = 0 .. 10])], view = [-5 .. 5, 0 .. 5], labels = [x, t]);
restart: with(plots):
59
Dynamic Traffic: Simple Traffic Flow Models
References
[1]"World Bank Data: Motor vehicles (per 1,000 people)". The World Bank. Retrieved
2011-08-27.
[4] M. Treiber, A. Kesting (2013), Traffic Flow Dynamics. Springer Berlin Heidelberg
[6] M. Jabeena (2013), Comparative Study of Traffic Flow Models and Data Retrieval
Methods from Video Graphs. Journal of Engineering Research and Applications,
Sardar Vallabhbhai National Institute of Technology.
60