Sei sulla pagina 1di 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/329799378

TRAFFIC FLOW DISTRIBUTION AND PREDICTING SHORT TIME TRAFFIC FLOW


COMPOSITION USING MONTE CARLO SIMULATION

Conference Paper · December 2018

CITATION READS

1 59

2 authors:

Arif Hasnat Faysal Ibna Rahman


Rajshahi University of Engineering & Technology University of Yamanashi
9 PUBLICATIONS   3 CITATIONS    21 PUBLICATIONS   20 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Evaluating the Stability of Slope of Rajshahi City Protection Embankment View project

Research on transportation and traffic system of bangladesh View project

All content following this page was uploaded by Faysal Ibna Rahman on 26 November 2019.

The user has requested enhancement of the downloaded file.


4th International Conference on Advances in Civil Engineering 2018 (ICACE 2018)
19 –21 December 2018
CUET, Chittagong, Bangladesh
www.cuet.ac.bd

TRAFFIC FLOW DISTRIBUTION AND PREDICTING SHORT TIME


TRAFFIC FLOW COMPOSITION USING MONTE CARLO SIMULATION

A.Hasnat1*&F. I. Rahman2
1
Department of Civil Engineering, Rajshahi University of Engineering & Technology, Rajshahi,
Bangladesh.
E-mail: arif140092@gmail.com
2
Department of Civil and Environmental Engineering, University of Yamanashi, Kofu, Japan.
E-mail: ovi_faysal@yahoo.com
*
Corresponding Author

ABSTRACT
For developing countries like Bangladesh due to rapid urbanization and mix-traffic flow condition,
traffic management becomes more challenging day by day. Knowledge of traffic flow distribution and
traffic flow composition are significant for traffic assignment, traffic prediction, traffic guidance, and
traffic management. In this paper chi-square test is used to find the traffic flow distribution. The
hypothesis of the fitting tests includes Beta distribution, Normal distribution, Log-normal distribution
and other four kinds of distribution. For better traffic management, it also needs to predict short time
traffic flow composition. For this prediction, Monte Carlo simulation is used. The analyses are done for
different traffic conditions such as working day, weekends and both for peak time and off-peak time
traffic flow condition. This time the Mean Average Percentage Error (MAPE) becomes 6.6%

Keywords: prediction; distribution; traffic-flow; Monte Carlo simulation; Chi Squared test.

INTRODUCTION
With the prospective development in transportation system, a new term called Intelligent Transportation
System (ITS) has been introduced nowadays and practically used largely to improve the efficiency,
safety, and productivity of the surface transportation system. The Intelligent Transportation System
(ITS) integrates the advanced information technology with data communication technology, electronic
technology, sensor technology, and computer processing technology which can bring great convenience
for people’s travels showing the distribution characteristics and providing short-term traffic flow
forecasting. However, the traffic system is a random system with strong uncertainty and complexity. A
large number of uncertain factors cause short-term traffic flow to highly complex nonlinear
characteristics. For these reasons, it’s difficult to improve the precision of single prediction mode or to
expand the scope of application which results in different combined forecasting models with different
advantages. At the same time, it is also essential to understand the working process behind all these
methods to get an idea about the stability, reliability and the limitations associated with each of them.

Scope of the study


From previous research works it has found that travel time generally follows Normal distribution
(Harman and Lam, 1984). Again some found that it varies with time and location (Iida, 1997). On the
other hand, Zhang, (2003) found that Beta distribution is well acceptable for the goodness of fit. In this
paper, traffic flow distribution has been studied which is totally a new approach. And it is tested on
numerous data sets with Chi-squared test. After that, the dataset is simulated 144*100 times and
forecasted traffic flow with the Monte Carlo simulation. Because Monte Carlo simulation is a wide
ranged used great tool for simulation in different sectors. Many research has done with the help of

774
Monte Carlo simulation. Sometimes it gives more accurate results than time series analysis
(Stathopoulos et al., 2003). Adding with that Kumar et al., (2013) used multivariate ANN modeling
approach for short-term traffic prediction on the non-urban highway. Zeng et al. (2013) had applied
Monte Carlo method in combination with fuzzy mathematics and MATLAB to design a method for
intelligent traffic lights based on the traffic flow pattern in single intersection. Sau et al. (2007) applied
particle filter approach to develop a stochastic traffic model that enables travel time estimation and
prediction with high reliability using Monte Carlo procedure. Having a large number of uncertainties
the Monte Carlo simulation is used here for short term traffic prediction and the result have been found
quite amazing.

METHODOLOGY

Study location and data collection


The data used here have been found from the Transport Infrastructure Ireland. The traffic volume used
here is from the link road between junction-1 and junction2 of Dublin Airport route, Ireland from
January 31, 2018, to February 03, 2018 [Fig 1].
2500.00
Traffic volume

2000.00
1500.00
1000.00
500.00
0.00
00:00:00
01:10:00
02:20:00
03:30:00
04:40:00
05:50:00
07:00:00
08:10:00
09:20:00
10:30:00
11:40:00
12:50:00
14:00:00
15:10:00
16:20:00
17:30:00
18:40:00
19:50:00
21:00:00
22:10:00
23:20:00
Time ( every 10 min interval )

