Research Article  Open Access
Hamid Behbahani, Sayyed Mohsen Hosseini, Alireza Taherkhani, Hemin Asadi, Seyed Alireza Samerei, "Proposing New Methods to Estimate the Safety Level in Different Parts of Freeway Interchanges", Advances in Civil Engineering, vol. 2018, Article ID 8702854, 17 pages, 2018. https://doi.org/10.1155/2018/8702854
Proposing New Methods to Estimate the Safety Level in Different Parts of Freeway Interchanges
Abstract
Since attention to the safety of traffic facilities including freeway interchanges has been increased during recent years, accident prediction models are being developed. Simulationbased surrogate safety measures (SSMs) have been used in the absence of real collision data. But, obtaining different outputs from different SSMs as safety indicators had led to a complexity of using them as the collision avoidance system basis. Additionally, applying SSM requires trajectory data which can be hardly obtained from video processing or calibrated microsimulations. Estimating safety level in different parts of freeway interchanges through a new proposed method was considered in this paper. Fuzzy logic was applied to combine the outputs of different SSMs, and an index called nocollision potential index (NCPI) was defined. 13608 calibrated simulations were conducted on different ramps, weaving, merge, and diverge areas with different geometrical and traffic characteristics, and NCPI was determined for every case. The geometrical and traffic characteristics formed input data of two safety estimator models developed by Artificial Neural Network and Particle Swarm Optimization. Ten freeway interchanges were investigated to calibrate the simulations and to ensure the validity of the fuzzy method and accuracy of the models. Results showed an appropriate and accurate development of the models.
1. Introduction
Providing an acceptable safety level of traffic facilities is logically vital due to its consequent effects on prevention of fatality and property damage. On the other hand, the low level of safety shall lead to the low performance of these facilities, as well. Since the freeways have always played a significant role in road transportation, determination of the safety level in different segments of the freeways has been one of the main concerns of researchers. Previous investigations are divided into two categories. These two categories include the realaccident data analyzing and the simulationbased safety study. In the realaccident studies, the effect of some factors (such as mainline speed at the beginning of the weaving segments, the speed difference between the beginning and the end of the weaving segment, the logarithm of the volume, the maximum length of the weaving area [1], the heavy vehicle rate, the hourly traffic volume, the speed differential between cars and heavy vehicles, the number of accesses [2], the number of vehicles that enter and exit the freeway at a specific segment, the length of the speed change lane, the speed of offramps [3], paralleltype or tapertype exit ramps [4], leftside or rightside merging and diverging areas [5, 6], the number of lanes on freeways, the number of lanes on ramps, and the speedingrelated crashes [7]) on the number and/or severity of accidents was separately investigated and some models were developed. When there are no registered data about the accidents in a specific facility or when someone is trying to design that facility or when the facility has not yet been built, simulationbased safety studies/estimations such as conflict analysis by microscopic simulation and surrogate safety measures (SSMs) including timetocollision (TTC), postencroachment time (PET), proportion of stopping distance (PSD), crash potential index (CPI), unsafe density (UD), max speed (Max S), relative speed (ΔV), kinetic energy (KE), and deceleration rate to avoid collision (DRAC) are often used to estimate the danger or risk of possible collisions. Integrating the rate of TTC variation and the level of hazard associated with TTC as an approximate safety indicator [8] and calculating the risk of sideswipe collisions [9] are some kind of using these measures. An FHWAsponsored research project has also studied the potential to derive SSMs from existing traffic simulation models. In that research, TTC, PET, and DRAC were used to measure the severity of the conflict, and by use of additional information about the mass of the vehicles, Max S and ΔV were used to measure the severity of the potential collision [10]. These are some examples of using simulationbased SSMs. These measures are so useful because they occur more frequently than accidents and therefore need shorter periods of the study compared with realaccident investigations [11]. It is important to note that the results of using SSMs mostly showed a good relationship between the proposed SSM and actual accident data [12]. So, using the SSM will help to stay far from longterm realaccident data analysis. But, there are some shortcomings in this way. Different surrogate measures for safety result in different outcomes, and unfortunately, an acceptable method to choose the best outcome especially to use as the basis of collision avoidance systems has not yet been presented. On the other hand, using these measures requires some prerequisites such as providing microsimulation software, simulation experts, and trajectory data. In addition, when it is intended to investigate the safety aspects of interchanges, there is not enough literature which focused well on these traffic facilities to review. Here, the questions are that by focusing on freeway interchanges:(1)Is it possible to combine the outcomes of different SSMs and have an exclusive outcome which could be a safety indicator of the interchange or not?(2)Could the level of safety be indicated just by having traffic and geometrical characteristics of the interchange instead of simulation attempts, trajectory data, or accident data?
The first purpose of the paper is to present a method to show that it is possible to give a positive answer to the first question. To do this, the fuzzy inference system (FIS) was used to combine the outcomes of the SSM, and fuzzy logic was applied to define an index called nocollision potential index (NCPI) as a safety indicator of the interchange (i.e., the exclusive outcome). Fuzzy logic could be a suitable technique where qualitative definitions cannot be directly quantified. The next purpose is to develop a model to estimate the safety level in the ramps, weaving, merge, and diverge areas of interchanges based on their traffic and geometrical properties. One of the approaches in developing the model is using a powerful tool dealing with the prediction and classification problems, and that is Artificial Neural Network (ANN) which has been a consistent alternative method to analyze the freeway accident frequency and does not require any predefined underlying relationship between dependent and independent variables [13]. Another approach is using an evolutionary computation algorithm motivated by the behavior of organisms and gathered social psychology principles in sociocognition human agents and evolutionary computations. The algorithm is particle swarm optimization (PSO) which has a simple concept and efficiency in computations and is implemented easily [14–17].
2. Methods
2.1. Description of the Proposed Fuzzy Method
2.1.1. NCPI Definition and Determination
In this paper, a fuzzybased method was proposed to estimate the safety level in different parts of freeway interchanges. In this method, different outputs of SSMs were combined, and the outcome was NCPI which is defined as a safety indicator. The value of NCPI falls within the range of zero to 100. The higher the value of NCPI, the higher the safety level. Since it was intended to indicate the level of safety despite many other types of research that usually determine the level of risk, NCPI was defined to show the likelihood of no collision in the interchange instead of indicating the probability of collisions to occur. To determine the NCPI, the SSM were categorized into two groups: Number estimation measures: the measures consist of TTC, PET, PSD, CPI, UD, and DRAC which are usually used to measure the severity of the conflicts. These measures can be used to estimate the number of nearcrash events. Severity estimation measures: the measures include Max S, ΔV, and KE which are usually used to measure the severity of the potential collisions.
Due to the complexity and timeconsuming of using all measures, in this research study, the measures of TTC and DRAC were selected to estimate the number of possible collisions, and the severity of these potential collisions was estimated by the measures KE and ΔV.
2.1.2. Definition of the Used SSM
Here, the definitions of the measures TTC, DRAC, KE, and ΔV are briefly described.
TTC: this was first defined by Hayward as the remaining collision occurrence time between two vehicles if the collision course and speed difference were maintained constant [18]. When TTC is low, there is an imminent danger of collision [19]. TTC for rearend conflicts can be calculated by [20]where TTC is the timetocollision, X is the vehicle position (L: leading and F: following), V is the vehicle speed (L: leading and F: following), and l is the vehicle length.
DRAC: deceleration rate is a good measure to detect dangerous maneuvers. DRAC is the rate at which a vehicle must decelerate to avoid a probable collision. For vehicles traveling in the same path, DRAC is defined as [11]where l_{veh L} is the length of the leading vehicle and other parameters were described previously. For angled conflicts, the equation changes aswhere ΔV_{ij(t)} is the relative speed of two vehicles engaged in the conflict and D_{i(t)} is the distance between the current position of the vehicle i and point of the intersection ahead of two vehicles.
KE: from Newtonian physics, we know that a moving vehicle has a kinetic energy as [21]where K is the kinetic energy, m is the mass, and is the speed of the vehicle. The kinetic energy transferred to the target vehicle can be calculated bywhere KE_{s} is the kinetic energy transferred to the target vehicle, m_{s} is the mass of the target vehicle, and is the change of the target vehicle speed before and after the collision [21].
: is the relative speed of vehicles involved in the conflict as a collision severity reflector [22].
2.1.3. Trajectory Data Analysis
Finding the variables’ values of (1–5) requires analyzing the data of trajectory. It was assumed that the vehicles had a linear movement with a constant acceleration or deceleration rate between every two consecutive time intervals in the analysis. So, the coordinates of the intersection ahead of two vehicles i and j could be computed. The acceleration or deceleration rate and speed of vehicles could also be determined using these assumptions. It should be noted that any collision in the study areas could either be a rearend collision or occurs at an angle of β. Thus, the analysis should be done with respect to angled collisions. In a special case in which the angle of collision is zero, it will be a rearend collision. The collision of two vehicles at an angle of β is depicted in Figure 1.
On the other hand, it is necessary to check whether the coordinates are within the limits of the study area or not. By assuming no changes in the conditions, it can be concluded that two vehicles i and j will never collide with each other if the coordinates of the intersection ahead of the two vehicles are outside of the limits of the study area. The distance between the position of each vehicle to the intersection ahead and the time required to reach this point can be obtained by simple calculations. Assume that T_{i} and T_{j} are the time required to reach the point of intersection of vehicles i and j, respectively. While the absolute value of the difference between T_{i} and T_{j} is less than the TTC threshold, there will be a nearcrash event. The value of the TTC threshold varies in several studies. The proposed values of thresholds are 1.5 seconds for urban areas [23], 4 seconds to distinguish between safe and unsafe situations [12], and 1.0 second for critical situations [24]. But, according to the surrogate safety assessment model, which considers a conflict as an event with TTC less than 1.5 seconds [25], a threshold of 1.5 seconds was used in this paper. Among different pairs of vehicles i and j, the number of those that encountered a nearcrash event was counted bywhere C_{TTC} is the number of pairs of vehicles that encountered a nearcrash event. Regarding the angled collision of two vehicles i and j, the relative speed of these two vehicles at the time of the collision could be determined by (7) and (8) in each direction of vehicles i and j.where β is the angle of collision. The minimum required DRAC could be also found by
Maximum deceleration rate for different vehicles was proposed by Maurya and Bokare [26]. If the value of each of the DRACs is more than the maximum deceleration rate, there will be a nearcrash event. The DRAC of a couple of vehicles, i and j, is the maximum DRAC of them as written in (11). The number of cases in which a nearcrash event takes place will be counted bywhere C_{DRAC} is the number of cases in which a nearcrash event occurs. The speed of the vehicle i at the time of collision is calculated bywhere a_{i} is the acceleration/deceleration rate of the vehicle i and V_{i} is the speed of the vehicle i at the time of analysis. Decomposition of the speed vectors at the moment of collision is shown in Figures 2 and 3.
So, the relative speed of two vehicles i and j at the moment of the collision could be determined by
If the difference between the speed of vehicle j before and after the collision is equal to the ΔV obtained above, the amount of kinetic energy transferred in the collision will be defined aswhere m_{j} is the mass of vehicle j.
2.1.4. Probabilistic Framework
Four surrogate measures were used to estimate the number and the severity of possible collisions. But the probability that a nearcrash event becomes a real collision should be determined and be considered in the model development. There are two following probabilities:(1)The probability that after detection of an event as a nearcrash event, the event becomes a real collision (it is possible that both or one of the drivers prevents the collision to take place by performing an evasive act).(2)The probability that the severity of collision does not change (it is possible that both or one of the drivers engaged in a collision reduces the speed to avoid the collision. Even if the collision occurs, the collision severity will become lower).
When both or one of the drivers has a time to react, both mentioned probabilities will appear. In other words, the more the TTC, the less the probability of the collision taking place with a certain severity. A probability density function (PDF) was defined which was sensitive to the perceptionreaction time of drivers. For this purpose, an exponential PDF was selected among the most appropriate distributions which satisfy the requirements of the problem and was written aswhere Pr_{i} is the probability that a nearcrash event with a certain severity becomes a real collision with the same severity, t_{reaction} is the perceptionreaction time of drivers, and λ is a constant value which should be defined based on the problem. Since the probability must be closed to one when TTC approaches zero second, the value of λ should be equal to 1.0.
The American Association of State Highway and Transportation Officials (AASHTO) mandates using a perceptionreaction time of 2.7 seconds in most calculations [27]. But, in certain more complex situations, drivers may require more time to react than 2.7 seconds, for example, situations where drivers should detect and react to unexpected events. According to the AASHTO, where a collision avoidance maneuver is needed, the perceptionreaction time of 3.0 seconds should be used for rural roads and 9.1 seconds for urban roads. In situations that avoiding a collision needs alterations in the speed, path, and/or direction, the AASHTO recommends a range of perceptionreaction time between 10.2 and 11.2 seconds for rural roads, 12.1 and 12.9 seconds for suburban roads, and 14.0 and 14.5 seconds for urban roads [28]. Due to the high speed of vehicles, disorderly movements of vehicles, and a high number of lane changes in a freeway interchange, avoiding a collision certainly requires changing the speed, path, and direction. So, the perceptionreaction time of 11.2 seconds was used in this paper. Figure 4 presents the relation between the probability and TTC with λ = 1.0 and t_{reaction} = 11.2.
The number and the severity of collisions in different parts of freeway interchanges could be better estimated by applying the above probability aswhere N_{TTC} is the number of predicted collisions by the TTC, N_{DRAC} is the number of predicted collisions by the DRAC, S_{KE} is the severity of predicted collisions by the KE, and S_{ΔV} is the severity of predicted collisions by the ΔV.
2.1.5. Fuzzy Logic
The estimated number of collisions using the measures of TTC and DRAC is usually different, and the results of the severity of the predicted collisions using the measure of KE are not the same as that of the measure of ΔV, as well. But, all the outputs from the four measures should be considered all together. So, the NCPI must be a function of the outputs of the four mentioned measures as four variables as shown in
The determining function of the NCPI was defined using a Mamdanitype FIS with four inputs (the values of the four measures) and one output (NCPI). At first, a membership function with three qualitative classes was defined for each measure. Then, a fuzzification procedure was implemented for the measures. It means that the quantitative value of each measure was automatically placed in one of the three qualitative classes of “low,” “medium,” and “high” using the membership functions. Between NCPI and its variables, 81 rules were set. These rules determine the qualitative value of NCPI by taking the qualitative values of the four measures into account simultaneously. Table 1 presents the 81 applied rules. A membership function for NCPI was defined with five qualitative classes of “very low,” “low,” “medium,” “high,” and “very high.” So, a qualitative index was attributed to NCPI based on the rules and the membership function. After all, a defuzzification procedure using the centroid method was accomplished, and the quantitative value of NCPI was obtained by the use of NCPI membership function. The FIS settings for AND/OR methods were set to MIN/MAX and for IMP/AGGR methods were set to MIN/MAX, as well. Figure 5 shows the membership functions of NCPI and N_{TTC}, for example, and Figure 6 depicts two samples of 3D profiles of NCPI and its variables.

