Speed Grade Evaluation of Public-Transportation Lines Based on an Improved T-S Fuzzy Neural Network

*is paper proposes an evaluation method based on a T-S fuzzy neural network for evaluating the speed grade of public-transport lines in the context of large-scale rail-transit planning and construction in Hangzhou. *e six-dimensional data of morning peak/ evening peak average speed, average speed at peak, average station distance, proportion of dedicated lanes, and nonlinear coefficients were selected as input data for the neural network to output the operating speed grade of bus lines. Improving and optimizing the membership function of the Takagi–Sugeno (T-S) model improves its predicted result accuracy compared to a traditional T-S model. *e line data of 28 typical trunk lines or expressways in Hangzhou were used as an example; the results demonstrate that the speed grade evaluation method based on an improved T-S fuzzy neural network can effectively and quickly evaluate the speed grade of Hangzhou public-transportation lines. *is paper presents a novel analysis and method for large-scale rail-transit planning and evaluation of urban public-transport lines. *e aim is to provide practical instruction for the subsequent optimization of public-transportation lines in Hangzhou.


Introduction
In recent years, urban road traffic pressure has increased with the rapid growth in the number of motor vehicles in Hangzhou. Hangzhou is one of the most congested cities in China according to the recent congestion ranking of national key cities. According to survey data from 2015 to 2018 on public-transport travel in Hangzhou, the average travel time for public transport is approximately 54 min, almost twice the average resident travel time [1]. Low public-transport efficiency is the main reason for residents refusing public transport. To adjust the operation of public-transportation lines, it is necessary to first identify the low-efficiency publictransportation lines. erefore, identification and evaluation of low-efficiency bus lines is an urgent problem in the optimization and adjustment of bus lines [2].
Presently, research on public-transport evaluation in China predominantly focuses on the evaluation object, content, and method. Li and Sun [3] used system, science, objectivity, and practicality as their objective based on the evaluation system of a general public-transport service level and used the gray clustering method to comprehensively evaluate the bus rapid transit (BRT) service level. Shang [4] considered the minimum total cost of the system as the evaluation objective, established an evaluation model for rail transit, and evaluated the benefit of transit, focusing on rail transit. Chen [5] introduced the network analysis connectivity index in the evaluation of conventional public transport and proposed a calculation method for the index. Huang et al. [6] and others used the analytic hierarchy process method to evaluate bus stops, lines, and systems of different levels based on the objectives of bus effectiveness, travel efficiency, comfort, convenience, and safety [7]. Jing [8] constructed a cumulative logistic regression model to evaluate the bus service level of bus stops, lines, and the entire bus system at different levels.

Evaluation Index of Speed Grade. Each evaluation index
for the bus-line speed grade can express some characteristic affecting the speed grade; each evaluation index should be measurable or obtainable by a quantitative or qualitative classification comparison method [13]. e evaluation of the bus-line speed grade is done to optimize the bus line; thus, the urban traffic environment should be considered. Based on the situation of large-scale urban rail-transit planning and construction, this study mainly considers the morning/evening peak average speed and peak average speed, which involves the bus speed level, and three vital indicators affecting the bus speed: the average station distance, proportion of dedicated lanes, and nonlinear coefficient: (1) Average speed of morning peak/evening peak/average peak, V1/V2/V3 e average speed of morning peak/evening peak/ average peak refers to the average bus operation speed of all bus lines during the morning peak/ evening peak/average peak time. e calculation formula is as follows: where V ij is the driving speed of the j bus on the i bus line, L is the length of the i bus line, t represents the travel time of the j bus on the i bus line, and N is the number of vehicles in the morning peak/evening peak/normal peak period of the ibus line. (2) Average station distance, S e average station distance refers to the construction situation of the bus station, which refers to the ratio of the line length to number of stations. e average distance between bus stops affects the speed of urban vehicles. e calculation formula is as follows: where L is the length of the bus lines and Y is the number of bus stops. (3) Proportion of dedicated lanes, W e proportion of dedicated lanes refers to the ratio between the length of the bus lanes and the total length of the bus-routes. e calculation formula is as follows: where l is the length of the dedicated lane. (4) Nonlinear coefficient R e nonlinear coefficient indicates the ratio of the actual distance between the initial and terminal stations of the bus line and the spatial straightline distance. e calculation formula is as follows: where d is the linear distance between the first and last station.

