{'fraction_non_alphanumeric': 0.02570836212854181, 'fraction_numerical': 0.011817553559087767, 'mean_word_length': 4.878732480195003, 'pattern_counts': {'":': 0, '<': 0, '<?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}}
An artificial neural network model for maintenance planning of metro trains

In urban transportation, trains have an increasingly important place due to the increase in the number of passengers. Meeting the number of passengers is directly related to the number of trains operated on a line. Thus, the frequency of operation of trains affects the level of wear of the equipment. This makes train maintenance more important. Equipment faults are the basis for train maintenance. However, the fault times of the equipment which are unknown causes uncertainty in the maintenance activities and plans. This uncertainty results from many factors that affect the faults of the train. If historical maintenance data, fault data, and factors affecting the faults are known, effective use of resources (time, cost and personnel, etc.) is provided and uncertainty is eliminated. In this study, firstly, maintenance data in Ankara Metro between 2017 and 2018 is examined and the factors affecting equipment faults are evaluated with expert opinion. Artificial Neural Network (ANN) model is created with the data set and this data set along with the factors affecting each the equipment fault according to the type of equipment. In the ANN model, 5 factors (Equipment Type, Preventive Maintenance Frequency, Material Quality, Life Cycle, Line Status) affecting the faults of the equipment is determined as inputs and the number of failures as outputs. The mean absolute percent error (MAPE) value is found as 11%, and the mean square error value (MSE) is 0.0028229 in the training and test stages of ANN. Then, the frequency of fault is found according to the equipment fault and a 10-week maintenance planning is applied. The results are compared with current maintenance planning. As a result of the applied maintenance planning, the average number of faults of the trains decreases by 27%, uninterrupted service rate increases by 40% and heavy maintenance errors are also prevented. Fault removal times resulted in a 10% improvement. The results showed that ANN models could be used effectively in fault prediction and maintenance planning with rail system multiple types of equipment. In the literature, there is no study that implements maintenance planning with an ANN model where all train equipments and factors affecting the failure are evaluated together. This study is the first in the field of rail systems maintenance in the literature and will be a reference for future studies.


An Artificial Neural Network Model for Maintenance Planning of
Metro Trains

INTRODUCTION
Rail systems have a higher carrying capacity, lower environmental impact than other transportation systems. These reasons increase the demand for rail systems.
Increasing demand also increases the use of capacity. However, they require efficient use of energy, trains and safety factors [1]. A failure that occurs in one of these systems raises the problem of unused capacity [2]. The effective use of rail systems to meet increasing demand depends on infrastructure and superstructure maintenance [3]. The continuity of the system is affected by these maintenance resources and allows us to use the capacity of the trains [4]. The efficient use of capacity is to determine the most appropriate maintenance strategy to prevent faults, increase system reliability and reduce maintenance costs [4]. Lack of the most appropriate maintenance activities and plans for the system creates uncertainty to eliminate the fault [5].
Maintenance plays a key role in ensuring the safe and sustainable performance of the railway. Advances in technology make it possible to apply it to many aspects of the railway in maintenance activities [6]. Despite these developments, it is difficult to predict the faults of the train equipment due to the complexity of the system and many dependent factors affecting the system. However, accurate recording of fault data with factors and equipment will allow us to analyze the fault and predict the times of the faults.
The basis of the correct maintenance strategy is the evaluation all of the equipment which is maintained. Most train equipments are interactive and integrated systems that work as a whole system. So there are many different factors at the source of an equipment fault. Determination of these factors helps us to determine the source of the fault, to plan the maintenance and to use the resources effectively, such as staff and time.
ANN can be applied in many areas due to technological developments. At the beginning of these fields; problems of determination and prediction of the fault first come. Detection and prediction of faults are also applied in the rail systems field. [7]. Compared to other estimation methods, ANN gives better results than other methods in terms of model performance errors. [8]. However, it has not been applied to a problem related to maintenance planning that predicts faults of multiple types of equipment with ANN in rail systems. When the literature concerning the subject is analyzed, it is seen that there are studies on the faults related to the rail and lines.
In this study, the ANN model is used for future fault estimation by using the fault data and factors that affect the faults of the train in Ankara Metro lines. For each type of the equipment, the frequency of fault (Equipment Type, Preventive Maintenance Frequency, Material Quality, Life Cycle, Line Status) has been found and maintenance planning has been applied. The implemented maintenance planning caused a decrease in the average number of faults and downtime of the trains and an increase in the uninterrupted service rate. In this study, in the first part, general information and studies about rail systems, as rail system faults, information about ANN and studies, are briefly given. In the second part, the studies conducted in the literature with similar subjects and methods are briefly summarized and the contribution of this study to the literature is explained. In the third part, there is a brief information about the structure and system of ANN. Next, in the fourth section, some information about the content of the study, method and ANN model, are given. Finally, in the fifth part, the importance of the study, the prediction data is interpreted and some suggestions are presented.

LITERATURE REVIEW
There are many studies in the literature about both fault prediction and maintenance planning. Failure estimates are generally made on single machine/equipment failures (motor bearing, connecting bolts, pneumatic system, line circuit, etc.). Studies on fault prediction using ANN in rail systems are insufficient. Many studies have used hardware tools, sensors, and devices. However, measurements made with devices or tools require time, personnel and cost. In addition, sensors can not adapt to all hardware [9]. It is seen that only studies related to maintenance planning are carried out using mathematical and heuristic methods. Maintenance planning based on failure prediction is very low in studies. Almost all of these studies evaluated single equipment (Rails, Railway Line, Wheels and Rails, Bogie faults, Connectors, Trains, Infracture, Trains, Bearing, etc.).
Train equipment is a systems that works integrated with each other. Failure in one equipment can trigger a failure in other equipment (such as an electronic system). Therefore, it will be difficult to examine faults as a single equipment to determine the main source of the fault. In addition, evaluating all of the equipments of the system allows us to make more accurate maintenance planning.
In this study, unlike in the literature; 1-With real-life fault data that does not require an additional cost and resource usage is estimated.
2-All the train equipment in the study is used.
3-Factors affecting the faults are evaluated.

4-Maintenance planning based on prediction with ANN is implemented and improvement is achieved.
Nitti et al. [10] provided a visual inspection system for rail detection and tracking in railway maintenance. Thanks to the hardware application which is obtained at a speed of 190 km/h by performing at 5.71 μs with a sensitivity of 98.5% are presented. Yin and Zhao [11] proposed a mathematical model for diagnostics by analyzing the fault data collected on the Wuhan-Guangzhou high-speed train railway. The results showed that the fault diagnosis increased its accuracy to 90-95%. De Bruin et al. [12] diagnosed the rail line circuit measurement signals using repetitive neural networks. With this Network, they correctly classify 99.7% of the test input sequences. The LSTM network has given better results than another network trained in the same task. Shebani and Iwnicki [13] used the ANN method to estimate wheel and rail wear in dry, wet and oily conditions. The results showed that the ANN could be used efficiently to predict wheel and rail wear. Kaewunruen [14] presented the dynamic wheel/rail interaction affecting rail channels detected in rail maintenance. Zhao et al. [15] Based on the vibration data of the high-speed train, they proposed a deep neural network method for the systematic and correct detection of bogie faults. The results were compared with the results of various neural networks. The model used for diagnosis was repeated 10 times and the result showed that the deep neural network could approach a critical value at the highest speed. Gibert et al. [16] proposed the automatic part inspection using the computer's vision and pattern recognition methods to detect faults of fasteners with the help of multiple detectors. Tam et al. [17] demonstrated the optical fiber detection network-based railway condition monitoring system which can facilitate predictive maintenance on railways. Learning models that can be used to detect and identify different types of part defects such as machine learning, track grooves, weld joints, and rail transitions were developed.
Lidén and Joborn [18] proposed a mixed-integer programming model in the integrated rail network, aimed at a long-term solution to the maintenance problem. Luan et al. [19] proposed a mixed-integer linear programming model that simultaneously optimizes train routes, transit times and preventive maintenance times. They used the label correction algorithm, which minimizes the cost with Lagrange relaxation by separating it into sub-problems such as train planning and preventive maintenance planning. Su et al. [20] proposed a decision-making approach with data from the Eindhoven-Weert line in the Dutch rail network for optimum maintenance planning of the railway infrastructure. They turned the problem into a nonlinear continuous optimization problem with continuous and integer decision variables. They determined the optimal time intervals to optimize the installation cost of maintenance intervals. Baldi et al. [21] proposed a linear model for the deterministic subproblem with an heuristic approach to the Railway Maintenance Problem, and a heuristic method to solve the subproblem. Zhang et al. [22] proposed a mixed full linear programming (MILP) model to determine regular maintenance intervals for Beijing-Guangzhou highspeed railways in China and to minimize the total travel time of trains. Consilvio et al. [23] presented a stochastic model for planning predictive and risk-based maintenance activities in the railway sector. Peralta et al. [24] proposed a multi-purpose optimization approach that takes into account the deterioration caused by maintenance activities. It showed that the results were better in terms of time delay and economic cost. Xu et al. [25] aimed to optimize the advanced maintenance cycle. First, they used Queuing Theory to achieve an improved maintenance cycle which was optimized by determining the minimum value of the shaft. Finally, they prepared an appropriate maintenance plan according to the optimized maintenance cycle. Verbert et al. [26] proposed a twostep strategy for timely maintenance planning in multicomponent systems. Kaewunruen and Chiengson [27] presented a study examining the rail line inspection and maintenance prioritization effect caused by the combination of a rail connection. It was found that rail joint irregularities caused a decrease in some factors and some factors were associated with an increase in wheel/rail impact force. Sharma et al. [28] analyzed a 33month dataset containing several measurements for the control and maintenance of rail geometry. Compared to the current maintenance policy using the Markov chain Monte Carlo simulation, the recommended maintenance policy saved approximately 10% in total maintenance costs per kilometer. Macedo et al. [29] proposed a mixed integer programming model to plan a preventive maintenance activity on the railway infrastructure with limited infrastructure and low cost. Li d. [30] proposed a 0-1 integer programming model aimed at maximizing cumulative mileage and minimizing the number of train sets in Beijing, China. Yun et al. [31] proposed a genetic algorithm and annealing simulation algorithm to find the optimal preventive maintenance intervals and spare part numbers by estimating the system lifecycle cost by simulation. Lin et al. [32] proposed a new method for obtaining maintenance information through a neural network application of reliability modeling and condition-based predictive maintenance. By integrating traditional modeling techniques with the real-time online performance prediction model, they calculated machine reliability information such as hazard ratio and the average time between failures. Wu et al. [33] introduced a neural network-integrated decision support system for the Condition-based predictive maintenance policy. They proposed a decision support system based on an integrated neural network for predictive maintenance.
Contrary to the studies in the literature, this study is handled for the first time on rail systems based on 108 trains and equipment on a large scale and system basis in this work. At the same time, a maintenance plan that takes into account the entire system has been implemented with the estimated results obtained. The studies in the literature are summarized in the Table 1.  [11] On board Equipment ANN, DL Analyzing the fault diagnosis of train  X De bruin et al. [12] Railway Line RPNN Classify and Diagnose the fault  X Shebani ve Iwnicki [13] Wheels and Rails ANN Estimating wheel and rail wear  X Kaewunruen [14] Wheels and Rails M, S Estimating wheel and rail wear   Zhao et al. [15] Bogie faults DNN Diagnose faults of the bogie  X Gibert et al. [16] Connectors DL Detecting defects on rail fasteners  X Tam et al. [17] Rails ML Estimating wheel and rail wear  X Lidén and Joborn [18] Trains MILP Maintenance planning optimization X  Luan et al. [19] Infracture MILP, LR Min the deviation of arrival times from an ideal timetable X  Su et al. [20] Infracture TIO,CCO,NCO Infrastructure Maintenance planning optimization   Baldi et al. [21] Trains GA Maintenance planning optimization X  Zhang et al. [22] Trains MILP Min the total travel time of trains   Consilvio et al. [23] Trains SS Maintenance planning optimization   Peralta et al. [24] Railway Line GA, MOA Maintenance planning optimization   Xu et al. [25] Trains QT Optimizing advanced maintenance cycle   Verbert et al. [26] Railway Network POM profit by spreading or combining various maintenance activities   Kaewunruen and Chiengson [27] Wheels and Rails S Examining the effects of wheels and rail on railway line inspection and maintenance priorities   Sharma et al. [28] Wheels and Rails S, MDP Investigating the rail distortions and decide on parts maintenance   Macedo et al. [29] MILP Planning a preventive maintenance activity X 

MATERIAL and METHOD
The first ANN model established in the 1940s has started to develop significantly since the 1980s. The most important factor in this development is the generation of computer systems. ANN is a program that can transfer information by classifying information by modeling the biological brain structure of humans by computers and can generate new information. ANN is used in solving and predicting different and complex engineering problems. ANN is used in estimation and classification problems in many sectors such as military, health, energy, and industry [34]. ANN models can generally be divided into feedforward and feedback algorithms. The feedforward neural algorithm is transferred towards the output without feedback between the input and output layers. Feedback neural network reduces the difference errors between expected results [35]. The network must learn to provide consistent output from the inputs. There are hidden neurons between inputs and outputs. ANN layers are shown in Figure 1 [34].

Figure 1. A feedforward controlled ANN
An ANN model includes an input layer, hidden layer, and output layer, which can be modeled according to the problem type. It is the input layer where the input data is located and the data transmission to the ANN is provided. The hidden layer is the layer where the data transfers between the input and output layers are transmitted, the data is trained, and the user can adjust the number of nodes [35]. The main purpose of training the network is to minimize errors such as mean square error (MSE), average absolute percent error (MAPE) and root mean square error (RMSE) [36]. The first step in training the network is to randomly determine the weights of all neurons randomly. The weight levels change as the network is trained, and training ends when the optimum performance level is reached [35,36]. Unlike traditional simulation and mathematical models, the well-trained ANN model runs faster [36,38]. In this study, 5 factors that affect faults are determined as input and the number of faults is output. After the data has been normalized, 70% of the data is devoted to education and 30% to test data. In the ANN model, trainscg (scaled conjugate gradient) backpropagation algorithm, learngdm (momentum gradient descent) training function, MSE performance function, 15 neurons, and 1 hidden layer are used.

CASE STUDY
Maintenance activities are carried out in maintenance areas that require the allocation of trains in certain places.
Since each maintenance area is reserved for one train, only one train maintenance can be done in that area. As there is a limited area in this way, the maintenance of the trains is done according to a certain order and plan [5]. Many stochastic and deterministic methods related to maintenance planning have been used in the literature. Maintenance planning of trains contains uncertainties due to many interdependent factors affecting each other. Therefore, it is very difficult to determine appearance time of an equipment fault which forms the basis of maintenance planning. However, historical fault data allows us to predict possible equipment fault times. Thus, it guides us to make maintenance planning. Maintenance is applied according to equipment failures. Some factors cause the fault of the equipment. Factors that affect the occurrence of the faults can be counted as the type of equipment, the frequency of maintenance, line conditions, the life of the equipment and the quality of the material used in the equipment. Now, we explain the factors that affect equipment faults: • The type of equipment affects the number of faults. While some equipment malfunctions more frequently, some equipment malfunctions less.
• The more often the maintenance is done, the less likely the fault will come. • Trains are mostly electrical systems operating along a certain line. There may be fluctuations in the electric current at some times. The current change may increase the probability of equipment fault.
• Train equipment has a certain lifetime. This lifetime varies according to the type of the equipment. The risk of the fault of the equipment that is about to expire and the new equipment is different from each other. Equipment that is about to expire is more likely to fault.
• The equipment consists of parts or materials. The quality of the materials and parts used in the equipment affects the frequency of the fault. If the material or a part is of good quality, it reduces the possibility of fault.
In this study, the factors affecting the equipment faults mentioned above and the number of faults of each equipment in one week are estimated by using historical fault data and maintenance planning which is made according to the frequency of maintenance of the equipment determined with these forecast values. The proposed maintenance plan has been compared with the existing maintenance plan. The flow chart of the application is shown in Figure 2.

Current Maintenance Planning
There are two maintenance plans adopted in Metro Management and Maintenance Center: corrective maintenance and preventive maintenance. Corrective maintenance is the maintenance performed when the equipment malfunctions and the maintenance are not performed periodically. Preventative maintenance is the maintenance performed before the fault occurs. These two maintenance types are described in more detail below.

Corrective Maintenace
Corrective maintenance is carried out without planning when the equipment is a fault [36,39]. When a train fault occurs, the train is taken to the maintenance area and it is checked. When the source of the fault is found, the equipment is removed or the source of the fault is eliminated. Since the maintenance activities are carried out according to the equipment, this work is carried out on the types of equipments. Train faults are caused by 8 equipment and are shown in Table 2. When a fault occurs, the train is taken to the maintenance area and intervened. The fixing of train faults can vary from 1 day to 1 month. 3500-4000 faults are fixed annually. If a fault suddenly occurs in the train (breakdown, accident, derailment, etc.), it is intervened to trains in the mainline or warehouse area.

Preventive Maintenance
Preventive maintenance activities are planned maintenance strategies to reduce the probability of equipment faults. The preventive maintenance is carried out at specified days, hours, measurements or kilometers intervals. Thus, the costs associated with maintenance and downtimes are reduced, since the probability of the fault is reduced [40].
Trains are taken to the maintenance area for the planned maintenance activity. Controls are made for the equipment and if there are any faults, it is eliminated. If preventive maintenance is carried out regularly, it may extend the life of the equipment. Trains that come maintenance time are determined. The equipment which needs to make maintenance is determined according to the kilometers of the specified trains. The heavy maintenance of the trains, which are 600 thousand kilometers or more, is more comprehensive. Many equipments of the train are removed and made maintenance. The work flow chart of preventive maintenance is shown in Figure 3. Types of equipment that are made maintenance according to a kilometer are shown in Table 3.  In this study, the ANN model is operated with a trainscg backpropagation algorithm, 15 neurons, and 1 hidden layer, with 77 weekly data from 108 train. The network is trained after the data is normalized in ANN. In ANN training, learning function learngdm (momentum gradient descent), performance function MSE and best repetition value are obtained with 0.0028229 performance value in 845th repetition. The testing phase has started when the value of the trained network is over 90%. The MAPE error rate is found 11% in the testing phase and is accepted the error rate between 10% and 20% [41]. Then, the frequency of fault is determined according to the equipment type and maintenance planning applied. Factors affecting the train faults are described in below.

Type of Equipment:
There are 8 equipments in the ANN model and these are numbered from 1 to 8, respectively. These equipments are shown in Table 3. Indicates that the line is not maintained. Types of Equipment inputted in ANN Model shows in Table 4. An example of ANN data is shown above according to the factors given in Table 5. Since the week number is known, it is not given as an input to the model. After the data is separated as input and output, it is transferred to the MATLAB 2016a program. The data is normalized. Approximately 70% of normalized data is devoted to education and 30% to test data. ANN trainscg backpropagation algorithm is carried out with 15 neurons and 1 hidden layer. The ANN model is shown in Figure  4. Learngdm as learning function and MSE as performance function are determined. After the ANN has been trained, the training phase has been completed and the results are shown in Figure 5 since repetition 845 has the best value with 0.0028229 performance value.   [41]. Starting from January, maintenance planning has been carried out for about 10 weeks according to the type of equipment. Some of the prediction results by the ANN model are shown in Table 6.It is estimated how often (day/fault) the fault will come according to the type of equipment. Maintenance planning was created according to the number of faults. Frequency of maintenance and maintenance planning is recommended and implemented according to the type of equipment. The recommended maintenance frequency is shown in Table 7. Prediction values have been applied for approximately 10 weeks, according to the data specified in Table 7. As a result, maintenance planning based on fault prediction can reduce faults but it cannot completely eliminate the faults. The implemented and recommended maintenance plannings are compared and shown in Table 8. The uninterrupted service rate is given as a percentage of the trains operated here. After the ANN model is created according to 2017-2018 maintenance data, maintenance planning is made according to the forecast data of approximately for 10 weeks starting from January 2019. Current maintenance planning (maintenance data of January, February and March 2019) and recommended maintenance planning (maintenance data of January, February and March 2018) are compared by several factors. There has been a 27% reduction in the average number of faults of the trains. It has been observed that the uninterrupted service area has increased the rate of uninterrupted service by 40%, the number of passengers has increased by 5% and the energy consumption has been increased by 4%.

CONCLUSION AND RECOMMENDS
Train maintenance is done according to a specific plan. Some factors cause the fault of the equipment. The equipment is the basis of the train and maintenance. Therefore, calculating equipment downtime will allow the efficient use of the resources and reduced maintenance costs. In this study, the faults of the equipment that form the basis of train faults and the factors causing this fault have been analyzed. The ANN model, which give good results in such complex relationships, is created with trainscg (Scaled conjugate gradient) backpropagation algorithm, 15 neurons, and 1 hidden layer, with data from 108 trends of about 77 weeks. ANN data is normalized and trained. In the ANN model, learning function learngdm (momentum gradient descent), performance function MSE are determined. The best performance value is obtained in 0.0028229, 845th iteration. The value of the trained network is over 90% and test data is considered to be an 11% MAPE error rate since the error rate between 10% and 20% is acceptable [41]. The frequency of failure of the equipment has determined and maintenance planning has made based on this. The fact that the fault prediction is similar to the real-life fault data showed the feasibility of the model. It can be seen that the studies in the literature are generally done with a single piece of equipment. Maintenance planning based on a single equipment may not yield very effective results. Also, since such systems work with each other, studying the system as a whole will provide a more robust perspective for the future. With this study, it will be ensured that the fault can be predicted especially in the maintenance of operations, vehicles, and machinery that create time and costs. With the proposed maintenance planning, there has been a significant change in the average number of the faults and the availability of trains ready for service. According to the maintenance schedule, the future times of faults are estimated and the duration of the fault and the time spent in the maintenance area of the train are reduced. Longterm, annual forecast maintenance plans can be made in future studies and more effective results can be obtained.

DECLARATION OF ETHICAL STANDARDS
The authors of this article declare that the materials and methods used in their work do not require ethical committee permission and / or legal-specific permission.