(a)
(b)
2.1.6. Field Study
The field study was carried out to reach the following three aims:(1)To calibrate the simulations(2)To control the validity of the proposed method in which the safety level is indicated using fuzzy logic and SSM(3)To check the accuracy of safety estimator models (the safety estimator models will be described in the following sections)
Ten freeway interchanges in Tehran Province in Iran were investigated. All the traffic and geometrical characteristics of the interchanges were gathered and shown in Table 2.

The behavior of the drivers and the trajectory data were extracted by video processing tools. The driving times in different parts of the interchanges, the headways, the real acceleration and deceleration scenarios, the number of lane changes, the route selections of the drivers, the length before the gores which the lane change occurs, and the accepted gap for the lane change were obtained by analyzing the behavior of the drivers. According to the gathered data and analysis on the behavior of the drivers, the simulation was calibrated. The value of the NCPI was also computed for every case by analyzing the real trajectory data and applying the proposed fuzzy method. The interchanges were simulated, and trajectory data were derived. The NCPIs computed using simulation trajectory data were compared with the NCPIs obtained from real trajectory data for controlling the validity of the method. Figure 7 presents the aerial photos of the ten studied interchanges. The results were used to check the accuracy of the future developed safety estimator models, too.
2.2. Development of Safety Estimator Models
In the previous section, it was shown that the safety level could be determined using microsimulation, trajectory data analysis and computations, SSM, and the proposed fuzzy method and computing NCPI. But, providing expensive prerequisites like simulation software, simulation experts, trajectory computations, and the time required is difficult and timeconsuming. In this paper, it was intended to develop two models to estimate the level of safety based on geometrical and traffic characteristics of freeway interchanges. Developing the models needs generating a database containing geometrical and traffic characteristics of the ramps, weaving, merge, and diverge areas as inputs and computed NCPIs as output. Then, ANN and PSO were used to develop the models.
2.2.1. Generating Database
Every effective geometrical and traffic variable which may affect the safety level of the interchange was recognized, and a list of these variables comprising the length of the weaving area, the number of lanes in the weaving area, the number of lanes in onramp, the number of lanes in offramp, the free flow speed in freeway, the free flow speed in onramp, the free flow speed in offramp, the freeway flow rate, the onramp flow rate, the offramp flow rate, the length of the acceleration lane, the length of the deceleration lane, the length of the interchange ramp, the average slope of the ramp, and the ramp radius was prepared. Table 3 describes the variables and their range used for the simulations. Combining various values of each variable with those of the other variables resulted in the generation of 13608 different ramps, weaving, merge, and diverge areas with different traffic and geometrical characteristics. Different kinds of interchange ramps, weaving, merge, and diverge areas with different geometry and different traffic characteristics were simulated. The trajectory data were derived from every simulation run. By applying the proposed fuzzybased method, NCPI was computed for every case. Thus, a database could be generated containing 10368, 2160, 720, and 360 rows of information for weaving areas, merge areas, diverge areas, and ramps, respectively.
 