Fuzzy Neural-Network Evaluation Method.
A fuzzy neural network is a combination of a fuzzy system and neural network [21]. A fuzzy control system is a digital control system based on fuzzy aggregation, fuzzy language variables, and fuzzy logic reasoning. e neural network imitates a biological neural system. It can imitate the human brain neural-network model and information-processing function, performing information processing, decisionmaking, association memory, studying, etc. A fuzzy neural network combines the advantages of neural networks and fuzzy control and has great advantages in dealing with nonlinear and fuzzy problems. e T-S fuzzy neural-network model can analyze nonlinear complex systems with the help of the linear system analysis method. It combines the reasoning ability of fuzzy control with the learning ability of a neural network and has a higher global approximation ability.

Basic Principle of T-S Fuzzy System.
e T-S fuzzy system is a type of self-adaptive fuzzy system. e model can be updated automatically by modifying the membership function of the fuzzy subset [22]. e T-S fuzzy system is defined in the "if − then" form, as follows: when the rule is R i , the fuzzy reasoning is as follows: where R i stands for the i fuzzy rule, A i j is a fuzzy subset (and the parameters in its membership function are referred to as the antecedent parameters), y i is the output of the i fuzzy rule, p i j is the subsequent parameter, and n is the number of fuzzy rules. Equation (5) presents the T-S fuzzy model.
For the input quantity, x � [x 1 , x 2 , . . . , x k ], the membership degree of each input variable x j is calculated according to the Gauss membership function, as follows: where c i j and b i j are the center and width of the membership function, respectively, k is the output parameter, and n is the number of fuzzy subsets. e fuzzy calculation is carried out for each membership degree, and the fuzzy operator adopts the multiplication operator, as follows: where ω i is the output membership of the i fuzzy rule and represents the fuzzy operator.
According to the results of the fuzzy calculation, the output value y i of the ifuzzy rule is obtained, as follows: e output value can be weighted and averaged by the output of each fuzzy rule, as follows:

Improved T-S Fuzzy System.
e T-S model has good approximation ability, can approximate continuous functions on bounded closed sets with arbitrary accuracy, and has strong explanatory and anti-interference capabilities. However, in the traditional T-S model, the membership function usually only chooses one type of Gauss-type membership function, which is not adaptive. It is difficult to match the actual model in the modeling process and is thus difficult to achieve accurate predictions. erefore, the membership function in the improved T-S model can be approximated as a triangle, trapezoid, Gauss, or other membership function by selecting the appropriate value, a, a parameter in equation (10). If the values of parameters b and c in equation (10) are further changed, the improved membership function can be translated and expanded and can be closer to a triangle, trapezoid, Gauss, or other membership function.

Definition 1.
If μ x has the following expression, it is called an improved Gauss membership function: where a > 0, b > 0, and c ∈ R.
Definition 2. If the membership functions of the T-S system are all in the form of an improved Gauss membership functions, the fuzzy logic system is called an improved T-S fuzzy logic system. According to the definition, an improved Journal of Advanced Transportation 3 T-S system with kinputs, a single output, and n fuzzy rules can be obtained: e improved T-S model algorithm has high precision and is easy to engineer. e membership function can be adjusted automatically by a value. erefore, the improved Gauss membership function has strong adaptability. It can match the actual situation more accurately, improving the prediction result accuracy [23].

