Microsoft Word - ETASR_V12_N3_pp8584-8591 Engineering, Technology & Applied Science Research Vol. 12, No. 3, 2022, 8584-8591 8584 www.etasr.com Alhamdany et al.: Statistical Modeling of Time Headway on Urban Roads: A Case Study in Baghdad Statistical Modeling of Time Headway on Urban Roads: A Case Study in Baghdad Mohammed Alhamdany Department of Civil Engineering College of Engineering University of Baghdad Baghdad, Iraq m.abdulrazzaq1901m@coeng.uobaghdad.edu.iq Amjad Hamad Khalil Albayati Department of Civil Engineering College of Engineering University of Baghdad Baghdad, Iraq a.khalil@uobaghdad.edu.iq Received: 2 March 2022 | Revised: 22 March 2022 | Accepted: 1 April 2022 Abstract-Time headway is an important feature of traffic engineering, determined by measuring the time elapsed between successive vehicles crossing a point on the road. This paper proposes a time headway modeling of urban roads for each lane of selected sites based on headway distribution. The study was carried out in the capital of Baghdad, Iraq, choosing the Mohamed Al-Qassim and Qanat Al-Jaish highways to collect field headway data. Data were obtained using image processing and Python for video analysis. Each road consisted of six lanes divided into three lanes in each direction. The three lanes were studied in the forward movement of both highways. Seven flow rates were considered for the headway data to evaluate the flow state of each lane. The EasyFit 5.5 software was used to select an appropriate headway distribution for each flow rate, using a method depending on the Kolmogorov-Smirnov test for each lane. The results demonstrated that the proper model per lane was different. The selected distributions were used to develop a model through nonparametric regression using Theil's slope estimator method. Keywords-time headway; headway distribution; urban road; headway model; flow rate; traffic volume I. INTRODUCTION Traffic modeling is a fundamental tool in solving traffic engineering problems. Traffic simulation depends on modeling of time headway because it represents important characteristics in microscopic flow theory. The temporal distance between two successive vehicles is known as time headway [1]. It is the time difference between the arrival of a leading vehicle and the following vehicle to a reference point. Time headway depends on the flow rate of vehicles. A short time headway represents a high flow rate. This property are critical for roadway system planning, analysis, design, and operation [2]. Time headways can be used in various traffic evaluations such as safety, capacity, and service level [3]. The minimum of time headway is obtained when traffic flow reaches its maximum. To increase route capacity and reduce vehicle delays, traffic engineers can employ detailed modeling and assessment of vehicle headway distribution. A statistical model of time headway is essential for theoretical and simulation-based traffic modeling. In addition, headway distributions are used in digital simulations that mimic multi-lane and highway traffic [4]. Traffic volume, the proportion of big or heavy vehicles in the traffic, lane position, road layout, time, and weather affect the time headway distribution of vehicles and their appropriate models [5]. Lane distribution and speed are affected by lateral clearance on the roadsides [6]. Data are collected and analyzed using advanced technologies, such as image processing techniques, due to their effectiveness compared to sensor and loop detector methods [7]. Several studies examined the modeling of time headway distribution. A study on the effect of lane position on time lane distributions at high levels of traffic flow was presented in [8]. Based on headway distribution analysis, this study assessed driving behavior in several highway lanes in Isfahan, Iran. The results demonstrated that the fit model for the passing lane was distinct from the middle lane, due to drivers' behavior. Numerous drivers adopted unsafe headways through car- following conditions in the passing lane, demonstrating the high risk ability of the driver population, which led to considerable distances in capacities and statistical distribution models of two lanes. The proper model for the passing lane was the shifted lognormal while for the middle was the shifted gamma.A traffic detector based on a laser beam sensor was used to model a suburban artery in South Korea [9]. The observed data were divided into five flow states. The test rejected the randomness for a flow rate of 5-9veh/m. Hence, theoretical modeling was performed for the remaining flow rates 10-14, 15-19, 20-24, and 25-29veh/m. The goodness of fit tests, examined using the Kolmogorov-Smirnov (K-S) method, revealed that the best fits were the Johnson SB model for a flow rate of 10-14veh/m and the Johnson SU for the remaining three flows. The log-logistic model was the second-best fit for flow rates of 20-24 and 25-29veh/m. The progression of time under high flow conditions was studied on the Palestinian arterial street in Baghdad using two different periods for data collection [10]. The quality of fit was evaluated using the nonparametric chi-square test to determine the suitability of the logistic distribution of empirical data for the time headway distribution. The logistic probability distribution function described the time headway at the congested Palestine street for Corresponding author: Mohammed Alhamdany Engineering, Technology & Applied Science Research Vol. 12, No. 3, 2022, 8584-8591 8585 www.etasr.com Alhamdany et al.: Statistical Modeling of Time Headway on Urban Roads: A Case Study in Baghdad scale parameters ranging from 1.5 to 0.85. The differences in time headway distributions were studied in [11] for four flow levels, 0-600, 600-1200, 1200-1800, and 1800-2400PCU/h, for different two-lane and four-lane roads in Assam using the traffic volume data collected by cameras on four-lane roads. The Burr and Log-Pearson distributions were found to be suitable for 600-1200PCU/h, while the lognormal and log- logistic distributions fit the headway for traffic flows above 1200PCU/h. In [12], the mathematical distribution of vehicle headway was analyzed for freeway and arterial roads in Riyadh city, Saudi Arabia, evaluating low-volume traffic conditions. The findings demonstrated that the shifted exponential and the gamma distributions appeared to fit data on freeways and arterials, respectively. The time headway distributions of vehicles traveling on the urban expressway in Bangkok, Thailand, were examined in [1], using exponential, lognormal, and generalized extreme value GEV distributions. This study showed that the GEV distribution could describe more than 90% of the empirical distributions on most lanes and sections of an expressway. On the other hand, the exponential was the less practical distribution, as it only described the experimental distributions during ultra-low traffic conditions. II. DATA COLLECTION Field data were collected at two sites, as shown in Figures 1 and 2. The first site was the Mohamed Al-Qassim Highway, a 20km-long major arterial expressway, while the second was the Qanat Al-Jaish Highway, a 22km-long major arterial expressway in Baghdad. The camera was mounted on the footbridges at approximately 10m height from the road surface to monitor traffic flow. Fig. 1. Site No.1 Mohamed Al-Qassim Highway. Fig. 2. Site No.2 Qanat Al-Jaish Highway. Table I shows the camera coordinates. The selected sections consisted of six main lanes, three lanes in each direction, termed left or lane one, middle or lane two, and right or lane three. The study section was distant from ramps, loops, and horizontal or vertical curves. Data were collected during daytime, under ideal weather and good visual conditions. Data were selected to include different levels of traffic flow and the stop-and-go situation was neglected. Traffic data for site one were collected for 21 hours over three days: 3, 4, and 5/5/2021. Two hours of the second day, 1:00 PM and 2:00 PM, were excluded due to the stop-and-go condition of the vehicles. Data for site two were collected for 18 hours over three days: 22, 23, and 24/2/2021. TABLE I. CAMERA COORDINATES Camera Location coordinates N E Site one 33° 18' 44.87'' 44° 27' 03.30'' Site two 33° 19' 58.94'' 44° 27' 52.95'' The spot speed of vehicles passing each site was measured using a Bushnell 101911 speed gun. The speed gun was set to measure the speed in km/h and pointed in the direction of the moving vehicle. This speed gun transmits signals to moving objects and can capture a vehicle moving faster than 16km/h [13]. The average speed was determined for an interval of 15min. Therefore, the sample size of speed data of 100veh/h/ln was randomly selected from each lane. Figure 3 shows the direction and equipment used to record the data. The video clips were analyzed using Python to extract the real data, as shown in Figure 4. Fig. 3. The layout of the video cameras and speed gun on the site. Fig. 4. Data extraction from video recording using Python. Engineering, Technology & Applied Science Research Vol. 12, No. 3, 2022, 8584-8591 8586 www.etasr.com Alhamdany et al.: Statistical Modeling of Time Headway on Urban Roads: A Case Study in Baghdad The data were compared for their accuracy. The extracted data included the number of vehicles, vehicle classification, and time headway for each lane. Figures 5 and 6 depict the traffic volume observed during the study. Fig. 5. Traffic volume of site 1 (Mohammed Al-Qassim Highway). Fig. 6. Traffic volume of site 2 (Qanat Al-Jaish Highway). Seven flow rates were used to represent each lane's different flow state conditions and provide accurate headway data. Tables II and III illustrate a few characteristics of the time headways average speed, defined by the spot speed for each flow rate. TABLE II. COLLECTED DATA FOR SITE 1 Position Rate of flow v/h/ln Average speed (km/h) Sample size Av. headway (s) Max headway (s) Min headway (s) Heavy vehicles (%) Left lane: Lane 1 937 91 937 3.84 44.74 0.37 15 1291 91.03 1291 2.788 19.65 0.33 10 1366 91.01 1358 2.636 21.63 0.27 10 1493 90.62 1485 2.411 17.38 0.23 16 1679 90.23 1675 2.143 17.4 0.2 9 1812 89.282 1808 1.986 20.353 0.166 24 2015 87.609 1997 1.786 14.65 0.23 13 Middle lane: Lane 2 903 83.53 902 3.988 26.33 0.3 37 1029 82.566 1024 3.497 21.57 0.2 29 1142 81.658 1137 3.152 20.17 0.2 19 1278 80.987 1278 2.816 13.31 0.23 20 1384 79.918 1359 2.6 16.28 0.17 31 1445 78.212 1433 2.491 15.58 0.2 29 1575 72.762 1574 2.286 13.01 0.27 31 Right lane: Lane 3 311 76.26 311 11.566 59.85 1.07 30 418 74.1 415 8.61 42.67 0.7 12 423 72.21 421 8.515 37.84 0.73 21 475 70 475 7.574 41.7 1 35 500 68.525 498 7.201 62.1 0.4 27 581 66.21 580 6.192 35.56 0.3 20 684 64.041 675 5.262 46.01 0.3 19 TABLE III. COLLECTED DATA FOR SITE 2 Position Rate of flow v/h/ln Average speed (km/h) Sample size Av. headway (s) Max headway (s) Min headway (s) Heavy vehicles (%) Lane 1 985 91.158 983 3.655 22.12 0.2333 35 1286 89.285 1280 2.799 28.43 0.2 18 1568 87.677 1562 2.295 15.55 0.3 29 1757 86.773 1745 2.049 17.38 0.27 21 1935 85.732 1926 1.86 14.18 0.3 25 2106 83.846 2103 1.709 12.71 0.2 30 2345 82.333 2345 1.535 10.61 0.2 28 Lane 2 841 83.325 840 4.278 29.23 0.33 31 932 82.187 926 3.862 25.92 0.4 37 1090 80.562 1081 3.303 16.82 0.4 26 1131 80.1 1128 3.182 21.65 0.23 18 1271 78.762 1270 2.831 19.92 0.33 38 1393 77.337 1392 2.583 14.48 0.27 19 1490 74.975 1484 2.415 19.48 0.23 31 Lane 3 461 66.287 454 7.804 41.84 0.67 34 515 65.45 514 6.991 31.73 0.5 18 593 64.512 588 6.072 38.2 0.2 11 612 63.61 610 5.883 32.93 0.64 21 735 61.337 735 4.895 38.5 0.37 32 843 60.187 842 4.272 33.06 0.4 20 950 58.95 949 3.787 28.13 0.5 14 Fig. 7. Measurement of time headway. The flow rate was calculated using: ���� ��� �� ���� (1) where havg is the average headway in a lane. Time headway was defined as the time between bumper to bumper of successive vehicle arrivals at a reference point or line on the lane playback screen. This time was simultaneously calculated for multiple lanes, as shown in Figure 7. III. AUTOMATIC VEHICLE AND CLASSIFICATION METHOD Data were extracted from videos using Python and image- processing technologies to analyze vehicle counting, vehicle classifications, and time headway for each lane. Python and the OpenCV library were used to count the vehicles. The PyCharm IDE was used to develop the code, and Prettify was used to display it. Additionally, the NumPy, CV2, and CSV libraries were also used. The developed method combined grayscale and threshold algorithms to improve the quality and accuracy of vehicle detection. A dilate filter was used to track the position of each vehicle and categorize the detected vehicles into distinct classes, which were then tallied individually for each lane to offer helpful information for traffic flow analysis. The method's flowchart is depicted in Figure 8. Engineering, Technology & Applied Science Research Vol. 12, No. 3, 2022, 8584-8591 8587 www.etasr.com Alhamdany et al.: Statistical Modeling of Time Headway on Urban Roads: A Case Study in Baghdad Fig. 8. Flowchart of the processing algorithm. The count of vehicles was executed when the contour areas touched the Region Of Interest (ROI). The ROI was formed by drawing three imaginary lines diagonally across the road, connecting the two ends representing the three lanes [14]. When the front bumper of the vehicle touched this imaginary line, the value of the counter increased, indicating that the object's movement was observed. An imaginary was drawn diagonally by connecting two ROI points. The virtual detector was used for the classification. This method consisted of a rectangle box, considering the ROI, and the vehicles within that box were identified based on their dimensions, i.e., width and height [15]. TABLE IV. RESULTS OF AUTOMATIC AND MANUAL COUNTING Site No. Time Date Automated method (using Python) Manual method Lane 1 Lane 2 Lane 3 Total Lane 1 Lane 2 Lane 3 Total Two 8:00 a.m. 24/02/2021 1579 1123 575 3277 1518 1269 619 3406 Two 2:00 p.m. 24/02/2021 2345 1392 865 4602 2351 1437 865 4653 Two 7:00 a.m. 23/02/2021 983 840 514 2337 976 874 534 2368 Two 11:00 a.m. 23/02/2021 1991 1277 748 4016 1879 1348 801 4028 Two 3:00 p.m. 22/02/2021 1729 1155 566 3450 1694 1224 600 3518 One 7:00 a.m. 03/05/2021 937 902 550 2389 931 918 552 2401 One 8:00 a.m. 03/05/2021 1358 1024 362 2744 1358 1077 358 2793 One 4:00 p.m. 04/05/2021 1797 1104 415 3316 1778 1127 419 3324 One 10:00 a.m. 05/05/2021 1808 1278 421 3507 1845 1302 447 3594 One 2.00 p.m. 05/05/2021 1752 1387 475 3614 1832 1443 463 3738 Fig. 9. The fit distribution obtained using the EasyFit v5.5 software. The colors were specified to track the object using a histogram-oriented technique. In this method, the contour properties, such as solidity and contour area, were extracted and compared with the assumed values to determine whether the vehicle is a passenger or a heavy vehicle. The contours represent the connected pixels in an image. The contours of the foreground objects were detected after performing background subtraction. The video was binarized into frames to obtain the foreground. The Open CV method was used for the process of thresholding black and white images. The Open CV algorithm operates in the form of thresholding, as it considers the frame into two levels, i.e. background and foreground. Additionally, a binary threshold was used for the segmentation of a vehicle. The vehicle counting results were obtained and compared using manual and automated methods, and it was observed that the latter method provided accurate results quickly, as shown in Table IV. Engineering, Technology & Applied Science Research Vol. 12, No. 3, 2022, 8584-8591 8588 www.etasr.com Alhamdany et al.: Statistical Modeling of Time Headway on Urban Roads: A Case Study in Baghdad IV. METHOD The EasyFit v5.5 software examined the collected data to select an appropriate distribution model, as shown in Figure 9. The distributions for each flow are shown in Table V. The analysis was carried out by evaluating the goodness of fit in the K-S test. It used the maximum likelihood method for the estimation parameters of fit distributions [16]. The K-S test is commonly used to detect whether two datasets are significantly different or not by calculating the probability of similarity between the two distributions [17]. Since the K-S tests are nonparametric and do not require prior assumptions based on distribution, they were applied to the observed data for distribution fitting. In this study, five distributions were used, where most of them were previously used for time headway modeling of highways and freeways: Pearson 6 [18], inverse Gaussian [19], generalized Pareto [20], Dagum [21], and generalized gamma. TABLE V. EQUATIONS AND PARAMETERS FOR DISTRIBUTIONS Distribution Equation Parameters Pearson 6 ���� �������������,����� �����!�� α1, shape parameter >0 α2, shape parameter >0 β, scale parameter >0 Inverse Gaussian ���� " #$%�&'(�) exp-− #�&'/'0��$0��&'(� 1 λ, continuous parameter >0 µ, continuous parameter >0 γ, continuous location parameter >0 Generalized Pareto ���� 23 4 35�6�1 + 9�� − :� '�'�; < ,9 ≠ 01 0 σ, scale parameter >0 µ, location parameter Dagum ���� �A�����;����� ������;!� k, shape parameter >0 a, shape parameter>0 β, scale parameter >0 Generalized Gamma ���� A�&'/�;����;�B��� ×exp �−��� −D�/F�A� k, shape parameter >0 α, shape parameter >0 γ, location parameter The following process was used to determine the appropriate time headway distribution model per lane: • The goodness of fit of the distribution of total headways collected from the lane was examined per lane. • The goodness of fit of the distribution of the headways occurring for every flow scope (veh/h/ln) was evaluated for each lane. The flow scopes are presented in Tables ΙΙ and ΙΙΙ. • The acceptable models were identified for each lane using the above two steps. • A standardized model was selected using the Theil's slope estimator method for the flow ranges for each lane. The parameters of time headway distribution models were estimated based on the previous steps. V. RESULTS The appropriate distribution for the time headway modeling was determined by the K-S test for each flow scope, and the results are shown in Tables VI and VII. The goodness of fit of the models was tested with a 5% level of significance. The hypotheses for each test were: The compatibility of the headway distribution with the fitted model is rejected (h=1) or not (h=0). The model parameters were estimated through the headway data for each test, as shown in Tables VIII and IX. Each flow rate's parameter estimation was performed using the conventional Maximum Likelihood Estimate (MLE). The MLE method was used because it is an unbiased estimator [22]. The results showed that the flow scope in the left lane of site 1 followed Pearson type 6 distribution, where the p-value of flow rates 937, 1291, 1366, 1493, and 2015v/h/ln was greater than 0.05. However, the flow rates of 1679 and 1812veh/h/ln were less than 0.05, but greater than 0.02. The middle lane results demonstrated that the flow scope followed the inverse Gaussian distribution. The results of the right lane showed that the flow scope followed the generalized Pareto distribution. The left lane in site two followed the Dagum distribution with a p-value greater than 0.05, except for the flow rate of 985veh/h/ln with a p-value less than 0.05 but greater than 0.02. The middle and right lanes showed that the flow scope followed the generalized gamma distribution. The p-value, rank, decision to reject or accept the distribution for each flow, and rank value to determine if the distribution is most compatible with the data were calculated. These results were used to determine the appropriate distribution for each flow rate. The estimation of parameters for each lane was performed using the Theil slope estimator method in MATLAB. The parameters of the simple linear regression model were determined using the estimated parameters for each flow rate. A t-test was performed to compare the regression coefficients with the null hypothesis, as shown in Tables X and XI. Theil's slope estimator method was used for the parameters of the linear regression model because it is simple to perform in the case of small sample sizes [23]. Subsequently, the mean flow rate (F) function, the F0G denoting the constant and F1G denoting the slope in the model were calculated. TABLE VI. K-S TEST DISTRIBUTION OF HEADWAY FOR SITE 1 Lane 1 Lane 2 Lane 3 Pearson 6 distribution Inverse Gaussian distribution Generalized Pareto distribution Flow rate p-value Rank Reject Flow rate p-value Rank Reject Flow rate p-value Rank Reject 937 0.32 11 No 903 0.67 4 No 311 0.86 2 No 1291 0.104 3 No 1029 0.86 3 No 418 0.93 3 No 1366 0.23 2 No 1142 0.303 4 No 423 0.99 1 No 1493 0.14 1 No 1278 0.52 3 No 475 0.91 2 No 1679 0.041 2 Yes 1384 0.17 4 No 500 0.64 9 No 1812 0.048 7 Yes 1445 0.2 2 No 581 0.83 2 No 2015 0.102 6 No 1575 0.5 6 No 684 0.8 7 No Engineering, Technology & Applied Science Research Vol. 12, No. 3, 2022, 8584-8591 8589 www.etasr.com Alhamdany et al.: Statistical Modeling of Time Headway on Urban Roads: A Case Study in Baghdad TABLE VII. K-S TEST DISTRIBUTION OF HEADWAY FOR SITE 2 Lane 1 Lane 2 Lane 3 Dagum distribution Generalized gamma fistribution Generalized gamma distribution Flow rate p-value Rank Reject Flow rate p-value Rank Reject Flow rate p-value Rank Reject 985 0.042 13 Yes 841 0.99 1 No 461 0.91 4 No 1286 0.086 6 No 932 0.58 4 No 515 0.51 2 No 1568 0.13 9 No 1090 0.93 2 No 593 0.97 5 No 1757 0.34 1 No 1131 0.67 2 No 612 0.77 7 No 1935 0.37 1 No 1271 0.74 4 No 735 0.87 1 No 2106 0.13 1 No 1393 0.37 6 No 843 0.96 3 No 2345 0.13 3 No 1490 0.28 10 No 950 0.25 5 No (Note: No=not rejected , Yes=rejected) TABLE VIII. ESTIMATED PARAMETERS FOR FITTED DISTRUBUTION MODELS – SITE 1 No. Lane 1 Lane 2 Lane 3 Pearson 6 distribution Inverse Gaussian distribution Generalized Pareto distribution 1 α1=10.102, α2=2.0324, b=0.4249 λ=7.125, µ=4.251, γ= -0.262 k=0.041, σ=10.187, µ=0.936 2 α1=19.641, α2=2.0443, b=0.1622 λ=6.218, µ=3.793, γ= -0.296 k=-0.0187, σ=7.945, µ=0.8104 3 α1=12.681, α2=2.3164, b=0.2888 λ=6.256, µ=3.405, γ= -0.253 k=0.0311, σ=7.3578, µ=0.9213 4 α1=19.9, α2=2.4289, b=0.18102 λ=5.971, µ=3.053, γ= -0.236 k=0.0116, σ=6.655, µ=0.84031 5 α1=8.3206, α2=2.8309, b=0.4846 λ=5.885, µ=2.815, γ= -0.214 k=0.1318, σ=5.412, µ=0.9672 6 α1=10.021, α2=2.8365, b=0.3710 λ=4.079, µ=2.517, γ= -0.043 k=0.02808, σ=5.409, µ=0.6263 7 α1=17.498, α2=3.2427, b=0.2309 λ=4.682, µ=2.369, γ= -0.082 k=0.0722, σ=4.3503, µ=0.5739 TABLE IX. ESTIMATED PARAMETERS FOR FITTED DISTRIBUTION MODELS – SITE 2 No. Lane 1 Lane 2 Lane 3 Dagum distribution Generalized gamma distribution Generalized Gamma distribution 1 κ=4.3043, α=1.468, β=0.688 k=0.5002, α=5.256, β=0.1224, γ=0.2544 k=0.743, α=1.651, β=1.659, γ=0.212 2 κ=2.0897, α=1.731, β=1.062 k=0.662, α=2.951, β=0.607, γ=0.368 k=0.881, α=1.335, β=1.715, γ=0.285 3 κ=2.536, α=1.810, β=0.831 k=0.784, α=2.007, β=1.115, γ=0.3748 k=0.899, α=1.429, β=1.804, γ=0.293 4 κ=2.045, α=2.161, β=0.994 k=0.681, α=2.922, β=0.560, γ=0.179 k=0.601, α=0.934, β=1.393, γ=0.135 5 κ=1.4229, α=2.5797, β=1.2363 k=0.441, α=6.710, β=0.0278, γ=0.2823 k=0.98068, α=1.27683, β=1.7327, γ=0.36667 6 κ=1.660, α=2.685, β=1.08 k=0.48265, α=5.679, β=0.05310, γ=0.216 k=0.956, α=1.709, β=1.713, γ=0.3323 7 κ=1.036, α=2.403, β=1.158 k=0.425, α=9.150, β=0.0103, γ=0.173 k=1.029, α=1.7431, β=1.824, γ=0.464 Each estimated parameter corresponded to a mean flow rate (F). Then, the parameters could be calculated as functions of the mean flow rate in each lane. For the first site (Mohammed Al-Qassim Highway): • The parameters of the Pearson Type 6 distribution model for the left lane (Lane 1) were: �� −3.461+ 0.012×M (2) �$ 1.283+ 0.001 ×M (3) F 0.805−0.0004∗ M (4) • The parameters of the inverse Gaussian distribution model for the middle lane (Lane 2) were: Q 9.212 −0.003∗M (5) : 7.289− 0.003 ∗M (6) T −0.347 +0.0001∗M (7) • The parameters of the generalized Pareto distribution model for the right lane (Lane 3) were: 9 0.085−0.00013∗ M (8) < 17.146−0.022085∗ M (9) : 1.0483− 0.00036∗M (10) For the second site (Qanat Al-Jaish highway): • The parameters of the Dagum distribution model for the left lane (Lane 1) were: 9 6.8958−0.00276∗ M (11) U 0.594+0.00088∗ M (12) F 0.406−0.0003∗ M (13) • The parameters of the generalized gamma distribution model for the middle lane (Lane 2) were: 9 −0.106+0.0007∗ M (13) U 11.155 −0.007∗ M (14) F −2.109+0.0023∗M (15) T = 0.37 − 0.0001 ∗ M (16) • The parameters of the generalized gamma distribution model for the right lane (Lane 3) were: 9 0.5924+0.0005∗ M (17) U 0.9451+0.0008∗ M (18) F 1.2574+0.0009∗ M (19) T 0.1333+ 0.00028∗M (20) Given the parameters of each model, the headway distributions can be obtained for different flow rates in each lane. At peak traffic flow hours, the maximum observed flow rate at which vehicles can reasonably pass site one was 2015veh/h/ln in the left lane. This demonstrates that the lane's Engineering, Technology & Applied Science Research Vol. 12, No. 3, 2022, 8584-8591 8590 www.etasr.com Alhamdany et al.: Statistical Modeling of Time Headway on Urban Roads: A Case Study in Baghdad true capacity is approximately this amount. In the middle and right lanes, the corresponding values were about 1575 and 684veh/h/ln, respectively. For site two, the maximum observed flow rates were 2345, 1490, and 950veh/h/ln in the left, middle, and right lanes respectively. The distinct behavioral pattern of drivers in the left lane, as well as their tendency to tailgate at high speeds, resulted in a disparity in lane capacity and safety. The flow rates and statistical criteria such as mean, median, and standard deviation values were calculated based on the selected models to better evaluate the reasons for the different models chosen per lane, and they were compared with the observed data, as shown in Table XII. TABLE X. ESTIMATION OF PARAMETERS USING NONPARAMETRIC REGRESSION FOR EACH LANE - SITE 1 Position Parameters VWG VXG t-test p-value R2 Parameter estimation Lane 1 α1 -3.461 0.012 4.455 0.01 0.972 14.4215 α2 1.283 0.001 9.2 0.001 0.953 2.4931 β 0.805 -0.0004 4.619 0.0095 0.655 0.2331 Lane 2 λ 9.212 -0.00258 7.9616 0.002 0.941 5.9747 µ 7.2894 -0.003314 45.091 1.20E-05 0.978 3.1436 γ -0.347 0.0001 2.119 0.009 0.687 0.3471 Lane 3 k 0.085 -0.00013 2.654 0.038 0.412 0.0176 σ 17.146 -0.022085 15.29 0.0003 0.971 6.4441 µ 1.0483 -0.000359 2.5336 0.0125 0.59 0.8739 As seen in Table XII, the convergence of the results for the flow values for each lane amongst the model and the real indicates the model's strength. At the same flows, the mean value of headways in the left lane is less than the middle, which is less than the right. The median value of headways in the left lane is lower than the median value in the middle, which is less than the right. This indicates that the mean and median relationship is directly proportional to each lane. This also shows that the driver's behavior is different in each lane, even when the flows are the same in different lanes. TABLE XI. ΕSTIMATION OF PARAMETERS USING NONPARAMETRIC REGRESSION FOR EACH LANE - SITE 2 Position Parameters VWG VXG t-test p-value R2 Parameter estimation Lane 1 k 6.8958 -0.00276 11.97 0.0006 0.911 2.1705 α 0.594 0.00088 12.342 0.0005 0.986 2.1129 β 0.406 0.0003 6.372 0.003 0.891 2.1129 Lane 2 k -0.106 0.0007 4.169 0.012 0.59 0.709 α 11.155 -0.007 2.9 3.10E-02 0.377 2.991 β -2.109 0.0023 4.818 9.00E-03 0.412 0.6378 γ 0.37 -0.0001 2.637 0.038 0.776 0.241 Lane 3 k 0.5924 0.0005 8.3357 0.0018 0.963 0.8859 α 0.9451 0.0008 5.1 0.0073 0.95 1.4091 β 1.2574 0.0009 5.0689 0.0074 0.919 1.7522 γ 0.1333 0.00028 6.1401 0.0043 0.937 0.2934 TABLE XII. COMPARISON OF CHARACTERISTICS OF HEADWAYS FOR THE SAME LANE Site No. Lane No. Flow rate (v/h/ln) Mean (sec) Median (sec) Std. deviation (sec) Real Model Real Model Real Model Real Model 1 1 1432 1591 2.514 2.363 1.714 1.504 2.5 3.11 2 1210 1261 2.974 2.855 2.29 2.17 2.328 2.284 3 459 484 7.846 7.438 5.504 5.423 2.414 2.6 2 1 1587 1608 2.268 2.239 1.62 1.518 2.01 2.83 2 1122 1125 3.207 3.199 2.428 2.403 2.641 2.691 3 635 641 5.671 5.62 4.085 3.907 2.3786 2.593 VI. CONCLUSION This study investigated the characteristics of the time headway modeling for each lane on two urban highways in Baghdad. The field observations used video recordings and simulations of the two sites exhibited different statistical distributions of time headways for varying flow level ranges under mixed traffic conditions. Five probability distributions were considered for investigating the time headways. Furthermore, the fitted models were different for different lanes depending on the driver's behavior while selecting the lane and their movement within it. The results are summarized as follows: • 39 hours of traffic data were collected and the ratio of heavy vehicles ranged from 9% to 38% of total flow. • According to the field observations, the results indicate that Mohamed Al-Qassim Highway's minimum and maximum time headways were 0.166 and 59.85sec, respectively. The Qanat Al-Jaish Highway had a minimum time headway of 0.2sec and a maximum of 41.84sec. Compared to other countries, such as the USA, it is very difficult to follow a vehicle safely with a time headway of fewer than 2sec [24]. In Germany, the recommended minimum distance headway is half the speedometer, which means that a car traveling at 80km/h should maintain a distance of at least 40m. In Sweden, the National Road Administration recommends time headway of 3sec in rural areas. Police uses a critical time headway of 1sec as an orientation to impose fines [25]. This reflects the behavior of drivers on Iraqi roads. This is a traffic violation that may lead to traffic accidents while these violations increase with traffic volume. • The comparison between automated vehicle counting and the manual method showed accuracy results of 96% for total flow and 88-97% for each lane. These results, along with the less time to extract the data, show the effectiveness of the automated method. • Several statistical models were selected using EasyFit, and the parameters for each flow rate were estimated using MLE. The K-S test was used to examine the goodness of fit tests. The parameters for each model in a lane were estimated using Theil's slope estimator method. By getting Engineering, Technology & Applied Science Research Vol. 12, No. 3, 2022, 8584-8591 8591 www.etasr.com Alhamdany et al.: Statistical Modeling of Time Headway on Urban Roads: A Case Study in Baghdad the parameters of each model, headway distributions for different flow rates per lane can be obtained. • In the case of the Mohammed Al-Qassim highway, the left lane had a mean flow rate of 1432veh/h/ln for the observed data and 1591v/h/ln for the modeled data using Pearson's Type 6 distribution, showing a 6% error. The middle lane had a mean flow rate of 1210veh/h/ln for the observed data and 1261veh/h/ln for the modeled data using an inverse Gaussian distribution, having a 4% error. The right lane had a mean flow rate of 459veh/h/ln for the observed data and 484veh/h/ln for the modeled data using a generalized Pareto distribution with a 5% error. • In the case of the Qanat Al-Jaish highway, the left lane had a mean flow rate of 1587veh/h/ln for the observed data and 1608vrh/h/ln for the modeled data using the Dagum distribution, giving an error of 1.3 %. The middle lane had a mean flow rate of 1122veh/h/ln for the observed data and 1125veh/h/ln for the modeled data using a generalized gamma distribution, with an error of 0.3 %. The right lane had a mean flow rate of 635veh/h/ln for the observed data and 620veh/h/ln for the modeled data using a generalized gamma distribution, giving an error of 2.4 %. These results show that the driver's behavior is different in each lane, even at the same flows in other lanes. REFERENCES [1] S. Panichpapiboon, "Time-Headway Distributions on an Expressway: Case of Bangkok," Journal of Transportation Engineering, vol. 141, no. 1, Jan. 2015, Art. no. 05014007, https://doi.org/10.1061/(ASCE)TE. 1943-5436.0000731. [2] S. A. Arhin, A. Gatiba, M. Anderson, B. Manandhar, and M. Ribbisso, "Acceptable Wait Time Models at Transit Bus Stops," Engineering, Technology & Applied Science Research, vol. 9, no. 4, pp. 4574–4580, Aug. 2019, https://doi.org/10.48084/etasr.2966. [3] G. J. Qasim, A. K. Jameel, A. M. Abdulwahab, and A. S. Rajaa, "Estimating a congested road capacity – headway relationship of a multi- lane highway in an urban area based on lane position," Periodicals of Engineering and Natural Sciences (PEN), vol. 8, no. 3, pp. 1263–1279, Jul. 2020, https://doi.org/10.21533/pen.v8i3.1449. [4] H. T. Zwahlen, E. Oner, and K. R. Suravaram, "Approximated Headway Distributions of Free-Flowing Traffic on Ohio Freeways for Work Zone Traffic Simulations," Transportation Research Record, vol. 1999, no. 1, pp. 131–140, Jan. 2007, https://doi.org/10.3141/1999-14. [5] S. Das, G. Mahapatra, A. K. Maurya, and A. Minhans, "An empirical study of vehicle time headways for different roadway facilities," presented at the 3rd Conference of Transportation Research Group of India (3rd CTRG), Kolkata, India, Dec. 2015. [6] N. Hazim, L. Shbeeb, and Z. A. Salem, "Impact of Roadside Fixed Objects in Traffic Conditions," Engineering, Technology & Applied Science Research, vol. 10, no. 2, pp. 5428–5433, Apr. 2020, https://doi.org/10.48084/etasr.3226. [7] M. U. Farooq, A. Ahmed, S. M. Khan, and M. B. Nawaz, "Estimation of Traffic Occupancy using Image Segmentation," Engineering, Technology & Applied Science Research, vol. 11, no. 4, pp. 7291–7295, Aug. 2021, https://doi.org/10.48084/etasr.4218. [8] S. M. Abtahi, M. Tamannaei, and H. Haghshenash, "Analysis and modeling time headway distributions under heavy traffic flow conditions in the urban highways: case of Isfahan," Transport, vol. 26, no. 4, pp. 375–382, Dec. 2011, https://doi.org/10.3846/16484142.2011.635694. [9] J. Jang, C. Park, B. Kim, and N. Choi, "Modeling of Time Headway Distribution on Suburban Arterial: Case Study from South Korea," Procedia - Social and Behavioral Sciences, vol. 16, pp. 240–247, Jan. 2011, https://doi.org/10.1016/j.sbspro.2011.04.446. [10] Z. A. Alkaissi, "Analytical Study of Headway Time Distribution on Congested Arterial: A Case Study Palestine Road in Baghdad City," in Sustainable Solutions for Railways and Transportation Engineering, Cham, 2019, pp. 85–97, https://doi.org/10.1007/978-3-030-01911-2_8. [11] S. Das, A. K. Maurya, "Time Headway Analysis for Four-Lane and Two-Lane Roads," Transportation in Developing Economies, vol. 3, no. 1, Apr. 2017, Art. no. 9, doi: 10.1007/s40890-017-0039-8. [12] A. S. Al-Ghandi, "Modeling vehicle headways for low traffic flows on urban freeways and arterial roadways," in Transactions on the Built Environment, vol. 41, WIT Press, 1999, pp. 321–341. [13] H. M. Al-Mosawe, D. Alobaydi, and A. Albayati, "Development of Traffic Noise Prediction Model in an Educational Urban Area," Civil Engineering Journal, vol. 4, no. 11, pp. 2588–2595, Nov. 2018, https://doi.org/10.28991/cej-03091183. [14] N. J. Uke and R. C. Thool, "Moving Vehicle Detection for Measuring Traffic Count Using OpenCV," Journal of Automation and Control Engineering, vol. 1, no. 4, pp. 349–352, Dec. 2013, https://doi.org/ 10.12720/joace.1.4.349-352. [15] E. R. Khansari, M. Tabibi, and F. M. Nejad, "Studying Non-coaxiality in Non-lane-based Car-following Behavior," Civil Engineering Journal, vol. 4, no. 12, pp. 2840–2852, Dec. 2018, https://doi.org/10.28991/cej- 03091202. [16] Y. V. Navandar, A. Dhamaniya, and D. A. Patel, "Headway distribution for manually operated tollbooths in India in mixed traffic conditions," Proceedings of the Institution of Civil Engineers - Transport, vol. 173, no. 1, pp. 30–38, Feb. 2020, https://doi.org/10.1680/jtran.17.00138. [17] E. Oner, "Approximated headway distributions for non-signalized and signalized freeway entrance ramps," Procedia - Social and Behavioral Sciences, vol. 20, pp. 381–389, Jan. 2011, https://doi.org/10.1016/ j.sbspro.2011.08.044. [18] R. Riccardo and G. Massimiliano, "An Empirical Analysis of Vehicle Time Headways on Rural Two-lane Two-way Roads," Procedia - Social and Behavioral Sciences, vol. 54, pp. 865–874, Oct. 2012, https://doi.org/10.1016/j.sbspro.2012.09.802. [19] A. Shoaeb, S. El-Badawy, S. Shawly, and U. E. Shahdah, "Time headway distributions for two-lane two-way roads: case study from Dakahliya Governorate, Egypt," Innovative Infrastructure Solutions, vol. 6, no. 3, Jul. 2021, Art. no. 165, https://doi.org/10.1007/s41062-021- 00531-y. [20] S. K. Dubey, B. Ponnu, and S. S. Arkatkar, "Time Gap Modeling under Mixed Traffic Condition: A Statistical Analysis," Journal of Transportation Systems Engineering and Information Technology, vol. 12, no. 6, pp. 72–84, Dec. 2012, https://doi.org/10.1016/S1570- 6672(11)60233-X. [21] S. Dey, B. Al-Zahrani, and S. Basloom, "Dagum Distribution: Properties and Different Methods of Estimation," International Journal of Statistics and Probability, vol. 6, no. 2, Feb. 2017, https://doi.org/10.5539/ ijsp.v6n2p74. [22] G. Zhang, Y. Wang, H. Wei, and Y. Chen, "Examining Headway Distribution Models with Urban Freeway Loop Event Data," Transportation Research Record, vol. 1999, no. 1, pp. 141–149, Jan. 2007, https://doi.org/10.3141/1999-15. [23] O. Adil, "Using nonparametric Theil’s estimator to estimate parameters of a simple linear regression model in the case of small samples," Dec. 2019. [24] T. Ako and I. T. Yusuf, "Time Headway and Vehicle Speed Studies of a Road Section in Ilorin, Nigeria," USEP: Journal of Research Information in Civil Engineering, vol. 13, no. 3, pp. 1031–1041, 2016. [25] R. S. Shirazinejad and S. Dissanayake, "Speed Characteristics in Relation to Speed Limit Increase and Its Influence on Driver’s Speed Selection Behavior," Sustainability, vol. 12, no. 4, Jan. 2020, Art. no. 1369, https://doi.org/10.3390/su12041369.