^{a}L_{W} is the length of the weaving area, N_{W} is the number of lanes in the weaving area, N_{RON} is the number of onramp lanes, N_{ROFF} is the number of offramp lanes, V_{FW} is the freeway volume, V_{RON} is the onramp volume, S_{FW} is the freeway freeflow speed, S_{RON} is the speed of onramp, and S_{ROFF} is the speed of offramp. ^{b}L_{ACC} is the length of the acceleration lane, V_{FW} is the freeway volume, N_{FW} is the number of freeway lanes, V_{RON} is the onramp volume, N_{RON} is the number of onramp lanes, S_{FW} is the freeway freeflow speed, and S_{RON} is the speed of onramp. ^{c}L_{DEC} is the length of the deceleration lane, N_{FW} is the number of freeway lanes, N_{ROFF} is the number of offramp lanes, V_{FW} is the freeway volume, S_{FW} is the freeway freeflow speed, and S_{ROFF} is the speed of offramp. ^{d}L_{R} is the length of the interchange ramp, N_{R} is the number of lanes in the interchange ramp, S_{LONG} is the average slope of the ramp, V_{R} is the ramp flow rate, and R_{R} is the radius of the ramp. 
As described in Table 4, the database comprised geometrical and traffic characteristics of the ramps, weaving, merge, and diverge areas of the interchange as inputs and computed NCPIs as the output. Using this database, the models could be developed.