Structure of the T-S Fuzzy Neural Network.
e common T-S fuzzy neural network is composed of an antecedent network and consequent network, as shown in Figure 1.
e antecedent network of the T-S fuzzy neural network is divided into an input, fuzzification, fuzzy rule calculation, and normalization layer. e input layer is connected to the input vector, x i , and the number of nodes is equal to the dimension of the input vector. In the fuzzification layer, the membership function is used to fuzzify the input value to obtain the fuzzy membership value μ. e fuzzy rule calculation layer uses the fuzzy multiplication formula to calculate ω. e normalized layer calculates the proportion of each connection weight in the total connection weight. e subsequent network is divided into input, hidden, and output layers. e function of the input layer is to transfer input variables to the next layer. e function of the hidden layer is to calculate the after effect of each rule. e output layer uses the activation function formula to calculate the output of the neural network. e fuzzy neural network determines the number of input and output nodes according to the input and output dimensions of the training samples.
In this study, if the input data dimension is 6 and the output data dimension is 1, the input and output nodes of the network are 6 and 1, respectively. e hidden layer is not clearly defined, and thus, it usually uses formula calculation or continuous training to obtain the best number of nodes.
is study adopted the empirical formulal � ����� m + n √ + a, where l is the number of hidden layer nodes, m is the number of input layer nodes, n is the number of output layer nodes, and a is any constant between 0 and 10. erefore, the number of neurons in the hidden layer is in the range of [3,13]. To obtain the optimal network structure, the number of neurons in the hidden layer was increased in the range of [3,13], the corresponding network model was established, and the error rate of each test sample was compared. As shown in Figure 2, when the number of neurons in the hidden layer is 11, the error rate is smallest. erefore, the network structure is 6-11-1. e center c, width b, and coefficient p 0 ∼ p 6 of the fuzzy membership function are initialized randomly [24].

Learning Algorithm of T-S Fuzzy Neural Network.
In the learning algorithm of a fuzzy neural network, the choice of the membership function of the fuzzy system is very important. As a key part of the learning algorithm of a fuzzy neural network, the learning accuracy and time complexity of the FNN learning algorithm changes with the change in membership function [25]. In this study, an improved T-S fuzzy system is established to improve the neural-network learning algorithm. As shown in equation (5), the Gaussian membership function is used to construct the fuzzy rules. e cost function of the target output of the neural network is y d , defined as follows: where y d and y c are the expected and actual output of the network, respectively, and e is the error between the expected and actual output.
In the iterative process of the algorithm, when the expected output is inconsistent with the actual output or the maximum number of iterations is not reached, the parameters and coefficients of the improved T-S fuzzy system are modified owing to coefficient correction equations (13) and (14) and parameter correction equations (15) and (16). Simultaneously, we automatically adjust the a value in equation (10) to change the membership function of fuzzy reasoning and subsequently adjust the weight until all conditions are satisfied. Finally, the weight ω is brought into the neural network to calculate the output of the neural network: where p i j is the coefficient of the neural network, α is the learning rate of the network, and ω i is the product of the membership degree of the input parameters: e flowchart of the fuzzy neural-network algorithm constructed in this study is shown in Figure 3

Data Acquisition.
e research scope is the main urban area of Hangzhou and the research object is representative of the currently operating bus lines in the main urban area.
ere are 380 normal bus operation lines in the main urban area of Wu and Lou [26]. According to the operational characteristics and the urban area location, and to avoid too short a line length and too much influence by randomness, this study predominantly considered three indicators when selecting the evaluation line: (1) the length of the line is more than 10 km; (2) it can cover the main passenger flow corridors and main areas in the main urban area; (3) it is a representative trunk line or express line, with a passenger flow intensity index. According to the index, 28 representative lines were selected: statistics of 28 bus-line speed grade evaluation index data. According to equations (1)-(4), six-dimensional input data were computed, including the average morning peak/evening peak speed V1/V2, average peak average speed V3, average station distance S, proportion of dedicated lanes W, and nonlinear coefficient R, as shown in Table 2.

Data Preprocessing.
e bus-line grade evaluation data were all from actual measurements, ensuring the authenticity and reliability of the original data. Simultaneously, it was necessary to preprocess the data to ensure their validity and rationality. Processing the original data mainly involves exception data elimination, data normalization, and antinormalization [27]: (1) Exception data elimination To improve the accuracy of the data and avoid the interference of the abnormal data in the learning and training process of the evaluation model for publictransport line grade, the statistical discrimination 3σ criterion was used to eliminate abnormal data in the transaction data. e specific process is as follows.
In this experiment, there were Δ groups of sample data for the bus-line grade evaluation. e mean value is x, the deviation of each sample dataset is D(i) � x(i) − x, i � 1, 2, . . . , n, and the standard deviation is τ, defined as If the deviation of x(i) satisfies then group x(i) bus-line evaluation data are abnormal data and should be eliminated.

