2. Contact Information
2
Email: usama.shahdah@mans.edu.eg,
usama.elrawy@gmail.com
Office Location: 2nd floor next to the Production
Engineering Block
Office hours: 10:00 AM – 3:00 PM
On Tuesdays by appointment
3. Course Website
3
Google Group
https://groups.google.com/d/forum/traffic2015_2016
“Subscribe to this group”
You will need a Google (i.e., Gmail) Account. You
can create one via:
https://accounts.google.com/SignUp?service=mail&co
ntinue=https%3A%2F%2Fmail.google.com%2Fmail%
2F<mpl=default
4. Two vehicles A and B
y-axis is distance or
space, and the x-axis
is time.
Afront represents the
position of the front
bumper of vehicle A
as a function of time
Lines Arear represent
the position of the
rear bumper of
vehicle A
Traffic Flow Characteristics:
Time-Space Diagram4
6. Headway and Gap
6
Headway (t): the elapsed time between the front of a
vehicle (vehicle A ) passing a location and the front of the
following vehicle (vehicle B ) passing the same location
t = tB,f – tA,f
Time headway is usually measured in seconds.
Separation Time or Gap (tg): the elapsed time between the
rear of a lead vehicle passing a location and the front of
the following vehicle passing the same location
tg = tB,f – tA,r
Separation time is usually measured in seconds.
Separation time and time headway are different by an amount
equal to the time taken for the lead vehicle’s length to pass a
fixed location
t = tg + LA/sA where sA is the velocity of vehicle A
7. Spacing and clearance
7
Distance headway (or Spacing): the distance
between the front of the lead vehicle and the front
of the following vehicle measured at a specific time.
Distance headway is usually measured in meters.
Separation distance (or Clearance): the distance
between the rear of the lead vehicle and the front
of the following vehicle measured at a specific time.
8. Vehicle Arrival Patterns
8
t: time headway
Time headway distribution is linked to the distribution of the vehicle arrivals
Poisson distribution is used to model the vehicles’ arrival
9. Poisson Process
9
The number of events occurring in one segment of time
or space is independent of the number of events in any
previous segment (i.e. a Poisson process has no
memory).
The mean process rate (e.g. vehicles per hour) is
denoted λ and must remain constant for the entire time
or space span considered
The shorter the segment of time (or smaller the segment
of space), the less likely it is for more than one event to
occur during that segment.
10. Poisson Distribution (Discrete Distribution)
10
Probability Mass Distribution Function (PMF)
A significant property of the Poisson distribution is that:
Mean = Variance
11. Example: Using the Poisson distribution
11
Assume that the average traffic flow rate on a single
lane one-way street is 300 vph. Compute the
probability of observing 0, 1, and ≥ 2 vehicles in any
30 second period.
14. Solution
14
What if we did not convert the units of t and ?
This solution is incorrect and quite different from the
correct solution.
15. Distribution of Time Headways
15
In the gap acceptance process we are interested in
the availability of time headways, not the number
of vehicles arriving during a fixed time period.
Fortunately, when the Poisson distribution describes
the arrival of vehicles, then the distribution of time
headways between vehicles can be described by
the Exponential distribution.
Probability of headways being larger than some
value (Exponential dist.)
16. Exponential Distribution
16
Continuous distribution
Probability density function (PDF):
The distribution of time headways:
( ) x
f x e
the average arrival rate:
then the exponential distribution can also be written as
17. Difficulties with using exponential Dist.
17
Very small time headways are possible
For a traffic stream with an average arrival rate of 300
vph:
there is a 4% probability that time headways will be less
than 0.5 seconds and
an 8% probability that headways will be less than 1.0
seconds.
In reality, very small headways are not possible as the
headway must be at least as long as the time required
for the length of the lead vehicle to pass the observation
location.
19. Difficulties with using exponential Dist.
19
A tractor-trailer truck configuration having:
a length of 25m and
travelling at 60 km/h
requires 1.5 seconds for the vehicle length to pass a fixed
location.
Naturally, the time for the vehicle length to pass a
location decreases with shorter vehicles and faster
travel speed.
For example, a car having a length of 6m and travelling at
60 km/h requires only 0.36 seconds to pass a location.
Drivers require some reaction time and therefore travel
at a separation distance that provides sufficient time to
respond to the actions of the lead vehicle.
20. Notes
20
This constrain (i.e., very short headway) is only true
when examining time headways for a single lane.
If data are collected for traffic traveling in more
than one lane and time headways are measured
between consecutive vehicles passing a point
regardless of the lane they are in,
then very small headways are possible as the
headway is computed between two vehicles that
are not physically acting as a lead and following
vehicle.
21. Shifted Exponential Distribution of Time
Headways
21
We can modify the exponential distribution to prevent very small
(unrealistic) headways by introducing another parameter, α.
The Mean and the Variance:
22. Example: Using the shifted exponential distribution
22
Consider a traffic stream with a mean arrival rate of
300 vph. If the time headway distribution can be
modeled using a shifted exponential distribution with
α= 2 seconds, then determine
(a) the probability of a time headway being greater
than or equal to 2 seconds; and
(b) the probability of a time headway being greater
than or equal to 3 seconds.
25. Hypothesis on an underlying Distribution
25
How do we confirm that vehicle arrivals follow
Poisson distribution?
How do we confirm that headway time follow
exponential distribution?
Solution: use Chi‐Square test
Null hypothesis: H0
Use Chi-Square test to accept/reject H0
Example:
H0:headways can be assumed to follow Exponential
distribution
26. Type I and Type II Errors
26
In hypothesis testing, there are four outcomes possible, two of which
lead to incorrect decisions.
Decision
True Situation Do not reject Ho Reject Ho
Ho is true Correct decision Wrong decision
(No error) (Type I error)
Ho is false Wrong decision Correct decision
(Type II error) (No error)
α = P (Type I error) = P (reject H0 / H0 is true)
β = P (Type II error) = P (Do not reject H0 / H0 is false)
27. How to Perform Chi-Square Test
27
Compute the theoretical frequencies (fi, t) for each
category
Compute the Chi-Square statistics for all categories
( )
Refer to table of Chi-‐Square distribution
is Chi-Squared distributed
We expect low values for if our hypothesis is
correct
2
2
2
29. Chi-Square test
29
When using the Chi Square test, the intervals
for the distributions must be chosen so that fi,t
≥ 5.
There is no requirement that each interval
represent the same range of values for the time
headways.
30. 30
The table value for the Chi Square statistic is
dependent on two parameters;
the selected level of significance (usually 5%) and
the degrees of freedom
31. Example: Chi Square test
31
Time headway data from one direction of a two
lane road have been collected over a period of 1
hour and are summarized in table 1 in terms of the
frequency distribution.
A uniform bin size of 2 seconds has been arbitrarily
chosen.
The average flow rate during the period of
observation was 300 vph.
33. Chi-square example
33
We assume that the observed headways can be
modelled using an exponential distribution with λ =
300 vph.
Consequently, we can use the exponential
distribution to estimate the theoretical frequency
distribution (column 4 of Table 1) for each headway
interval.
Note that the theoretical frequency for the last row
(interval 20) reflects the frequency of headway
greater than 38 seconds.
35. Chi-square example
35
theoretical frequency shows that in intervals 15 to
19, the estimated frequency is < 5
therefore we must aggregate some of the intervals
combine intervals 15 through 19 into a single
interval (representing headways between 28 and
38 seconds)
The observed frequency for this interval is 18 and
the estimated frequency is 16.4.
38. Chi-square table value
38
Degrees of freedom
n = (I - 1) – p = (16 – 1) – 1 = 14
Assume level of significance of 5%
Chi-square critical value = 23.685
40. Recall acceptance/rejection regions for
Hypothesis test40
Reject Ho
1-
Do not
reject Ho Reject Ho
Two-tailed
1-
Do not
reject Ho
Reject Ho
Left-tailed
1-
Do not
reject Ho
Reject Ho
Right-tailed
Null Hypothesis: H0 : μ = μo
Alternative Hypothesis
1. Two-tailed test:
H1 : μ μo
2. Left-tailed test:
H1: μ < μo
3. Right-tailed test:
H1: μ > μo
41. Conclusion
41
The calculated Chi Square value is less than the
table value
implying that there is no evidence to reject the null
hypothesis and
we can safely use the exponential distribution with λ
= 300 vph to model the observed data.
42. Notes on Chi-Square Test
42
It is possible to show that different distributions could
present the same data
The test does not prove a distribution
It does not oppose the desire to assume a distribution
The test is not directly on the hypothesized distribution
The test is on the expected versus observed number of
samples
The actual test is between the histograms
The size of each category (interval) has a significant role
43. Generating Exponential Headways
43
exponential distribution
We want to solve for the headway t. set
Then and
U1, U2, ..., UN are independent uniform random variables between 0 and
1.0.
Use RAND() function in Microsoft Excel
To generate exponentially distributed time headways
45. Macroscopic Measures of a Traffic Stream
45
Speed
Unit: km/h
Variable: S
Flow
Unit: Veh/h
Variable: V
Density
Unit: Veh/km
Variable: D
46. Speed
46
Rate of motion expressed as distance
unit per unit of time
Space mean speed (harmonic average)
Time mean speed (arithmetic average)
Time mean speed >= Space mean
speed
The relationship …
47. Rate of Flow / Volume
47
Volume: Total number of vehicles passing a given
point during a given time interval
Interval may be an hour, day, week, or even a year
Rate of Flow: Equivalent hourly rate at which
vehicles pass a given point during a given time
interval less than one hour
52. Macroscopic Speed-Flow-Density Relationship
52
There is a maximum speed at which vehicles will travel
(free flow speed, Sf)
The minimum speed vehicles can travel at is zero
There is a maximum number of vehicles that can
occupy a given segment of roadway (jam density, Dj).
There must be a condition at which the maximum flow
occurs (Capacity, Vc)
If vehicles are very close together, people tend to drive
more slowly (as density increases, speeds decrease)