2.2.2. ANN Approach
ANNs are massive parallel architectures that can determine answers to demanding problems with the participation of simple mutually dependent processing elements (artificial neurons) [29]. An ANN has powerful aspects of learning and data processing, and thus, it is an effective tool for engineering applications. The multilayer backpropagation network, the most popular ANN paradigm [30], was used for efficient generalization competence. ANNs have the ability to carry out with a good amount of generalization from the patterns on which they are trained [31]. Training incorporated processing neural networks with a set of known specific inputoutput data using the generated database. The backpropagation ANN included layers with neurons: the input layer, the output layer, and the hidden layers. The learning process was continued in the output layer where the error between the model outputs and desired outputs was calculated and then propagated back to the network with updated weights for the direction in which the performance function decreases very rapidly [32]. The entire training process was repeated for a number of epochs until the desired accuracy in the network output was gained. After training and then, validation of the network, the network was tested by using data that have never experienced before.
Determining the number of hidden neurons is an important task. The number of hidden neurons has a strong effect on the stability of the neural network which is estimated by error (minimal error reflects better stability). The random selection of a number of hidden neurons may cause either overfitting or underfitting of the predicting models [33]. This concern arises when the network corresponds to the data so closely that the ability to generalize over the test data is lost. An excessive number of hidden neurons will cause overfitting where neural networks overestimate the complexity of the target problem. In this sense, determination of the proper number of hidden neurons to prevent overfitting is critical for problem estimation with the capability for steady generalization with the lowest possible deviation in estimation. Accordingly, the number of hidden neurons must be delimited within a reasonable range. To reach the minimum error, the optimized number of hidden neurons was determined. The ANN model had also a number of neurons in the input layer and one neuron in the output layer. In the trial and error attempts, the number of neurons in the input layer was considered equal to or a multiple of the number of variables in every part of the interchange. Subsequently, the neural network results were evaluated to determine the number of neurons that would provide satisfactory results.
To ensure good generalization under ANN processing, dividing the experimental data into three subdivisions is mandatory: training, validation, and testing. For database partitioning, Looney recommended 25% for testing [34], whereas Swingler proposed 20% [35] and Nelson and Illingworth suggested 20 to 30% [36]. Therefore, in the present work, the training dataset consists of 60% of data entries, and the remaining data entries are divided equally between the validation and testing sets. To test the reliability of the neural network model, 20% of the samples were randomly selected as the validation set and 20% of the samples as the test set. The performance of an ANNbased model primarily depends on the network architecture and parameter settings. In this study, the Matlab ANN toolbox [37] was used for ANN applications. All the networks were trained using the Levenberg–Marquardt algorithm with tansig transfer functions between the input and the hidden layers and the purelin transfer function between the hidden layers and the output layer along with a trainlm training function. Performance evaluation was characterized by plots of rootmeansquared error (RMSE) versus epoch for the training, validation, and test performances of the data. In principle, the error is reduced after more epochs of training but may begin to increase on the validation dataset as the network starts overfitting the training data. To reach the best ANN, its performance was deduced from the epoch with the lowest validation error after which there was no more increase in the RMSE error. Consequently, a reliable ANNbased safety estimator model was developed, and therefore, NCPI could be estimated using adequate information about the values of geometrical and traffic characteristics. The structure of the ANN used for estimation of the safety level in the weaving area is shown in Figure 8, for example.
The properties of the designed ANNs are as follows: Weaving area: Number of hidden layers: 3 Number of neurons in each hidden layer: 9 Merge area: Number of hidden layers: 3 Number of neurons in each hidden layer: 7 Diverge area: Number of hidden layers: 3 Number of neurons in each hidden layer: 7 Ramps: Number of hidden layers: 3 Number of neurons in each hidden layer: 5
2.2.3. PSO Approach
Recently, Eberhart et al. proposed a PSO algorithm to be used for global optimization on the basis of random exploration methods and models of simple social systems. They stated that the algorithm is very efficient in solving the nonlinear problems. The PSO algorithm is established based on researches on different communities such as birds’ community and can be used to optimize both nonlinearcontinuous and discrete problems. In addition, the algorithm does not require plenty of time and memory for calculations because of its simple concept [17, 38, 39].
“Any information can be exchanged among the population” and “the behavior of each particle is affected by the behavior of other particles in the community” are the two hypotheses of the PSO algorithm which forms its basic concepts according to the results of a lot of studies on different communities. PSO has been developed in a twodimensional (xy) space, and the coordination of each particle is defined in this space. The vectors of the movement of particles are illustrated as V_{x} and V_{y} in each direction as velocity vectors. So, the movements of each particle are depicted by its coordination and vectors. Every particle in the community tries to optimize a specific target function. It knows its own best results and current coordination, and the particle is also informed about the best results of the community. Therefore, the movement vector of each particle can be achieved by [40]where is the movement vector of particle i in iteration k, is the modified movement vector of particle i, rand is a random digit between 0 and 1, x_{i}^{k} is the current location of particle i in iteration k, pbest is the best result of particle i, is the best result of the community, is the weight coefficient of the velocity vector of particle i, and c_{i} is the weight coefficient of each component. The location of each particle can be obtained by [40]:
The concept of modifying the search point is depicted in Figure 9.
To ensure the convergence of the PSO, a contraction factor was applied to (27). Thus, the equation of the movement vector is modified as [40]where K is the contraction factor and can be computed by [40]
All parameters were described previously. Choosing an appropriate will lead to creating a balance between the general and local search. The coefficient can be calculated by [40]where iter is the number of iterations and iter_{max} is the maximum number of iterations. Based on the above concepts, the following steps were performed to develop the PSObased safety estimator model in the four parts of freeway interchanges.
Step 1 (defining the general formulation). Equation (33) depicts the general formulation of the PSO algorithm.where NCPI_{i,PSO} is the NCPI calculated by the PSObased model in iteration i, t_{1} to t_{n} are the traffic variables, _{1} to _{n} are the geometry variables, and a_{1,i} to a_{n,i} are the constant parameters and coefficients of the PSO basic equation.
Step 2 (defining the input data). The geometry and traffic variables in the database were considered as the input data of the PSO algorithm.
Step 3 (defining the target output data). The NCPIs (safety level) in the rows of information of the generated database were considered as the target output data.
Step 4 (proposing a basic equation with adequate constant parameters and coefficients). Some equations were proposed, and after a great deal of trial and error attempts, the best equations were chosen. Equations (34–40) are the selected equations. Constant parameters of the basic equations would be defined based on the generated database.
Weaving area:where NCPI_{W} is the NCPI in the weaving segment, L_{W} is the length of the weaving area, N_{W} is the number of lanes in the weaving area, N_{RON} is the number of onramp lanes, N_{ROFF} is the number of offramp lanes, V_{FW} is the freeway volume, V_{RON} is the onramp volume, S_{FW} is the freeway freeflow speed, S_{RON} is the speed of onramp, S_{ROFF} is the speed of offramp, and a_{i} and b_{i} are constant parameters.
Merge area:where NCPI_{M} is the NCPI in the merge area, L_{ACC} is the length of the acceleration lane, N_{FW} is the number of freeway lanes, N_{RON} is the number of onramp lanes, V_{FW} is the freeway volume, V_{RON} is the onramp volume, S_{FW} is the freeway freeflow speed, S_{RON} is the speed of onramp, and a_{i} and b_{i} are constant parameters.
Diverge area:where NCPI_{D} is the NCPI in the diverge area, L_{DEC} is the length of the deceleration lane, N_{FW} is the number of freeway lanes, N_{ROFF} is the number of offramp lanes, V_{FW} is the freeway volume, S_{FW} is the freeway freeflow speed, S_{ROFF} is the speed of offramp, and a_{i} and b_{i} are constant parameters.
Ramps:where NCPI_{R} is the NCPI of the interchange ramp, L_{R} is the length of the ramp, L_{R,mod} is the modified length of the ramp, N_{R} is the number of lanes in the ramp, S_{LONG} is the average slope of the ramp, V_{R} is the ramp flow rate, R_{R} is the radius of the ramp, and a_{i} and b_{i} are constant parameters.
Step 5 (checking the difference between the NCPIs estimated by the PSObased model and the NCPIs in the database). The results of the NCPI using the basic equations were compared to the NCPI in the database, and the RMSE was calculated bywhere NCPI_{i,DB} is the NCPI in the rows of information of the generated database.
Step 6 (obtaining the global best result). After a lot of trial and error attempts and several iterations, the best results of constant parameters (as the global best results) of the basic equations were obtained when the possible minimum RMSE was reached.
2.2.4. Statistical Analysis
The models were evaluated by statistical analysis and field studies. The survey results were compared with the models’ outputs. Regarding possible differences between the survey results and the models’ outputs, it was necessary to know that these differences were because of either data distribution and their random properties or a significant diversity between the outcomes. Statistical analysis indicated whether there was a significant difference between the surveyed NCPIs and the corresponding NCPIs estimated by the models or not. A pooled ttest was used due to the limited number of samples. Statistical t could be calculated by [41]where µ_{m} and µ_{s} are the mean of the models’ population and the mean of the survey population, respectively. n_{m} and σ_{m} are the number of samples and standard deviation of the models’ results, and n_{s} and σ_{s} are the number of samples and standard deviation of survey results, respectively. Computed t should be compared with the tabulated values of the tdistribution table. The tabulated values of the tdistribution table depend on the degree of freedom, f, which represents the number of independent parts. The degree of freedom is defined by (44) in tdistributions [41]:
Once the statistical t is determined, the tabulated values of the tdistribution table yield the probability of a situation in which the t value is greater than the computed value. In order to limit the probability of a “type I” error to 0.05, the difference in the means will be considered significant only if the probability is less than or equal to 0.05. In other words, if the calculated t value falls within the 5% area of the tail, or in other words, if there is less than a five percent chance that such a difference could be found in the same population, the difference in the means will be considered significant. If the probability is greater than 5% (or the computed t value is less than the tabulated values of the tdistribution table), it could be concluded that such a difference in means could be found in the same population and the difference would not be considered significant [41].
3. Results and Discussion
Estimation of the safety level in the ramps, weaving, merge, and diverge segments of freeway interchanges was the main purpose of this research. A huge number of simulated parts of freeway interchanges and the ten existed freeway interchanges in Tehran Province in Iran were investigated, and by using the proposed fuzzybased method, the NCPI was determined in every case. The models’ required database was generated after the NCPI was calculated in all the cases. The database contained, respectively, nine, seven, six, and five traffic and geometric characteristics for weaving areas, merge areas, diverge areas, and ramps as inputs and the NCPIs as output. Therefore, two ANNbased and PSObased models were developed utilizing the database.
3.1. ANN Results
The ANNbased development process was accomplished, and data training was stopped when the RMSE in the validation set began to increase, which signifies that the ANN generalization stopped increasing. Further analysis was conducted to test the accuracy of estimation by completely new input data to ensure that the reference model of the neural networks provides reliable results. To verify that the given estimation models are suitable to provide reliable results, a complete set of new data (which were not used in the evaluation) was used. The results of the ANNbased model were categorized into three collections of all data, validation data, and test data as indicated in Figure 10 for interchange ramps, for instance. For each collection, ANN outputs were compared with the NCPI in the database (as the target), and the results were presented in the first graph. Error diagram and error distribution of the data of each collection were depicted in the second and third graphs, respectively.
(a)
(b)
(c)
The results of using the ANN to estimate the NCPI in the four parts of the interchange are illustrated in Figure 11, and the correlation between the estimated NCPI by the ANNbased model and the NCPI in the generated database in the interchange ramps was represented in Figure 12, for instance. According to the results, considering the fact that all neural network models showed similar small error means and high coefficients of correlation, the difference between the results of training and validation sets was negligible.
As shown in Figures 11 and 12, the analysis indicated a relative agreement between the NCPIs in the database and estimated data, according to all statistical performance measures. The standard deviation, coefficient of correlation, error mean, and RMSE of the three collections demonstrated a proper development of the ANNbased model. The low values of RMSE and error mean and the high value of coefficient of correlation are commonly recognized as a good estimation of the model.
But, comparing the statistical results of the four parts with each other, the highest coefficient of correlation and the minimum RMSE along with the smallest value of standard deviation were found in the diverge area. The lowest coefficient of correlation was detected in the merge area, and the high values of RMSE and standard deviation were obtained in interchange ramps and merge areas. However, the results of conducted analysis indicated that the proposed ANNbased model could generally be used to estimate the safety level of the four parts of the freeway interchange with sufficient accuracy, and the results clearly depicted that, for all the samples, values estimated with the ANNbased model are strongly consistent with the values obtained by analyzing the trajectory data. It is clear that the modeling results are exceptionally correct; therefore, there is no doubt regarding the accuracy of the estimation performance of the ANNbased model.
3.2. PSO Results
After a lot of trial and error attempts, the maximum number of iterations and the best population size (swarm size) were discovered in the PSObased model development process. When the algorithm reached the minimum MSE as the best cost, the trial and error attempts were stopped. Therefore, the constant parameters of (34–40) were determined based on the results of iterations. The global best results and their position in the basic equations along with MSE and RMSE of the algorithm for the diverge area are presented in Figure 13, for instance, and a brief overview of applying the optimization process on all parts of interchanges is presented in Table 5.