(2) Data normalization and antinormalization
To eliminate the influence of a too large difference of sample data in data analysis in the process of evaluating the public-transport line grade, the input data of the value evaluation model were normalized and denormalized via the maximum and minimum methods, and the calculation process is as follows: where x is the input variable, x j is the normalized value of the j dimension variable, i � 1, 2, . . . , l, l is the number of influencing factors related to the grade evaluation of public-transport lines, x j, min is the minimum value of the j dimension variable, and x j, max is the maximum value of the j dimension variable.

Construction of Evaluation Model for Bus-Line Speed
Grade. In this study, the linear interpolation method is used to expand the training samples based on the bus-line speed classification criteria presented in Table 1. e authors used the rand function to randomly generate 500 groups of samples, and 00 groups were inserted between each grade. e target output of samples less than the grade I standard generates corresponding values between 0 and 1 according to the interpolation ratio. e target output of samples between level I and II standards generates corresponding values between 1 and 2 according to the interpolation proportion. Similarly, the corresponding values of grades II and III, III and IV, IV, and V are 2-3, 3-4, and 4-5, respectively. In each sample dataset, 85 groups were randomly selected as training samples and the remaining 15 groups were test samples. us, in this network training test, there were 425 training samples and 75 test samples.
On the MATLAB platform, the traditional T-S fuzzy neural network and the improved T-S fuzzy neural network were used to evaluate the speed grade of public-transportation lines. According to the previously determined network structure, the prediction accuracy of the two models was verified.
e training samples and test samples were input into the two networks to train and test them. e traditional T-S fuzzy neural-network training results and test results are shown in Figures 4 and 5, respectively, and the improved T-S fuzzy neural-network training results and test results are shown in Figures 6 and 7. To show the fluctuation of the training data error curve more intuitively, this study presents the local graphs of the traditional T-S fuzzy neural-network training data prediction diagram and the improved T-S fuzzy neural-network training data prediction diagram in Figures 8 and 9.
It can be seen from Figures 4-9 that the predicted output value of the neural network is almost consistent with the actual output value in the overall trend and the error curve fluctuates around approximately 0. However, through the comparative analysis of Figures 4 and 6, Figures 5 and 7, and Figures 8 and 9, it can be seen that the improved T-S fuzzy neural-network model has a higher curve coincidence rate and smaller error curve fluctuation. To further analyze the evaluation accuracy of the two models, the author uses the following equation to quantitatively analyze the predicted value of the evaluation results: where y di is the actual output and y ci is the predicted output. e following rules were set: when p i ≤ 10%, the prediction result is considered to be good; when 10% ≤ p i ≤ 30%, it is considered to be general; when30% ≤ p i ≤ 50%, it is considered to be poor; when p i ≥ 50%, it is considered to be the worst. 425 training results and 75 predicted results classified according to the above rules are shown in Table 3.
It can be seen from Table 3 that the number of "Poor" and "Worst" in the prediction results of the improved T-S fuzzy neural network is significantly reduced, and the number of "Good" and "General" in the prediction results has increased; this demonstrates that the prediction error of the improved T-S fuzzy neural network is smaller than that of the traditional T-S fuzzy neural network, and the prediction result of the model is more accurate.

Speed Grade Evaluation.
is study evaluates the selected 28 bus-line grades manually according to the standards in Table 1, the current research results of bus-line evaluation, and the experience of industry experts. e evaluation results are shown in Table 4.
e trained traditional T-S fuzzy neural network was used to evaluate the speed grade of the 28 bus lines. e results are shown in Table 5.
en, the trained improved T-S fuzzy neural network is mainly used to evaluate the speed grade of 28 bus lines. e results are shown in Table 6.  e prediction error is increased by 10.8%, and the prediction result is more accurate. e effectiveness of the improved T-S fuzzy neural-network-based bus-route evaluation method is verified. is demonstrates that the network model is reasonable and capable of accurate predictions.