31-Jan 01-Feb 02-Feb 03-Feb

Fig. 1: Observed traffic flow of 4 days for 24 hours each.

The Chi Square test


This statistically test is mainly used to determine whether the association between two qualitative
variables is significant or not or how much significant with each other. The Chi Square statistic is a
measure of how far the observed counts are from the expected counts. The generalized formula of the
statistic is:
(𝑒𝑥𝑝𝑒𝑐𝑡𝑒𝑑−𝑎𝑐𝑡𝑢𝑎𝑙)2
𝑥2 = ∑ 𝑒𝑥𝑝𝑒𝑐𝑡𝑒𝑑
But another important function of Chi-Square test is to determine the distribution characteristics. It is
the most powerful method to find out the distribution among the data sets. It has different equations and
functions for log-logistic distribution, log-normal distribution, Gompertz distribution, Weibull
distribution etc. The brief mathematical calculations and approaches are proved already. The summary
of each distribution follows: for log-logistic distribution,
1
If we consider the hypothesis H0 : F(t) = 1 - 𝑡 𝑣 , t ≥ 0
1+( )
𝜃
Meaning that the distribution of the failure times is log-logistic. Here θ > 0 & v > 0; θ is the scale
parameter and also the median of the distribution; v>0 is the shape parameter. The distribution is
unimodal when v>1 and its dispersion decreases as v increases. Then the null hypothesis is rejected
with approximate significance level α, if
(𝑢𝑗 −𝑒𝑗 )2
𝑥 2 = ∑𝑘𝑗=1 𝑢𝑗
+ 𝑄 ≥ 𝑥𝛼 2(k) ; alternative parameterization
Thus all the equations of other distributions and calculations used here for analysis are sited from the
Basic Practice of Statistics (6th ed.) book.

775
1.5
1.2
1
1
0.8
0.6
0.4 0.5
0.2
0 0
0 500 1000 1500 2000 2500 0 500 1000 1500 2000 2500

(a) (b)
1.2
1.2
1 1

0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
0 500 1000 1500 2000 2500 0 500 1000 1500 2000 2500
(c) (d)
Fig. 2: (a) Normal Distribution, (b) Log-normal Distribution, (c) Logistic Distribution, (d) Gumbel
Distribution
Table 1: Data analysis for Chi square test
Mean Median Mode St. Sample Kurtosis Skewness Range Min Max Sum Count
Deviation variance .
1031.4 1208 74 565.588 319890.7 -1.255 -0.29196 1871 70 1941 1485 144
22

Monte-Carlo simulation
Monte Carlo simulations are used to model the probability of different outcomes in a process that cannot
easily be predicted due to the intervention of random variables. It is a technique used to understand the
impact of risk and uncertainty in prediction and forecasting models.
Periodic flow = ln (present actual flow/previous flow value)
Next calculated the AVERAGE, STDEV.P, and VAR.P functions on the entire resulting series to obtain
the average periodic flow, standard deviation, and variance inputs, respectively. The drift is equal to:
Drift = average periodic flow – (variance/2)
Alternatively, drift can be set to 0; this choice reflects a certain theoretical orientation, but the difference
will not be huge, at least for shorter time frames. After that to obtain a random input:
random value = standard deviation * NORMSINV(RAND())
next 10 min forecast = present actual flow * e ^ (drift + random value)
Here, every 10 min data of three days (31 Jan, 01 Feb, 03 Feb) is taken into consideration for calculation
and made simulation 100 times each for forecasting of Feb 03. Thus total 144*100=14400 simulations
are done to obtain the result. After calculating the average of every 10 min flow from 14400 simulations
the forecast is gotten. Then the forecasted value for Feb 03 is compared with the actual value of Feb 03.
The result is quite amazing.

776
Table 2: Observed result from Chi square test
Observed Normal Log- Logistic Log^logistic(2,0.5) Gamma(15,4 Gumbel Beta(2,2)
normal 5)
t-value 4.6057 37.9397 5.1822 396.84018007 426746.38 7.4540 4.0881
p-value 0.9993 0.0039 0.9999 4.17054214E-73 0 0.9857 0.9997

140.00
120.00
St. Deviation

100.00
80.00
60.00
40.00
20.00
0.00
00:00:00
00:50:00
01:40:00
02:30:00
03:20:00
04:10:00
05:00:00
05:50:00
06:40:00
07:30:00
08:20:00
09:10:00
10:00:00
10:50:00
11:40:00
12:30:00
13:20:00
14:10:00
15:00:00
15:50:00
16:40:00
17:30:00
18:20:00
19:10:00
20:00:00
20:50:00
21:40:00
22:30:00
23:20:00
Time at 10 min interval

Fig. 3: Time vs Standard Deviation graph

RESULT & DISCUSSIONS