The values of RMSE indicated a relatively good development of the model. The values are different and vary from 7.66 for the weaving areas to 18.7 for the ramps. Irregular movement of the vehicles in curves may cause a higher value of RMSE in this area.
Although the RMSE values for the PSObased model are more than those for ANNbased models, it is not enough to decline the application of the PSObased model in estimating the safety level in freeway interchanges. Constant parameters were determined, and therefore, (34–40) were rewritten as (45–51).
Weaving area:
Merge area:
Diverge area:
Ramps:
All parameters were described previously.
3.3. Field Studies’ Outcomes
As it was mentioned before, field studies were used to evaluate the proposed method and the models. Six weaving areas, five merge areas, five diverge areas, and five ramps were surveyed through the field study on ten freeway interchanges of Tehran Province in Iran. The values of the NCPI were computed using trajectory data analysis and estimated by applying ANNbased and PSObased models on the interchanges with characteristics brought in Table 2. The results of statistical analysis are illustrated in Table 6. It could be said that no significant differences between the means of the models’ population and the real population were found when almost all computed statistical tvalues (which are achieved from statistical analysis of the population of the models and studied areas) are less than the tabulated values of the tdistribution table.

4. Conclusion
In this paper, it was intended to propose a new method to have an exclusive safety indicator among different SSMs at the first step and to develop a model to estimate the safety level according to geometrical and traffic characteristics of different parts of freeway interchanges at the second step. Different surrogate measures were combined using fuzzy logic, and an index called NCPI was defined as a safety level indicator. The variables of NCPI including outputs of four surrogate measures of safety were determined by analyzing the trajectory data. The trajectory data could be either achieved from video processing or derived from microsimulation. Then, NCPI was obtained by applying fuzzy rules to the variables. It was done to estimate the level of safety when there are not enough data or information about the number and severity of accidents or the segment is just being designed and has not yet been built. Due to the difficulties of accessing or obtaining the trajectory data, two models were developed by ANN and PSO algorithms to estimate the safety level based on geometrical and traffic characteristics of interchanges. At last, field studies were carried out to calibrate the simulations, controlling the validity of the proposed fuzzy method and checking the accuracy of safety estimator models.
The results indicated an acceptable confidence about the validity of the proposed fuzzy method. The results also showed a good accuracy of the developed models in terms of compliance with the database generated from data analysis and also surveyed data of the field studies. It also became clear that, in most cases, the results of the ANNbased model have more accuracy than the results of the PSObased model. However, the advantage of using the PSObased model is that finally, there will be a certain relationship which can be conveniently used, while the ANNbased model has some prerequisites to work, say, database knowledge and MATLAB expertise.
The developed models can also be used for comparing different proposed plans of interchanges from safety aspects and ranking them in the design steps and plan selection process. In these cases, the lower accuracy of some PSObased models compared with the ANNbased models does not matter.
In general, the proposed models will be valid when the geometric and traffic characteristics of interchange’s parts fall within the range of variables’ values used for model development. Definitely, the more the difference between the values of these characteristics and the range of mentioned variable values, the more the reduction in the validity of the models. Another conclusion is that the models could be trained to estimate other traffic parameters such as the density, delay, and speed of interchange’s parts or other traffic facilities based on their traffic and geometric characteristics.
In this paper, it was proposed to use fuzzy logic and the algorithms of ANN and PSO to estimate the safety level of different parts of freeway interchanges. But, there will be a long way to reach a point that these methods become general and be used in every situation. In this way, we propose that these methods can be applied in a wider range of variables’ values and also be used in other segments of the freeway which include traffic conflicts, merging, or diverging.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
References
 L. Wang, M. AbdelAty, Q. Shi, and J. Park, “Realtime crash prediction for expressway weaving segments,” Transportation Research Part C: Emerging Technologies, vol. 61, pp. 1–10, 2015. View at: Publisher Site  Google Scholar
 J. Zhang, X. Sun, and Y. He, “Safety prediction models of freeway in plain terrain,” in Proceedings of the International Consortium of Critical Theory Programs (ICCTP’10), Beijing, China, August 2010. View at: Google Scholar
 M. Sarhan, Y. Hassan, and A. O. Abd El Halim, “Safety performance of freeway sections and relation to length of speedchange lanes,” Canadian Journal of Civil Engineering, vol. 35, no. 5, pp. 531–541, 2008. View at: Publisher Site  Google Scholar
 J. Xie, Y. Ma, L. Yuan, P. Zhang, and Y. Liu, “Safety and capacity performances of singlelane right exit ramp on freeway: a case study in Jiangsu Province, China,” Procedia Engineering, vol. 137, pp. 563–570, 2016. View at: Publisher Site  Google Scholar
 D. Eustace, A. Aylo, and W. Y. Mergia, “Crash frequency analysis of leftside merging and diverging areas on urban freeway segments–a case study of I75 through downtown Dayton, Ohio,” Transportation Research Part C: Emerging Technologies, vol. 50, pp. 78–85, 2015. View at: Publisher Site  Google Scholar
 H. Chen, H. Zhou, J. Zhao, and P. Hsu, “Safety performance evaluation of leftside offramps at freeway diverge areas,” Accident Analysis & Prevention, vol. 43, no. 3, pp. 605–612, 2011. View at: Publisher Site  Google Scholar
 W. Y. Mergia, D. Eustace, D. Chimba, and M. Qumsiyeh, “Exploring factors contributing to injury severity at freeway merging and diverging locations in Ohio,” Accident Analysis & Prevention, vol. 55, pp. 202–210, 2013. View at: Publisher Site  Google Scholar
 H. Behbahani, N. Nadimi, and S. S. Naseralavi, “New timebased surrogate safety measure to assess crash risk in carfollowing scenarios,” Transportation Letters, vol. 7, no. 4, pp. 229–238, 2015. View at: Publisher Site  Google Scholar
 H. Behbahani and N. Nadimi, “A framework for applying surrogate safety measures for sideswipe conflicts,” International Journal for Traffic & Transport Engineering, vol. 5, no. 4, pp. 371–383, 2015. View at: Google Scholar
 D. Gettman and L. Head, “Surrogate safety measures from traffic simulation models,” Transportation Research Record: Journal of the Transportation Research Board, vol. 1840, pp. 104–115, 2003. View at: Publisher Site  Google Scholar
 J. Archer, Indicators for Traffic Safety Assessment and Prediction and their Application in MicroSimulation Modelling: A Study of Urban and Suburban Intersections, Royal Institute of Technology, Stockholm, Sweden, 2005.
 K. Ozbay, H. Yang, B. Bartin, and S. Mudigonda, “Derivation and validation of new simulationbased surrogate safety measure,” Transportation Research Record: Journal of the Transportation Research Board, vol. 2083, pp. 105–113, 2008. View at: Publisher Site  Google Scholar
 L.Y. Chang, “Analysis of freeway accident frequencies: negative binomial regression versus artificial neural network,” Safety Science, vol. 43, no. 8, pp. 541–557, 2005. View at: Publisher Site  Google Scholar
 P. Angeline, “Evolutionary optimization versus particle swarm optimization: philosophy and performance differences,” in Evolutionary Programming VII, Springer, Berlin, Germany, 1998. View at: Google Scholar
 J. Kennedy, “The particle swarm: social adaptation of knowledge,” in Proceedings of the IEEE International Conference on Evolutionary Computation, Indianapolis, IN, USA, April 1997. View at: Google Scholar
 Y. Shi and R. Eberhart, “A modified particle swarm optimizer,” in Proceedings of the IEEE World Congress on Computational Intelligence Evolutionary Computation Proceedings, Anchorage, AK, USA, May 1998. View at: Google Scholar
 Y. Shi and R. Eberhart, “Parameter selection in particle swarm optimization,” in Evolutionary Programming VII, Springer, Berlin, Germany, 1998. View at: Google Scholar
 J. Hayward, Near Misses as a Measure of Safety at Urban Intersections, Department of Civil Engineering, The Pennsylvania State University, University Park, PA, USA, 1971.
 K. Vogel, “A comparison of headway and time to collision as safety indicators,” Accident Analysis and Prevention, vol. 35, no. 3, pp. 427–433, 2003. View at: Publisher Site  Google Scholar
 M. M. Minderhoud and P. H. L. Bovy, “Extended timetocollision measures for road traffic safety assessment,” Accident Analysis and Prevention, vol. 33, no. 1, pp. 89–97, 2001. View at: Publisher Site  Google Scholar
 A. Sobhani, W. Young, D. Logan, and S. Bahrololoom, “A kinetic energy model of twovehicle crash injury severity,” Accident Analysis and Prevention, vol. 43, no. 3, pp. 741–754, 2011. View at: Publisher Site  Google Scholar
 D. Gettman and L. Head, Surrogate Safety Measures from Traffic Simulation Models, Federal Highway Administration, Washington, DC, USA, 2003.
 C. Hydén, The Development of a Method for Traffic Safety Evaluation: The Swedish Traffic Conflicts Technique, Bulletin Lund Institute of Technology, Lund, Sweden, 1987.
 J. C. Hayward and Pennsylvania Transportation and Traffic Safety Center, Near Miss Determination through Use of a Scale of Danger, The Pennsylvania State University, University Park, PA, USA, 1972.
 D. Gettman, L. Pu, T. Sayed, and S. Shelby, Surrogate Safety Assessment Model and Validation, Research, Development, and Technology TurnerFairbank Highway Research Center, McLean, VA, USA, 2008.
 A. K. Maurya and P. S. Bokare, “Study of deceleration behaviour of different vehicle types,” International Journal for Traffic and Transport Engineering, vol. 2, no. 3, pp. 253–270, 2012. View at: Publisher Site  Google Scholar
 American Association of State Highway and Transportation Officials, A Policy on Geometric Design of Highways and Streets, AASHTO, Washington, DC, USA, 2011.
 R. P. Roess, E. S. Prassas, and W. R. McShane, Traffic Engineering, Pearson Prentice Hall, Upper Saddle River, NJ, USA, 2011.
 S. Haykin and R. Lippmann, “Neural networks, a comprehensive foundation,” International Journal of Neural Systems, vol. 5, no. 4, pp. 363364, 1994. View at: Publisher Site  Google Scholar
 R. Lippmann, “An introduction to computing with neural nets,” IEEE Assp Magazine, vol. 4, no. 2, pp. 4–22, 1987. View at: Publisher Site  Google Scholar
 M. Bilgehan and P. Turgut, “The use of neural networks in concrete compressive strength estimation,” Computers & concrete, vol. 7, no. 3, pp. 271–283, 2010. View at: Publisher Site  Google Scholar
 M. A. Kewalramani and R. Gupta, “Concrete compressive strength prediction using ultrasonic pulse velocity through artificial neural networks,” Automation in Construction, vol. 15, no. 3, pp. 374–379, 2006. View at: Publisher Site  Google Scholar
 K. G. Sheela and S. N. Deepa, “Review on methods to fix number of hidden neurons in neural networks,” Mathematical Problems in Engineering, vol. 2013, pp. 1–11, 2013. View at: Publisher Site  Google Scholar
 C. G. Looney, “Advances in feedforward neural networks: demystifying knowledge acquiring black boxes,” IEEE Transactions on Knowledge and Data Engineering, vol. 8, no. 2, pp. 211–226, 1996. View at: Publisher Site  Google Scholar
 K. Swingler, Applying Neural Networks: A Practical Guide, Morgan Kaufmann Publishers, Burlington, MA, USA, 1996.
 N. M. McCord and W. Illingworth, A Practical Guide to Neural Nets, AddisonWesley, Boston, MA, USA, 1990.
 M. H. Beale, M. T. Hagan, and H. B. Demuth, Neural Network Toolbox™ User’s Guide, The MathWorks, Inc., Natick, MA, USA, 2012.
 J. Kennedy and R. C. Eberhart, “Particle swarm optimization,” in Proceedings of the IEEE International Conference on Neural Networks, Piscataway, NJ, USA, November–December 1995. View at: Google Scholar
 J. Kennedy, Particle Swarm Optimization, in Encyclopedia of Machine Learning, Springer, Berlin, Germany, 2011.
 B. Zhao, C. Guo, and Y. Cao, “A multiagentbased particle swarm optimization approach for optimal reactive power dispatch,” IEEE Transactions on Power Systems, vol. 20, no. 2, pp. 1070–1078, 2005. View at: Publisher Site  Google Scholar
 C. Spiegelman, E. S. Park, and L. R. Rilett, Transportation Statistics and Microsimulation, Taylor & Francis, Abingdon, UK, 2010.
Copyright
Copyright © 2018 Hamid Behbahani et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.