Comparison of Different Methods in Evaluating Bus-Line
Speed Grade. To date, neural networks have been the main focus in the field of evaluation [28][29][30][31][32][33]. However, most of them adopt a BP neural network and their deformation and   Journal of Advanced Transportation the BP network easily fall into a local optimum during the training process [34]. To compare the accuracies of the T-S fuzzy neural network and BP neural network in evaluating bus-line speed grade, a BP neural network is used to train, test, and evaluate the same data. e BP neural network adopts a 6-11-1 network structure; the log-sigmoid function is selected as the hidden layer transfer function, the linear function is selected as the output layer function, and traingdx is selected as the training function. Training and test samples are the same as for the T-S fuzzy neural network, and the network iterates 200 times. e results are shown in Table 7.
As can be seen from Table 7, when evaluating the same sample, the average error and maximum relative error of the traditional T-S fuzzy neural network are 7.1% and 14.1% lower, respectively, than those of the BP neural network, and   the accuracy rate is 6.5% higher than that of the BP neural network. e average error and maximum relative error of the improved T-S fuzzy neural network are 5.8% and 24.5% lower, respectively, than those of the traditional T-S fuzzy neural network, and the accuracy rate is 10.8% higher than that of the traditional T-S fuzzy neural network. In conclusion, the overall performance of the improved T-S fuzzy neural network in the evaluation of bus-line speed grade is superior and demonstrates that the improved T-S fuzzy neural network evaluation model proposed in this paper has good application prospects in the evaluation of bus-line speed grade.

Application of T-S Fuzzy Neural Network in Other Fields.
e T-S fuzzy neural network proposed in this paper has been widely used in various fields and achieved good results.

Data
Traditional T-S fuzzy neural network  Improved T-S fuzzy neural network  Good  General  Poor  Worst  Good  General  Poor  Worst  Training data  228  157  32  8  272  138  14  1  Test data  41  21  11  2  42  29 4 0 Yang et al. [35] used different samples to train a T-S fuzzy neural network, and the results showed that the composition and quantity of training samples had an important impact on water quality evaluation. Li [36] used a T-S fuzzy neural network to study the robust stabilization of nonlinear fractional-order interconnected systems. Song et al. [37] focused on the state estimation issue of T-S fuzzy Markovian generalized neural networks with reaction-diffusion terms. e above research demonstrates that the T-S fuzzy neural network and its improved extended deformation have achieved good research results in many fields, showing that the method proposed in this paper is reasonable and a T-S fuzzy neural network can be applied for evaluating bus-line speed grade.

Conclusions
In large-scale urban rail planning and construction, bus-line speed is greatly affected by uncertain factors. e correct selection of influencing factors and the determination of evaluation methods are conducive to the rapid and accurate evaluation of bus-line speed grade and provide theoretical support for the follow-up optimization of bus lines.
In this study, six important factors that affect the speed grade of public-transport lines are selected, including the average speed of morning peak/evening peak, average speed of average peak, average distance between stations, proportion of special lanes, and nonlinear coefficients. An evaluation model of the T-S fuzzy neural network is proposed, and the traditional T-S fuzzy neural network is improved to obtain more accurate evaluation results.
rough a comparative analysis of the prediction results of the BP neural network, traditional T-S fuzzy neural network, and improved T-S fuzzy neural network, we can see that the overall performance of the improved T-S fuzzy neural network is superior in evaluating bus-line speed grade, demonstrating that the method proposed in this paper is feasible.
Owing to the small number of bus lines predicted in this study, there exists a small uncertainty in the error and accuracy data. Finally, much more bus-line data and total route estimations should be applied in future research, thus allowing improved verification of the accuracy of the method introduced above.

Data Availability
e data used to support the findings of this study have not been made available because the authors have no right to share it.

Conflicts of Interest
e authors declare no conflicts of interest regarding the publication of this article.