{'fraction_non_alphanumeric': 0.024918985361492903, 'fraction_numerical': 0.008548441166610795, 'mean_word_length': 4.818703944516688, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
New stochastic highway capacity estimation method and why product limit method is unsuitable

Kaplan-Meier estimate, commonly known as product limit method (PLM), and maximum likelihood estimate (MLE) methods in general are often cited as means of stochastic highway capacity estimation. This article discusses their unsuitability for such application as properties of traffic flow do not meet the assumptions for use of the methods. They assume the observed subject has a history which it went through and did not fail. However, due to its nature, each traffic flow measurement behaves as a separate subject which did not go through all the lower levels of intensity (did not"age"). An alternative method is proposed. It fits the resulting cumulative frequency of breakdowns with respect to the traffic flow intensity leading to the breakdown instead of directly estimating the underlying probability distribution of capacity. Analyses of accuracy and sensitivity to data quantity and censoring rate of the new method are provided along with comparison to the PLM. The results prove unsuitability of the PLM and MLE methods in general. The new method is then used in a case study which compares capacity of a work-zone with and without a traffic flow speed harmonisation system installed. The results confirm positive effect of harmonisation on capacity.


Introduction
Highway capacity is one of the key variables in the field of road traffic engineering. It defines how many vehicles can pass through a road profile over time (see section 2 for more elaborate discussion of capacity definition). If demand exceeds capacity congestion occurs and queues start forming. That leads to reduced level of service, increased travel times, and most likely also increased environmental impacts (Barth andBoriboonsomsin 2008, Daniel andBekka 2000) and risk of accidents (Zheng 2012). Some papers are more reserved in their conclusions on the matter of environmental (Atkinson et al. 2009) and accident risk impacts (Wang et al. 2009). Knowing the capacity properties of a highway is necessary for many traffic engineering problems, e.g. to assess the sufficiency of the existing infrastructure, to predict queues, or to efficiently control traffic.
Congestions and queues form at bottlenecks, i.e. the weak points of traffic infrastructure with reduced capacity compared to surrounding sections. The bottleneck that triggered given congestion is called active bottleneck. There may be several bottlenecks on given part of road network but there is only one active bottleneck for one particular congestion. The highway sections or links themselves are rarely bottlenecks but phantom congestions can form on long sections at times of high demand. Still, congestions usually occur on some particular point of the link with reduced capacity, e.g. steep incline, on-or off-ramp, lane drop, or work-zone. Therefore, capacity measurements are usually focused on these bottlenecks with recurrent congestions. In some cases, a moving bottleneck such as slow vehicle is possible, too. These can also be utilized as a mean of traffic control to dissipate queues at other bottlenecks (Cicic and Johansson 2018).
Traditionally, capacity has been considered as a fixed value valid for the given bottleneck or road section. This approach can be traced all the way back to (Greenshields et al. 1935) and the first traffic flow (TF) model which had clearly defined maximum intensity (i.e. capacity) corresponding to certain TF speed and density. Also, such approach is very intuitive and easy to use for applicants and policy makers. That explains why it is still very popular and widely used in practice. Later, the so called capacity drop has been revealed and confirmed by countless researches (e.g. Bertini 1999, Chung et al. 2007, Gazis and Foote 1969, Hall and Agyemang-Duah 1991, Srivastava and Geroliminis 2013, Zhang and Levinson 2004. That led to differentiation between what is often called pre-queue flow (PQF) and queue discharge flow (QDF). PQF is measured before a breakdown and can reach higher values. On the other hand, QDF is measured downstream from an active bottleneck after the breakdown occurred and the capacity dropped.
Finally, the concept of stochastic capacity and suggestions of application of the product limit method (PLM) by Kaplan and Meier (Kaplan and Meier 1958) on traffic flow began to appear (Hyde andWright 1986, Van Toorenburg 1986). The stochastic approach has been increasingly popular since, using also different methods (Arnesen and Hjelkrem 2018, Brilon et al. 2007, Geistefeldt and Brilon 2009, Lorenz and Elefteriadou 2001, Weng and Yan 2016). An older but extensive paper (Minderhoud et al. 1997) provides overview and comparison of different capacity estimation methodsboth deterministic and stochastic.
According to (Geistefeldt and Brilon 2009), the early papers mentioning the use of PLM on traffic flow (Minderhoud et al. 1997, Van Toorenburg 1986) made a mistake in the application. They considered the breakdown flow to be any flow that was measured downstream from an active bottleneck, i.e. the queue discharge flow. While QDF can be considered as capacity by certain definitions, it is not compatible with the PLM. The TF is already congested when QDF is measured. As an analogy, it is as if one were to recurrently include dead patients in a common lifetime analysis scenario. Only one record of breakdown flow can be connected with each breakdown. See section 3.2 or (Brilon et al. 2005) for more detailed explanation of PLM and its application on the TF. Some papers also mention parametric maximum likelihood estimate (MLE) as a method of estimating stochastic capacity (Brilon et al. 2005, Geistefeldt and Brilon 2009). However, the two methods share the elementary assumptions and are practically equal in this regard. In fact, the PLM can be derived as a non-parametric MLE. The paper therefore focuses only on the PLM as the results will also apply to the parametric MLE.
This study originates in an applied research where the aim was to build a model for queue prediction and evolution capable of both long-and short-term predictions. Aggregation interval of 5-15 minutes is commonly used. The TF intensities are also usually clustered into intervals. That inevitably reduces accuracy and resolution in dimensions of time and TF intensity. Therefore, more disaggregated approach was chosen in order to be able to capture the TF fluctuations and extremes that can cause breakdown even when the average intensity is low. The PLM was initially chosen for capacity estimation based on the literature. It turned out during the development and validation that the estimated breakdown probability distributions systematically fail to reproduce the empirical cumulative frequencies of breakdowns. The breakdown probability was underestimated at low intensities (in line with e.g. Arnesen and Hjelkrem 2018) and overestimated at high intensities. It was hypothesised that the properties of TF intensity do not meet the assumptions of PLM and therefore the PLM systematically fails to correctly estimate the probability distribution of capacity. This discrepancy apparently has not been discussed, yet. An alternative method overcoming this issue, based on fitting of the cumulative frequency of breakdowns, was developed and is presented in this paper.
The paper is structured as follows: section 2 discusses definition of highway capacity; section 3 presents the data and methods of data processing, the product limit method, the new proposed method, and description of its accuracy and data sensitivity analyses; section 4 provides results of the analyses and a case study; section 5 discusses the results; and section 6 draws conclusions. For convenience, there is a list of used abbreviations after the conclusions.

Highway capacity definition
The most simple and general definition of a highway capacity, also used in the introduction, says it is the highest intensity achievable at the highway profile for which it is determined. While simple and easily understandable at the first sight, it leaves many questions unanswered.
The Highway Capacity Manual (HCM) defines capacity as "the maximum sustainable hourly flow rate at which persons or vehicles reasonably can be expected to traverse a point or uniform segment of a lane or roadway during a given time period under prevailing roadway, environmental, traffic, environmental, and control conditions. Reasonable expectancy is the basis for defining capacity. A given system element's capacity is a flow rate that can be achieved repeatedly under the same prevailing conditions, as opposed to it being the maximum flow rate that might ever be observed. Since the prevailing conditions (e.g. weather, mix of heavy vehicles) will vary within the day or from day to the next, a system element's capacity at a given time will also vary," (Transportation Research Board 2016).
It is clear not only from the citation that the "highest achievable intensity" does not necessarily mean the very highest value of TF intensity ever recorded. Such value would not be practical for traffic engineering applications. Therefore, "maximal sustainable flow" or similar definitions are often used. Additionally, breakdowns occur at various traffic flow intensities at the same locations and the QDF also varies over time which implies that capacity is stochastic in nature. Many researchers agreed on that (cf. Introduction) and the HCM recognizes it, too.
To sum up, there are at least four additional "parameters" associated with the highway capacity definition which should be always specified when discussing capacity. Different capacity definitions could lead to very different results given that they can be fundamentally different (e.g. pre-breakdown vs. post-breakdown capacity). They are: • Aggregation interval (e.g. 1, 3, 5, 15, 60 minutes) • Pre-breakdown capacity (e.g. max. PQF) vs. post-breakdown capacity (e.g. average QDF) • Stochastic vs. single-valued capacity • Definition of "maximum" or "reasonable expectancy" in the case of the single-valued capacity (e.g. mean QDF, 95 th quantile of the PQF, etc.) Clear definition of TF breakdown is also necessary, especially when dealing with breakdown capacity. Definition of breakdown at work-zone with 2-to-1 lane drop (sudden speed drop) can be different to definition of breakdown at on-ramp merge location on a 4-lane freeway (more subtle speed drop). Using unsuitable definition to identify breakdowns may lead to incorrect conclusions.
There is no "correct" all-encompassing definition of highway capacity or breakdown. Different definitions are suitable for different applications. When one is interested in predicting development of a queue length, suitable definition of capacity could be mean QDF its probability distribution. In the latter case, the aggregation interval would have to be specified, too. On the other hand, when one is trying to predict breakdowns and congestions, he or she needs to focus on PQF and breakdown capacity, be it single-value or some probability distribution. The choice of aggregation interval is of much higher importance in this case. On one hand, very short interval can be too noisy. It is virtually impossible to exactly identify the direct cause and moment of a breakdown. Longer aggregation period smoothens the extremes and is thus more robust and reliable. On the contrary, too long interval will lead to bias as it will inevitably include intervals with unsaturated flow. That will consequently reduce average TF intensity over the aggregated interval and shift the distribution to the left. The right choice depends on what aggregation scale are we interested in for the given application. Generally speaking, shorter aggregation interval may bring more accuracy but is more prone to error and longer interval brings less accuracy but is more robust.
In this paper, the capacity is defined as a three-minute TF intensity directly preceding breakdown (i.e. breakdown flow) and is described by its probability distribution. Different aggregation periods were considered but the three-minute interval seemed to be the best trade-off between the pros and cons of the long and short intervals. In any case, although the results would differ, the described methods are in principle independent on the aggregation interval and TF breakdown definition. Different intervals and/or definitions may be used if more appropriate for the problem at hand.

Methods
The methods section describes the data used in this study, their processing, and the methods used to estimate the probability distribution of capacity. Section 3.1 is focused on the data. Section 3.2 describes the PLM and section 3.3 introduces the new method. The methods used for comparison of the two methods and for further analysis of the new method are described in section 3.4.

Data measurement and processing
The data used in this study come from pilot testing of ZIPMANAGER system for TF speed harmonisation ahead of freeway work-zones with lane drop. The pilot was performed in September to November 2016 at D5 motorway from Pilsen to Prague in the Czech Republic.
The system consisted of several TF detectors and variable LED traffic signs. The data used in this study come from Wavetronics detector located ca 100-200 m ahead of the lane drop. TF harmonisation has been in past proven to increase capacity by reducing the speed variation which consequently reduces the TF disturbances which increase the risk of accidents and breakdowns (Geistefeldt 2011, Strömgren and Lind 2016, Vadde et al. 2012).
The choice of the data source has several advantages. First and foremost, the location allows almost immediate detection of queue at the lane drop. Only few vehicles coming to a halt at the merging point can cause breakdown. The speed decreases very rapidly from free flow speed to very low speed or stop-and-go behaviour when congestion occurs. That allows relatively easy and reliable detection of breakdown at the detector based on the speed drop. That results in high accuracy of identification of the breakdown time and the corresponding breakdown flow. The detector itself is very reliable in all weather conditions and, when set up optimally in ideal conditions, can reach up to 99 % reliability in free flow conditions. As most detectors, it starts failing in heavily congested conditions due to interferences causing multiple detections of one vehicle. However, that is not an issue as the data from those periods are not utilized by the capacity estimation methods used in this study.
There is one drawback in the measurement setupit does not allow for control of queue spillback from within the work-zone itself. However, the merging point is severe bottleneck due to the merging of two lanes into one. It likely has considerably lower capacity than the work-zone itself. Hence, this should not cause too much error to the capacity estimation. In any case it should not affect the accuracy difference of the methods used. It might be more troublesome if there would be another major bottleneck within the work-zone (e.g. steeper incline, entrance of the work-zone machinery onto the freeway, on-or off-ramp, etc.) The data was processed as follows: • Filter the raw event-based data from invalid (indicated by the radar) or duplicate records and obvious errors • Aggregate into one-minute intervals with speed calculated as harmonic average to better reflect the spatial average speed (space-mean speed) (Daamen et al. 2014).
Vehicles over 9 m are considered as equal to two passenger cars (passenger car equivalents (PCE) are thus used as the unit of TF intensity hereafter). • Aggregate one-minute intervals into overlapping (explained below) three-and fiveminute intervalsthe intensities are simply added up and the speed is calculated as arithmetic average of the harmonic averages to get space-time-mean speed • Identify breakdownaverage speed below 40 km/h over three-minute interval was considered as the definition of a breakdown to rule out only brief speed drops • Find the first minute with speed below 40 km/hthe TF intensity in the three-minute interval directly preceding this minute was considered the breakdown flow unless the data suggested that the queue already started building in the previous minute (then the breakdown flow interval shifted one extra minute back) • Write down the breakdown flow and the free-flow intensities preceding it as uncensored and censored data respectively (censoring explained in 3.2) • Find the time of queue dissipationaverage speed above 70 km/h over five minutes • Continue searching for another breakdowndata from here on until another breakdown was used in the capacity estimation as censored data; data from when the queue was present was discarded along with data from intervals with brief speed drops below 50 km/h • Repeat last five steps until the end of the dataset and write down remaining censored data after the last identified breakdown The overlapping intervals allow not to lose any information about the intermediate intervals.
That makes it possible to more accurately identify the moment of breakdown and the preceding breakdown flow. However, the overlapping must be kept in mind when interpreting the estimated capacity distribution. The TF is at a risk of breakdown each minute, but the breakdown probability is given by the TF intensity over the past three minutes. While the traffic flows in the overlapping intervals are obviously correlated, it should not cause any issues for the given purpose if the results are interpreted and applied correctly.

Product limit method
Kaplan-Meier estimator, also known as product limit method (PLM), is commonly used in survival or lifetime analysis. Survival analysis is dealing with estimation of survival rates, failure probabilities, and similar statistics. Survival function ( ) is supplement to cumulative distribution function ( ) (CDF; eq. (1)). It describes probability of a system to "survive" longer than given lifespan, whereas the CDF would describe the probability of failure before given lifetime.
The PLM can be used to estimate the survival function. It uses available lifetime data while also utilising the so-called censored data. Those are data about subjects which did not "fail" during the observation period (e.g. a patient surviving until the end of a study or dropping out of it). That may considerably enhance the accuracy of the estimation. The accuracy boost is increased with growing share of censored data in the data set. That makes utilizing censored data essential when analysing highway capacity as absolute majority of TF data is censored. The estimated survival function ̂( ) is given as: Where j is number of records with lifetime ≥ j and j number of failures at time j . Put into words, it is the product of sequence of partial survival probabilities at individual "age" intervals. There are several analogies ( Table 1) that transform the method for highway capacity analysis.

Analysis of lifetime data Capacity analysis Parameter
Time t Traffic flow intensity I

Failure event
Death/failure at time t Breakdown at traffic flow intensity I

Lifetime variable
Lifetime T Capacity C

Censoring
Lifetime T is longer than the duration of the experiment Capacity C is greater than traffic demand In the lifetime analysis, the CDF describes the failure probability below given timespan. By calculating the survival function using the PLM, one can estimate the CDF via eq. (1).
The analogy is not perfect due to differences between time and intensity. That makes the interpretation of CDF more difficult in the case of highway capacity analysis. Besides keeping the properties of CDF, it also defines the breakdown probability of TF at given TF intensity, acting as a hazard function. The two qualities effectively merge due to the lack of "aging" of the traffic flow, explained below. It is still regarded as CDF throughout the paper to maintain consistency.
The PLM and related survival analysis methods are working based on premise that the censored subjects follow the same survival function as the uncensored and that they survived until the moment of censoring. That is fulfilled in the case of lifetime analysis where time is steadily progressing, and each observed subject has gone through all the previous "ages" where it was at the risk of failure and successfully survived. Alas, that is not true in the case of traffic flow. The TF intensity is fluctuating randomly around its time-varying mean value rather than steadily increasing. As such, each TF measurement behaves as an individual subject with no history and is not subject to the risk of failure at the lower levels of intensity. Since the PLM assumes that the flow indeed has been through all the previous intensities and survived, there is an obvious discrepancy.
The assumption can also be traced in the calculations of the PLM. In eq. (2) j is number of records with lifetime ≥ j . For highway capacity estimation it transforms to ≥ j . That assumes that all recorded TF intensities were also exposed to the risk of failure at each and every lower level of intensity. Which in reality did not happen as every record represents new independent subject with no history as was said earlier.

Alternative method of fitting cumulative frequency of breakdowns
The discussed issue with application of survival analysis methods on traffic flow led to development of a new method for estimating capacity distribution. The probability distribution of capacity can be used to calculate the theoretical cumulative frequency (CF) of TF breakdowns: is the value of CF of breakdowns at TF intensity i ; j stands for the number of breakdowns at TF intensity j ; I j is the number of records of the intensity j (which is different variable then j in PLM, which is the sum of I j from j to the highest recorded intensity max ); and C ( j ) is the value of capacity CDF at TF intensity j .
Comparison of the empirical and predicted cumulative frequencies of breakdowns (CFB) can be used to estimate the underlying capacity CDF. The main reason for estimating probability distribution of capacity is probably its ability to predict queues. Thus, rather than trying to estimate the CDF directly, this method aims at maximizing its queue prediction ability. By minimizing the error between the empirical CFB curve and the one obtained from the estimated CDF of capacity via eq. (3) and (4), one can accurately estimate the underlying CDF of capacity: where is the sum of squared errors (SSE) between the empirical and estimated cumulative frequency of breakdowns; min and max are the lower and upper bounds for TF intensities within which the CDF is being optimized; and B ( i ) and ̂B ( i ) are the empirical and estimated cumulative frequencies of breakdown, respectively. While the sum of absolute errors could be used, too, it does not penalize severe errors like the SSE does. That can lead to unbalanced estimates with some parts of the curve having inadequately large error which seems to be the less favourable choice in this case. Mean square error (MSE) or root mean square error (RMSE) are other possible metrics for the optimization but would lead to identical results as SSE.
A parametric probability distribution -Weibull distribution was used in this casemust be used so that its parameters can be optimized. With C ( j ) coming from the estimated Weibull distribution ( , ), with parameters and being subject to the optimization, eq. (5) can be expanded to: The result of this optimization are the optimal values of the parameters of the chosen capacity distribution. Any parametric distribution can be used in theory but Weibull distribution was earlier found to have the best fit to capacity distribution Zurlinden 2003, Chao et al. 2013).
The choice of min and max can affect the results to certain extent. Setting min too low, where no breakdowns occur in practice, or max too high, to intensities which do not occur in practice, leads to cumulative error at the ends of the interval. That will be reduced by the optimization function at the possible cost of larger error at the central part. On the other hand, narrow interval will considerably increase the error at the sides. Even larger errors will emerge if the demand profile shifts. Therefore, it is advisable to extend the interval below and above the recorded range. Based on experience, reasonable values seem to be ca 70-80 % of the lowest recorded breakdown flow for min and ca 110 % of the highest recorded intensity for max .

Accuracy and data sensitivity analysis of the new method
An analysis of accuracy of both methods was conducted to compare them. Analyses of reliability and sensitivity to the amount of available data, defined by the number of recorded breakdowns, was conducted on the new method. Effect of the ratio between the number of recorded breakdowns and the total number of records on the accuracy of the estimated CDF was also tested.
Using real wold data for accuracy analysis makes little sense. They only provide a small subset of data which may not represent the true capacity distribution, which is unknown. They also cannot be used for the sensitivity analysis at all. Therefore, a method for synthetizing artificial measurements of TF with pre-defined capacity distribution was used to get more data.
Weibull distribution with known pre-defined parameters was used as a benchmark for evaluating accuracy of the estimates. The parameters were set roughly based on the estimated capacity distribution from the real-world data to retain realistic magnitude of probabilities. The distribution was used to generate synthetic pseudo-empirical data. Those were then used for the analyses.

Figure 1: Left -CDF of Weibull distribution as the breakdown probability (triangles) and number of records of individual traffic flow intensities (circles). Rightthe resulting CFB calculated via (3) and (4).
The basis of the synthetic data generation was the data set of real-world TF intensities. The pre-defined Weibull distribution was then used to define C ( j ) in eq. (3) and (4) which were used for calculation of a theoretical CFB curve ( Figure 1). That then served as the baseline for generating its synthetic pseudo-empirical measurements. Any empirical CFB does not exactly follow the theoretical CFB but rather randomly fluctuates around, approximating it more or less accurately based on the amount of recorded data. To replicate the randomness of the real world the synthetic records of breakdowns were generated randomly according to the theoretical distribution.
The random generation was in practice conducted as a series of Bernoulli trials at each level of TF intensity. It was based on the assumption that for values of ̅ j smaller than one, the probability of breakdown being recorded at that level can be approximated with Bernoulli distribution ( ) with the probability parameter = ̅ j , where ̅ j is the theoretical "average" number of breakdowns at -th level of intensity. That allows to simply generate a random number from uniform distribution (0,1) and compare it to ̅ j to determine whether a breakdown happened at that level: For ̅ j ≥ 1 this test obviously fails as it would always render j = 1 but it is possible to divide ̅ j by such that ̅ j,i * = ̅ j and each ̅ j,i < 1, then running the test for each ̅ j,i separately. The sum of j,i then gives the total number of predicted breakdowns. To allow generating j higher than ̅ j , the value of should be such that ̅ j,i ≈ 0.5. This process randomly generates number of recorded breakdowns j ∈ {0, 1, … , } with ̅ j as the median for each level of intensity j (eq. (8)). Those can be added using eq. (3) to generate a pseudo-empirical CFB.
It is possible to simulate virtually infinite number of synthetic CFB curves of a hypothetical highway with pre-determined capacity distribution. The capacity CDF can then be estimated both using PLM and the proposed new method for each such pseudo-empirical measurement.
The estimated CDFs can then be compared to the pre-defined "true" CDF. The resulting errors serve as a measure of accuracy of each method.
The absolute errors used for optimization can be used to compare PLM to the new method if the theoretical function is used for comparison instead of the empirical one. However, they do not tell much about practical accuracy of the methods. Relative errors are more practical in that regard and also allow comparison among different sample sizes and capacity distributions. Average relative errors (ARE) of the CFB and capacity CDF and especially their weighted versions (AWRE) are good performance indicators, providing practical measure of accuracy of the CDF estimates.
The error of CFB provides information on the ability to predict breakdowns for the given demand profile. However, the error of CDF as the underlying function is more important as it defines general reliability independent on demand. Weighting the error by ̅ j gives more focus on the parts of the curve that play more important role in the breakdown prediction. That can be very useful as there may be quite large errors at the outer parts of the curves. Especially when the considered interval of TF intensities is extended beyond the recorded range of intensities as was discussed in section 3.3 and the errors add together. Using the weights eliminates that.
The relative errors are calculated according to equations (9) and (10): where ̂B ( i ) is the best estimate of the ̅̅̅̅ B ( i ), calculated and optimized by the equations (3), (4) and (5); ̅̅̅̅ B ( i ) is the "true" theoretical value of the CFB at intensity i . Its values of ̅ j were used to generate the synthetic pseudo-empirical CFB which was then used to estimate ̂B ( i ). The same principles hold for the CDF error. The whole process is symbolically illustrated by eq. (11): The average relative errors ARECF and ARECDF are arithmetic averages over all the from min to max calculated by eq. (9), (10), respectively, as is generally illustrated by equation (12).
The weighted versions AWRECF and AWRECDF are calculated according to equation (13) with the theoretical number of breakdowns ̅ i serving as the weight. Note that ̅ i ≡ ̅ j but in this case the sum is over instead of as it is over the whole range rather than just up to level . Also note that the sum of ̅ i is equal to ̅̅̅̅ B ( max ).
The average relative errors effectively become mean absolute percentage errors or weighted mean absolute percentage errors of the estimated CFB and CDF when multiplied by 100 %.
AWRECDF was considered the most important in evaluation of the methods. AWRECF was also considered as good indicator, followed by the unweighted versions of both. The absolute errors were complementary. In the results, provided in section 4.1, ARE and AWRE are always relative to the theoretical "true" values. The absolute errors can be relative to both theoretical and empirical CFB curves as is always indicated in text or table/figure description.
The ability to generate multiple random measurements makes it possible to conduct an analysis of sensitivity to sample size (defined by the number of recorded breakdowns). The numbers of the recorded TF intensities I j can be modified to variate the values of ̅ j . The original data set of three-minute intervals consisted of 6486 records of TF intensities. That resulted into ca 51.4 expected breakdowns based on the pre-defined theoretical capacity distribution. The TF records were multiplied to create eight data sets of varying sizes with the expected total number of breakdowns ca 12, 25, 50, 75, 100, 150, 200, and 250. The theoretical capacity distribution was kept the same across the different varying sizes. Therefore, the ratio between the expected number of breakdowns and the number of TF intensity records remained practically fixed.
Fifteen synthetic pseudo-empirical CFB curves were generated for each of the eight sample sizes. For each of them, the capacity distribution was estimated by the newly proposed method of CFB fitting. Means and standard deviations of the estimates and their errors over the 15 experiments were calculated.
The PLM was used on some of the pseudo-empirical data to compare the two methods. It was quickly obvious that the PLM performs very poorly, as was expected. Hence, the calculation of PLM was stopped after several comparisons and further tests focused on the new CFB fitting method.
As was noted earlier, it was also hypothesised that the ratio between the number of records and number of breakdowns, determined by the capacity distribution and demand profile, could have certain impact on the reliability of the estimated CDF. More simulation experiments were performed with different capacity distributions to test that. Keeping the theoretical number of breakdowns close to the original eight sample sizes, additional nine samples, each with 15 pseudo-empirical CFs of breakdowns, were generated by slightly altering the theoretical capacity distribution. The breakdown probability was reduced two times for five of the new sample sizes and eight times for the other four. This led to reasonably large data set of 255 (17x15) data points of errors and corresponding numbers of TF intensity and breakdown records with different ratios. These were used to estimate a regression model of AWRE. The number of recordings, theoretical number of breakdowns, their ratio and natural logarithms of those three values were considered as possible explanatory variables. The criterion for model choice was R-squared while keeping all the included explanatory variables significant at the 0.9 level of significance. Table 2 provides numeric comparison of all the mentioned errors of the CFB and CDF estimated from one of the pseudo-empirical capacity measurements. The value of SSE is not the optimized value as the errors are relative to the theoretical values, rather than empirical (cf. (11)). Only one numerical comparison between the PLM and the new method is provided but the results were of similar nature for all the performed comparisons. Additional visual comparison, based on real-world data, can be seen on Figure 2. The discrepancy between the original empirical CFB and the CFB predicted from the PLM-estimated CDF is clearly visible. It is caused by the PLM underestimating the CDF at low and overestimating it at high intensities, also shown on the graph.

Figure 2: Comparison of CDFs estimated via PLM and the CFB fitting (lines) and the resulting curves of predicted CFB (points). The empirical CFB curve used for estimating the CDFs is shown for comparison.
An additional test was conducted to assess the effect of censoring on PLM. The PLM was applied to theoretical CFB based on pre-defined capacity distribution. Different distributions were used on the same TF intensity data set to achieve different censoring ratios ranging from 5 to 99.9 %. For comparison, the real-world data have about 99 % of censored data.

Figure 4: Comparison of three different cases of relation between the theoretical, empirical and predicted cumulative frequencies of breakdowns. Graphs (a) and (b) share y axis. (a) the empirical curve follows the theoretical one and therefore also does the predicted one (low RSSE in optimization and low resulting AWRECDF) (b) the empirical curve continuously deviates from the average theoretical curve (low RSSE but high AWRECDF) (c) "staircase" shape of the empirical curve (high RSSE, AWRECDF high or low depending on general trend).
The RSSE relative to the empirical CFB which is minimized during the optimization process remains roughly the same. The other errors are relative to the "true" values and vary considerably. Larger SSE/RSSE of the CFB relative to the empirical curve during does not imply larger error of the estimated CDF relative to the "true" CDF and vice versa. It is caused by the (pseudo-)empirical curve randomly fluctuating around the theoretical one. That can lead to different combinations of errors as is illustrated on Figure 4 and Table 4. The accuracy of estimation is dependant mainly on the "closeness" of the empirical and theoretical CFB curves which improves on average with growing number of recorded breakdowns.  Even though the RSSE (to the empirical CFB) and AWRECDF do not necessarily correlate, minimization of the RSSE of CFB in practice still provides the best estimate of the true CDF of capacity. The correlation grows with the number of recorded breakdowns and larger data sets thus lead to more reliable estimates. The last part of this section focuses on the analysis of the amount of data needed to render reliable capacity estimates.  Table 5 shows mean values of the variables describing the 15 simulations for 12 out of the total 17 cases. There are four sets of three cases with roughly the same expected number of breakdowns but with different capacity distribution and thus number of TF records. The other five were left out as they stand out from the order with different numbers of breakdowns. There is a clear trend of decreasing ARE and AWRE as the number of breakdowns grows.
The distribution of AWRECFD with respect to the recorded number of breakdowns can be seen on Figure 5, along with a regression curve (discussed later). The other five data sets with different numbers of breakdowns are included there. The data points are divided into three groups by capacity distribution (more exactly breakdown probability). The trend of the errors growing smaller with rising number of recorded breakdowns is clear again. While low error is possible even for relatively low number of recorded breakdowns, it is rather the average or highest expected error that is important to define the reliability of the estimated capacity CDF. Also note that the clusters of data points around the expected number of breakdowns have a conical shape with the error growing with the recorded number of breakdowns being more distant from the expected value. That makes perfect sense as larger difference from the theoretical number of breakdowns implies shifted CFB which leads to incorrect estimation of the "true" CDF. Finally, a regression analysis was performed to test the hypothesis that also the ratio (defined by the capacity) between the number of TF records and the number of recorded breakdowns also has impact on the reliability of the results. Results of the regression analysis are provided in Table 6 with the best-fit model regression curve visualized on Figure 5. Table 6: Results of chosen tested regression models. The last model is considered the best as all variables are significant and R-squared is higher than of the third model. The other tested models had lower R-squared than any of these. BD stands for "breakdown", TF for "traffic flow". Different combinations of the considered explanatory variables were tested and while in some cases the number of TF records (log or non-log) was significant, the models with best fit did not include it. Unsurprisingly, given the trend shown by Figure 5, the number of breakdowns proved best fit when in logarithm. The resulting best regression model in eq. (14) is true only for the domain used for the analysis (i.e. to about 250 breakdowns). The error would again start to grow larger at some point, because of the positive sign of br , for which there is no sound theory.

Application on real work-zone data
As was said in section 3.1, the original data used in the study come from empirical measurements at a work-zone. Two different data sets were obtained through the measurements. At first, the wok-zone was left as usual with no attempts to actively control or affect the TF. Then the ZIPMANEGER system was activated to harmonize the traffic flow. The aim was to compare the TF performance defined by the work-zone capacity without any TF control and with the TF speed harmonisation. The data sets comprise 19 and 20 complete days of measurement with recurrent congestions, respectively. The measured empirical CFB curves are shown on Figure 6, along with the fitted curves. The underlying estimated CDF curves are shown, too. The decrease of the breakdown probability is variable with over 60 % at 50 PCE/3min and just below 30 % at 120 PCE/3min (Figure 7). The trend is virtually linear averaging at 45.1 % within the domain. The relative difference of the CFB is also highest at low intensities (ca 60 %) and then decreases. The decrease is relatively fast until about 80 PCE/3min. Then there is a sudden change in trend and the relative difference remains stable at about 25 %. The change of capacity can also be expressed as the increase of PCE related to given breakdown probability, i.e. left-right shift of the CDF. This can be likened to change of singlevalued capacity which can also be expressed as shift of CDFalbeit its CDF is discontinuous with a sudden shift from 0 to 1 at the capacity level. The shift was counted at seven different breakdown probability levels, resulting in average difference of 7 PCE/3min. In relative terms, it means relative difference of 5.7 % at high intensities and up to 13.4 % for low intensities, averaging 8.9 % (Table 7).  (154.35, 7.19) with harmonisation. The capacity distributions are location-specific, but the effect of harmonisation can be expected to be roughly the same for any 2-to-1 lane drop.

Discussion
The results provided in Table 2 and Figure 2 prove that the PLM method cited in various papers (cf. Introduction) as a possible stochastic capacity estimator fails when applied on TF. That is because TF intensity fluctuates, rather than linearly increases, which leads to failed PLM assumption. Its estimates of survival curve or breakdown probability are inherently and significantly incorrect. The magnitude of error will differ based on the length of aggregation interval, size of data sample, censoring rate, and other circumstances. The same holds true for parametric MLE.
The new proposed method based on the minimisation of the differences between the original and predicted (from the estimated breakdown probabilities) cumulative frequencies of breakdowns has been proved to perform much better. The results show that it not only can optimally fit the empirical cumulative frequency of breakdowns but also provides the best estimate of the underlying probability distribution of capacity (or breakdown probability). be affected by the measurement. Therefore, the effect of censoring rate on PLM has been tested to rule it out as the cause of the low accuracy. Figure 3 proves that the accuracy of PLM is strongly affected by the censoring rate. However, for any censoring rate, there always remains at least 25% error for any error type. As the errors should be virtually zero as the estimates are based on the theoretical curves, it rules out the censoring as the sole cause of the PLM failure. Regression analysis proved that the new method is not affected by censoring (equal to the ratio between the numbers of recorded breakdowns and recorded TF intensities).
That makes sense as the information about censorship is not used directly. The censored data are just included in the data set of TF intensity records.
The conducted regression analysis also came to one unexpected conclusionthe number of breakdowns seems to have both positive and negative effect (eq. (14) and (15)) on the magnitude of error. The negative effect of the non-log number of breakdowns might just be an effect of insufficient amount of data or insufficient domain that might disappear entirely with larger or wider data base. It could also signify some other unknown effect unconsidered in the analysis. However, the model should be well sufficient for estimating the necessary database to achieve desired reliability in practical applications.
A simulation experiment to estimate the range of possible errors of the new method with respect to the amount of uncensored data (number of recorded breakdowns) showed that the ca 50 breakdowns recorded in the case study is the bare minimum with possible error still over 20 % ( Figure 5). The expected error decreases considerably until about 150 breakdown records after which the expected error remains at about 5 % and decreases only very slowly. Using data sets with less than 50 breakdowns to estimate stochastic capacity is not recommended as the expected error grows very steeply below that number.
The case study provided another confirmation of the positive effect of TF harmonisation on the capacity ( Figure 6, Table 7) with the average drop of breakdown probability being 45 %. Even when considering the possible errors as estimated by the simulation experiment and regression analysis, such a difference is highly unlikely to be just a matter of chance. Figure 7 reveals that the reduction of breakdowns is not as high as the reduction of breakdown probability would suggest. Firstly, the harmonisation postpones the breakdown and thus the TF remains longer at high intensities before it breaks down. As a result, even though the relative risk of breakdown is significantly lower with harmonisation, there is about the same number of breakdowns at higher intensities in both cases due to the bigger exposure. Secondly, once a congestion occurs, another one cannot occur until the first one dissolves. As the number of congestions is decreasing, the interval when the TF as at the risk of another breakdown grows (there was a 28% increase of the recorded free flow intervals with intensity above 50 PCE/3min over the similar period of measurements in the case of harmonisation). That causes diminishing returns of the increased capacity.
The relatively small difference in the estimated Weibull scale and shape parameters with and without harmonisation and the resulting high difference in breakdown probability can be put to contrast with (Brilon et al. 2005). They claim that their results of the shape parameter in the range of 9-15 (estimated by parametric MLE) can be approximated by the average value of 13. Even though optimizing only the scale parameter could lead to the same expected number of breakdowns, their distribution CFB would be different, resulting in inaccurate queue prediction. Thus, it does not seem advisable to rely only on optimization of the scale parameter. Also note that the parameter values are dependent on the length of aggregation interval as was already noted in their consequent paper (Brilon et al. 2007). As was said, the Weibull distribution fits the highway capacity distribution the best, according to Zurlinden 2003, Chao et al. 2013). However, their findings were based on PLM and MLE methods and may not hold true for the capacity distributions obtained with the new method. Another study using a different approach came to the conclusion that lognormal distribution has the best fit (Weng and Yan 2016). This topic should be further studied.
There is an odd rise in the empirical CFB with harmonisation ( Figure 6) in low intensities between ca 50-70 PCE/3min. That can be explained either by the randomness of breakdown occurrence or as a side effect of the harmonisation. As the capacity increased, it became more likely that breakdowns occur in the single-lane work-zone and spill back. In that case, the recorded breakdown flow was not in fact the cause of the breakdown. Instead, its value was quasi random depending on when the spillback reached the radar. As low intensities occur much more often, they are also more likely to be incorrectly assigned to a breakdown this way, causing the unexpected rise.
As always, there are some imperfections in the conducted study, discussed throughout the paper. Most of them are related to the accuracy and reliability of assigning the correct TF intensity as the direct cause of a breakdown. Especially dealing with missing data at the moment of breakdown is cumbersome. As such, these imperfections are related to data collection and accuracy and do not affect the capacity estimation methods. Therefore, none of them should significantly affect the main result of this paper, i.e. that the common lifetime analysis methods are unsuitable for application on highway capacity estimation and that the new alternative method of estimating stochastic capacity can provide much better results. It should be stressed that the discussed methods are not limited to the used breakdown definitions or lane drop locations.
The stochastic capacity distributions of capacity may be used for long-term queue predictions.
Predicting the exact moment of breakdown is still very problematic due to the low breakdown probabilities which makes short-term prediction virtually impossible. The probabilities could be increased by choosing longer aggregation interval. On the other hand, that would decrease the accuracy of short-term predictions by smoothing out the TF fluctuations. It would also require aggregating the TF intensity levels, further decreasing the prediction accuracy. It is also possible to transform the breakdown probabilities to different aggregation interval using probability multiplication (Brilon et al. 2005). That can be used to estimate probability of breakdown within any chosen time period under some assumptions of future TF intensities. The probability distributions can also be utilized in calculation of another capacity estimation methods focused on finding optimal TF intensity level such as the sustainable flow index suggested by (Shojaat et al. 2017) or traffic efficiency suggested by (Brilon and Zurlinden 2003). Similar models incorporating the negative effect of capacity drop could be developed, tooit might be beneficial to put more weight on sustaining a free-flow conditions to prevent the capacity drop and consequent queue build-up.