Chi-square method
Using Chi squared test, the traffic flow distribution of 24 hours of 4 days is compared with seven kinds
of distribution like as Normal, log-Normal, Logistic, Log-logistic, Gamma, Gumbel and Beta
distribution according to the p value. The general assumption was that the normal distribution of random
variables follows symmetrical bell shaped curve. While in log normal, logarithm is normally distributed.
The gamma distribution is a two-parameter family of continuous probability distribution. Logistic
distribution shows a continuous probability distribution. Though It has same shape as normal
distribution but it develops heavier tails and high kurtosis. Adding with that the log-logistic distribution
is similar to log normal but has heavier tails. Gumbel distribution is used to model the distribution of
the maximum or the minimum of the number of samples of various distributions and it is not
symmetrical. And at last, Beta distribution is a continuous probability distributions defined on the
interval [0, 1] parametrized by two positive shape parameters. Those two parameter that appear as
exponents of the random variable and control the shape of the distribution. From the significant p value
of Chi squared test, we have found that the traffic flow distribution can be considered as Normal
distribution, Log-normal distribution, Logistic distribution and Beta distribution.

Monte Carlo simulation


Taking every 10 min traffic volume of 3 days as input Monte Carlo simulation process has been
applied and simulated 14400 results. Then the traffic flow of each 10 min interval is forecasted. In
Table 3, the result is shown as 2 hour interval. But figure 04 shows the total forecasting of each 10
min interval.

Table 3: Traffic flow prediction using Monte Carlo simulation


Time Actual flow Predicted flow Error (%)
00:00:00 340 365.42 7.47
02:00:00 63 81.56 29.46
04:00:00 211 186.87 11.43
06:00:00 664 638.99 3.76
08:00:00 1782 1709.52 2.63

777
10:00:00 1335 1359.37 1.82
12:00:00 1127 1217.18 8.00
14:00:00 1284 1301.52 1.36
16:00:00 1623 1585.80 2.29
18:00:00 1646 1686.42 2.45
20:00:00 946 969.20 2.45
22:00:00 682 635.48 6.82
Mean Average Error = 6.66
Percentage

From analysis the Mean Average Percentage Error has been found as 6.66% which is highly acceptable.

2000.00
1800.00
1600.00
1400.00
Volume

1200.00
1000.00
800.00
600.00
400.00
200.00
0.00
00:00:00
01:00:00
02:00:00
03:00:00
04:00:00
05:00:00
06:00:00
07:00:00
08:00:00
09:00:00
10:00:00
11:00:00
12:00:00
13:00:00
14:00:00
15:00:00
16:00:00
17:00:00
18:00:00
19:00:00
20:00:00
21:00:00
22:00:00
23:00:00
Time at every 10 min interval

Original Forecasted

Figure 04: Original vs Forecasted traffic flow at every 10 min interval

CONCLUSION
From the analysis of traffic flow of the study area it has found that the traffic flow distribution of 24
hours a day follows Normal distribution, Log-normal distribution, Logistic distribution and Beta
distribution for both normal day and weekend.
Monte Carlo simulation has shown only 6.66% Mean Absolute Percentage Error which is highly
acceptable.
So, traffic guidance and management will be now more easy and effective by taking step according to
the distribution properties. Also, the traffic congestion can be decreased and traffic control will be easier
by knowing the next day traffic volume of each 10 minutes using Monte Carlo simulation.

REFERENCES
Bagdonavicius V.B & Nikulin M.S. 2011. Chi-squared goodness-of-fit test for right censored data.
International Journal of Applied Mathematics & Statistics, Vol. 24; Issue No. SI-11A.
Bell M. G. H., and Iida Y. 1997. Transportation Network Analysis. John Wiley & Sons, New York.
Faysal I. Rahman. 2018. Short term traffic flow forecasting by Monte Carlo simulation. Transport
and Logistics: the International Journal. Volume 18, Issue 44, July 2018.ISSN 2406-1069
Herman R, T. Lam. 1984. Trip Time Characteristics of Journey Times on a Particular Route in
Central London. Traffic Engineering and Control, Vol. 25, 1984, pp. 510- 511.
Kumar K, Parida M, & Katiyar V. K. 2013. Short term traffic flow prediction for a non-urban
highway using artificial neural network. Procedia-Social and Behavioral Sciences, 104, 755-764.
Stathopoulos A, Karlaftis MG. 2003. A multivariate state space approach for urban traffic flow
modeling and prediction. Transportation Research Part C: Emerging Technologies, 11(2), 121 -135.
Sau J, El Faouzi NE, Assa AB, De Mouzon O. 2007. Particle filter-based realtime estimation and
prediction of traffic conditions. Applied Stochastic Models and Data Analysis, 12.

778
Xiong Zhihua, 2006. Study on Theory and Method of Travel Time Reliability about Road Network.
Beijing Jiaotong University.
Zeng S, Wu L, Jing L, Wu B. 2013. Study on Monte Carlo Simulation of Intelligent Traffic Lights
Based on Fuzzy Control Theory.
David Moore, William I. Notz, Michael A. Fligner. The Basic Practice of Statistics. (6th Ed.). Chapter
23

779

View publication stats

Potrebbero piacerti anche