Conclusions
Kaplan-Meier estimate and parametric maximum likelihood methods of survival analysis cannot be applied to highway capacity estimation, even though they have been recommended for that use in the existing literature. They assume the studied subject ages and that it has survived up to the moment of its failure or censoring (disregarding repairs). That condition is obviously fulfilled in the usual fields where the methods are applied as time indeed moves constantly forward and the observed subjects can fail at any time. However, it is not fulfilled in the case of traffic flow. As traffic flow intensity does not grow linearly, each measurement behaves as an independent subject that was not subject to the risk of failure at any of the lower intensity levels. Therefore, the assumption is failed. As a result, the methods greatly underestimate the risk of breakdown at low intensities because they overestimate the number of occasions when the traffic flow was at the risk of failure. On the other hand, they overestimate the risk of breakdown at high intensities because the partial breakdown probabilities multiply. That is correct for cumulative distribution function (i.e. capacity distribution) but not for hazard function (i.e. breakdown probability). These two functions effectively merge for traffic flow due to the properties of traffic flow intensity, which results in the overestimated breakdown probability at high intensities.
A new method overcoming this issue was introduced and proven to be more efficient in estimating the capacity distribution and predicting traffic flow breakdowns. It is based on approximating cumulative frequency of breakdowns with respect to the traffic flow intensity directly causing the breakdowns. A parametric probability distribution is necessary as the parameters are subject to optimization. By minimizing the error of the predicted cumulative frequency of breakdowns calculated from the estimated capacity distribution, the best estimate of capacity distribution is obtained, too. Still, sufficient amount of data is required for reliable capacity estimation and minimum of 50 breakdowns should be recorded to obtain reasonably accurate estimate, with recommended optimum being 100-200.
The case study to which the new method was applied proved the positive effect of traffic flow speed harmonization on capacity ahead of work-zones or similar lane-drops and likely at any highway section. Despite the rather small difference in the estimated parameters, the breakdown probability was reduced by 45 % on average for the given demand profile and the capacity (expressed as intensity related to given breakdown probability) was increased by 7 PCE/3min on average.
Further research will be focused on gathering more data from additional work-zones and search for best-fitting distribution. Additional variables affecting the breakdown probability might be added to the model. Larger data sets are also necessary for cross-validation of the estimated capacity distributions as the small data sets used in this paper did not allow for their splitting. The discussed capacity definitions and data processing methods can also lead to design of more customised measurements in the future that will better fit the needs of the stochastic capacity estimation.

List of abbreviations
AREaverage relative error AWREaverage weighted relative error CFBcumulative frequency (of breakdowns) CDFcumulative distribution function HCMhighway capacity manual MLEmaximum likelihood estimation MSEmean square error PCEpassenger car equivalent PLMproduct limit method PQFpre-queue flow QDFqueue discharge flow RMSEroot mean square error RSSEroot sum of squared errors RErelative error SSEsum of squared errors TFtraffic flow