1 Introduction

Railway is one of the leading and significant infrastructures in the current world and it is a complicated system which is mainly composed of the rolling stock, the locomotive, the railway lines, the communication and the signaling, the power supply, the passenger and wagon transportation, the railway safety, etc. Recently, the big data technology can be widely and successfully applied in the intelligent railway [1,2,3], while big data analytic on railway safety [4, 5] is the hot and important topic in the fields of the intelligent railway. Currently, the railway safety analysis is mainly based on the qualitative analysis and it is difficult to assess the safety level on the existing problem from the viewpoint of quantitative analysis. Roughly speaking, the railway safety is closely related to the safety risk source, the undiscovered hidden danger, the accident, the equipment warning, the equipment fault, the safety worker and the train operation environment, etc. The objective of railway safety management is to assess the safety status on the railway safety problem, the railway equipment and the railway worker, while the corresponding controlled strategy is utilized to manage the existing safety problem with high hazard degree and solve the corresponding problem as soon as possible. More importantly, it is key to avoid the equipment fault and the railway accident in the railway bureau.

Nowadays, a larger number of researchers and engineers investigate the railway risk, the safety assessment and the fault diagnosis in intelligent railway, etc. Liu [6] introduces some concepts on railway safety and utilizes the PSO algorithm to handle with the optimal speed optimization problem on high-speed train under several safety risks and hidden danger points. To improve the efficiency on safety management and discover the factor on railway accident, the NLP technology is utilized to analyze the American railway accidents from 2001 to 2012 [7]. Additionally, the ES technology and the NLP technology are also used to analyze the railway accident report [8]. Considering the human and equipment factors, the accidents in the railway are mainly analyzed by the fault tree analysis method [9]. Furthermore, there are several existing important works on the railway engineering risk [10], risk assessment model [11] and fault diagnosis [12].

For the sake of improving the safety management efficiency and controlling key safety problems, it is important to study the safety assessment model on the railway safety problem, the railway equipment and the railway worker, etc. Generally speaking, the railway safety experts roughly provide the assessment rule on the safety problem, however, the parameters in the assessment model are difficulty selected by the safety experts. Therefore, in order to solve this problem, the parameter selection problem can be considered as the continuous optimization problem with some constraints, while this problem can be fully solved by the swarm optimization method.

To handle with the optimization problem, there are several swarm optimization algorithms including genetic algorithm (GA) [13,14,15,16,17], particle swarm optimization (PSO) [18, 19], differential evolution (DE) [20], artificial bee colony (ABC) [21], ant colony optimization(ACO) [22]. Particle swam optimization algorithm is one of high efficiency and nature-inspired algorithms. In 1995, Eberhart and Kennedy [18, 19] firstly develop this swarm optimization algorithm. On the one hand, there are some important results on the convergence speed and the convergence condition under the constant transfer matrix [23,24,25] and the time-varying transfer matrix [26,27,28,29]. On the another hand, the PSO algorithm is widely utilized in several applications which are composed of resource allocation problem [30], optimal cloud storage problem [31, 32], urban public transport [33] and feature selection [34]. And the PSO algorithm can successfully solve the typical optimization problems [35,36,37]. Therefore, the PSO algorithm has good performance on the continuous optimization problem, then this parameter optimization problem on safety assessment model is mainly solved by the particle swarm optimization algorithm.

To obtain the suitable parameters in the safety assessment model, the objective of this paper is to utilize the PSO algorithm with bound and time-varying attractor to optimize key parameters which are composed of the thresholds in the railway safety assessment model. Main contributions on parameter optimization problem by PSO algorithm can be summarized as follows.

  • Some concepts on railway safety problem are briefly introduced to deeply understand key parameter optimization problem in the safety assessment model.

  • The safety assessment is mainly related to the existing safety problem, the railway equipment and the railway worker, and so on.

  • Some objective functions and the constraints on the railway assessment model optimization problem are also introduced.

  • It is important to analyze the convergence condition and the spectral radius on transfer matrix in PSO algorithm with bounds and time-varying attractor.

  • Key parameters in the safety assessment model are optimized by the particle swarm optimization algorithm with bounds and time-varying attractor.

  • The PSO algorithm can provide the obtained results and search for the suitable parameter in two realistic scenarios.

The organization of this paper is given as follows. Section 2 briefly introduces some basic concepts on the existing safety problems. Section 3 provides the safety assessment and the corresponding factors. Section 4 gives the objective function and the constraint on the safety assessment model. Section 5 introduces some main steps and convergence analysis on the particle swarm optimization algorithm with bounds to solve key parameter optimization problem. Section 6 shows that the PSO algorithm with bounds and time-varying attractor can optimize key parameters in the safety assessment model with few computational time. Section 7 concludes some important obtained results and some interesting future works.

2 Basic Concepts on Railway Safety

2.1 Safety Management Problem

The safety management problems are mainly composed of the railway risk R, the discovered railway hidden danger H, the railway accident A. The corresponding relationship among R, H and A is depicted in Fig. 1.

Definition 1

Railway risk point is the initial status on the existing safety problems and the accident, and it is mainly classified as the serious risk, the large risk, the general risk and the low risk. R is the railway risk set which includes the railway risk points, and R can be mathematically described by

$$\begin{aligned} R=\{r_{1}, r_{2}, r_{3},\dots , r_{n_{r}} \} \end{aligned}$$
(1)

where \(n_{r}\) is the number of the existing risk points in the railway department.

Definition 2

The railway hidden danger is the middle status between the risk source and the accident, and it is chiefly classified as the serious hidden danger and the general hidden danger. H is the existing railway hidden danger set, which includes \(n_{h}\) railway hidden dangers.

$$\begin{aligned} H=\{h_{1}, h_{2}, h_{3},\dots , h_{n_{h}} \} \end{aligned}$$
(2)

where \(n_{h}\) is the number of the existing hidden dangers in the railway department.

Definition 3

The railway accident is the result from the risk source and the hidden danger. Railway accident is mainly classified by A accident, B accident, C accident and D accident. The railway accident and fault set A is

$$\begin{aligned} A=\{a_{1}, a_{2}, a_{3},\dots , a_{n_{a}} \} \end{aligned}$$
(3)

where \(n_{a}\) is the number of the existing accidents and faults in railway.

Fig. 1
figure 1

The relationship among R, H and A in railway safety. If the railway risk source is not controlled by railway manager and worker, the risk source in R is transformed into the hidden danger in H. If the hidden danger in H is not discovered and solved by the railway manager and worker, the hidden danger in H is transformed into the accident in A

2.2 Key Safety Equipments

The railway equipment mainly consists of the railway line equipment L, the signal and communication device G, the overline contact B, the locomotive D and the EMU E, etc.

Definition 4

In railway, the line equipment is composed of the track, the bridge and the tunnel, etc. L is the railway line equipment set, which can be mathematically defined as

$$\begin{aligned} L=\{l_{1}, l_{2}, l_{3},\dots , l_{n_{l}} \} \end{aligned}$$
(4)

where \(n_{l}\) is the number of the line equipment units in railway department.

Definition 5

The signal and communication device set G can be mathematically defined as

$$\begin{aligned} G=\{g_{1}, g_{2}, g_{3},\dots , g_{n_{g}} \} \end{aligned}$$
(5)

where \(n_{g}\) is the number of the signal and communication devices.

Definition 6

The overline contact set B can be mathematically defined as

$$\begin{aligned} B=\{b_{1}, b_{2}, b_{3},\dots , b_{n_{b}} \} \end{aligned}$$
(6)

where \(n_{b}\) is the number of the overline contact equipments.

Definition 7

The locomotive set D can be mathematically defined as

$$\begin{aligned} D=\{d_{1}, d_{2}, d_{3},\dots , d_{n_{d}} \} \end{aligned}$$
(7)

where \(n_{d}\) is the number of the railway locomotives.

Definition 8

The EMU set E can be mathematically defined as

$$\begin{aligned} E=\{e_{1}, e_{2}, e_{3},\dots , e_{n_{e}} \} \end{aligned}$$
(8)

where \(n_{e}\) is the number of the railway EMUs.

2.3 Key Safety Workers

Definition 9

The railway worker set W can be mathematically defined as

$$\begin{aligned} W=\{w_{1}, w_{2}, w_{3},\dots , w_{n_{w}} \} \end{aligned}$$
(9)

where the number \(n_{w}\) is the number of railway managers and workers.

2.4 Railway Safety Space

The railway safety space S can be defined as

$$\begin{aligned} \mathcal {S}=\{R,H,A,L,G,B,D,E,W\}. \end{aligned}$$
(10)

The number n in the existing railway safety problems is

$$\begin{aligned} n=n_{r}+n_{h}+n_{a}+n_{l}+n_{g}+n_{b}+n_{d}+n_{e}+n_{w}. \end{aligned}$$
(11)

Additionally, the safety status \(\mathcal {S}(t)\) is chiefly determined by the existing safety problems, the railway equipments and the railway workers. And the safety state \(\mathcal {S}(t)\) at tth step is

$$\begin{aligned} \mathcal {S}(t)= & {} \{R(t),H(t),A(t),L(t),G(t),B(t),\nonumber \\ {}{} & {} D(t),E(t),W(t)\}. \end{aligned}$$
(12)

To evaluate the assessment hazard on \(\mathcal {S}(t)\), the objective function on calculating \(\mathcal {S}(t)\) can be defined as

$$\begin{aligned} y=f(\mathcal {S}(t))=\left\{ \begin{array}{cc} \text {Serious}\\ \text {High}\\ \text {Median}\\ \text {Low}\\ \end{array} \right. \end{aligned}$$
(13)

where \(f(\cdot )\), which denotes the safety hazard degree on the status \(\mathcal {S}(t)\), is the nonlinear function mapping from the status \(\mathcal {S}(t)\) to the safety classification level.

3 Some Factors in Railway Safety Assessment

To achieve the precise safety management, it is important to analyze the related factors on the safety problem, the railway equipment and the railway worker.

3.1 Safety Assessment on the Existing Problem

Safety problem mainly consists of the risk source, the hidden danger, the accident and the supervision problem, etc. In order to assess the existing safety problem, the assessment on the existing safety problem is mainly referred as hazard degree, occurrence frequency, coordination difficulty and the problem-solving time, etc.

$$\begin{aligned} f_{1}(x)=\{f_{11}(x),f_{12}(x),f_{13}(x),f_{14}(x)\}. \end{aligned}$$
(14)

3.1.1 Hazard Degree

The hazard degree on the existing safety problem mainly determines the safety level in the realistic scenario. And the hazard degree mainly influences the safety assessment on the existing problem. It is important to control and solve the existing safety problem with high level as soon as possible.

3.1.2 Occurrence Frequency

The occurrence frequency denotes the occurrence number on the problems in each week or month. It is key to solve and manage the safety problem with high occurrence frequency and the safety managers pay more attention to the safety problem with high occurrence frequency.

Fig. 2
figure 2

Safety assessment model on key railway equipment

3.1.3 Coordination Difficulty

To solve the complicated and realistic problem, it is necessary to organize several railway departments or different workers to solve this problem. The coordination difficulty denotes the problem-solving difficulty among the related departments. The safety problem related to some railway departments is relatively difficult, while the safety problem related to few railway departments is relatively easy.

3.1.4 The Problem-solving Time

The problem-solving time is the time between \(T_{1}\) and \(T_{2}\), while \(T_{1}\) denotes the time on discovering the existing problem and \(T_{2}\) denotes the time on solving the existing problem.

3.2 Safety Assessment on Key Railway Equipment

The safety assessment on railway equipment is mainly referred to as the railway line, the signal and communication device, the overline contact, the locomotive and the EMU, etc. As depicted in Fig. 2, the safety assessment on railway equipment is mainly composed of the basic information, the equipment warning, the equipment fault, the hidden danger and the supervision problem on the equipment, etc.

$$\begin{aligned} f_{2}(x)=\{f_{21}(x),f_{22}(x),f_{23}(x),f_{24}(x),f_{25}(x)\}. \end{aligned}$$
(15)

3.2.1 Basic Information

The basic information on railway equipment is mainly composed of the name, the type, the production corporation, the material and the working age.

3.2.2 Warning Data

The equipment warning data mainly determines the safety realistic status on the railway equipment and it is generally classified by the first level warning, the second level warning, the third level warning and the fourth level warning. The equipment warning possibly results in the equipment fault. To avoid the railway accident, it is necessary to manage and solve the warning problem with high safety level as soon as possible.

3.2.3 Fault Data

The unsolved equipment fault, which possibly transforms into the railway accident and is mainly classified by different safety levels, mainly determines the safety assessment score on railway equipment. More importantly, it is key to solve the fault on railway equipment as soon as possible.

3.2.4 Hidden Danger

Hidden danger, which is one of the existing safety problems in railway, is mainly discovered by the railway manage and worker. The hidden danger on railway equipment also plays a role on the safety equipment assessment. The level of hidden danger and the problem-solving time on hidden danger mainly determine the safety assessment score.

3.2.5 Supervision Problem

Supervision problem is mainly discovered by the safety managers and supervisors in the railway. Therefore, the railway assessment on railway equipment is closely related to the supervision safety problem on the corresponding equipment.

3.3 Safety Assessment on Key Railway Worker

Railway human factor is also an important safety factor in the area of railway safety management. As depicted in Fig. 3, the safety assessment on railway worker is related to basic information, safety punishment, safety reward, safety training and safety examination, etc. The corresponding safety assessment model is

$$\begin{aligned} f_{3}(x)=\{f_{31}(x),f_{32}(x),f_{33}(x),f_{34}(x),f_{35}(x)\}. \end{aligned}$$
(16)
Fig. 3
figure 3

Safety assessment model on railway worker

3.3.1 Basic Information

Basic information on railway worker is closely related to the name, the department, the working age, the major and the professional skill, etc.

3.3.2 Safety Punishment

In order to effectively assess the safety status on railway worker, it is important to calculate the safety score according to safety punishment data in the period time. Since the safety punishment is mainly classified by the red safety problem, the yellow safety problem and the green safety problem, the safety score on railway worker is mainly calculated by the number of problems and the level of the corresponding safety problem.

3.3.3 Safety Reward

Safety reward is one of the safety assessments on railway workers and it helps the railway worker to increase the safety assessment score. The safety reward is mainly classified as the first reward, the second reward and the third reward.

3.3.4 Safety Training

Safety training helps the railway worker to improve the professional skill and the safety ability. For each railway worker, it is necessary to train and acquire the safety ability.

3.3.5 Safety Examination

Safety examination is one of the testing safety examinations on the professional skill and the safety ability. The railway worker passes the safety examination in the period time.

4 The Mathematical Model on Railway Safety Assessment

In the realistic railway safety management, it is key to precisely manage and control the key safety equipment and worker in the railway. In one aspect, the equipment safety score is mainly calculated according to the basic data, the equipment warning data, the equipment fault warning, the hidden danger, the supervision problem and the accident, etc. In another aspect, the worker safety score is chiefly computed by the safety punishment, the safety reward, the safety training and the safety examination, etc. On the basis of the safety rule, the safety level on equipment and worker is also calculated by the whole score and the corresponding threshold. In fact, it is necessary and important to adjust the threshold in the safety assessment model according to the closed-loop safety management data. From the viewpoint of optimization, the problem in this paper can be mainly considered as the nonlinear continuous optimization problem with constraints.

4.1 Safety Assessment Model with One Input

The safety assessment model with one input F(x) can be described by

$$\begin{aligned} F(x)=\left\{ \begin{array}{cc} \text {Serious} &{} \hspace{2ex} f_{1}(x)\le \eta _{1}\\ \text {High} &{} \hspace{2ex} \eta _{1}< f_{1}(x)\le \eta _{2}\\ \text {Median} &{} \hspace{2ex} \eta _{2}< f_{1}(x)\le \eta _{3}\\ \text {Low} &{} \hspace{2ex} f_{1}(x)>\eta _{3}\\ \end{array} \right. \end{aligned}$$
(17)

where \(f_{1}(x)\) denotes the safety assessment score on the assessment score. \(\eta _{1}\), \(\eta _{2}\) and \(\eta _{3}\) is the threshold on f(x) in the safety assessment model. Therefore, it is necessary to optimize the parameters including \(\eta _{1}\), \(\eta _{2}\) and \(\eta _{3}\).

4.2 Safety Assessment Model with Two Inputs

The corresponding safety assessment model with two inputs can be mathematically defined as

$$\begin{aligned} F(x)=\left\{ \begin{array}{cc} \text {Serious} &{} \hspace{2ex} f_{1}(x)\le \theta _{1}\\ \text {Serious} &{} \hspace{2ex} f_{2}(x)\le \theta _{2}\\ \text {Serious} &{} \hspace{2ex} \sum _{i=1}^{2}\alpha _{i}f_{i}(x)\le \eta _{1}\\ \text {High} &{} \hspace{2ex} \eta _{1}< \sum _{i=1}^{2}\alpha _{i}f_{i}(x)\le \eta _{2}\\ \text {Median} &{} \hspace{2ex} \eta _{2}< \sum _{i=1}^{2}\alpha _{i}f_{i}(x)\le \eta _{3}\\ \text {Low} &{} \hspace{2ex} \sum _{i=1}^{2}\alpha _{i}f_{i}(x)>\eta _{3}\\ \end{array} \right. \end{aligned}$$
(18)

where \(\alpha _{i}\) denotes the weight on safety score and \(\theta _{i}\) denotes the ith threshold on \(f_{i}(x)\) in the assessment model. It is necessary to optimize \(\theta _{1}\), \(\theta _{2}\), \(\eta _{1}\), \(\eta _{2}\) and \(\eta _{3}\) in the safety assessment model.

4.3 Safety Assessment Model with k Inputs

In the realistic safety management, it is necessary to study the level on the existing safety problem, while the safety problem with different levels has different safety management strategies. The classification rule on the safety problem is concluded as follows. The objective function F(x) on safety assessment model can be mathematically described by

$$\begin{aligned} F(x)=\left\{ \begin{array}{cc} \text {Serious} &{} \hspace{2ex} f_{1}(x)\le \theta _{1} \\ \text {Serious} &{} \hspace{2ex} f_{2}(x)\le \theta _{2} \\ \text {Serious} &{} \hspace{2ex} \cdots \\ \text {Serious} &{} \hspace{2ex} f_{i}(x)\le \theta _{i}\\ \text {Serious} &{} \hspace{2ex} \cdots \\ \text {Serious} &{} \hspace{2ex} f_{k}(x)\le \theta _{k}\\ \text {Serious} &{} \hspace{2ex} \sum _{i=1}^{n}\alpha _{i}f_{i}(x)\le \eta _{1}\\ \text {High} &{} \hspace{2ex} \eta _{1}< \sum _{i=1}^{n}\alpha _{i}f_{i}(x)\le \eta _{2}\\ \text {Median} &{} \hspace{2ex} \eta _{2}< \sum _{i=1}^{n}\alpha _{i}f_{i}(x)\le \eta _{3}\\ \text {Low} &{} \hspace{2ex} \sum _{i=1}^{n}\alpha _{i}f_{i}(x)>\eta _{3}\\ \end{array} \right. \end{aligned}$$
(19)

where k is the number of the safety assessment items. \(\theta _{1}\) denotes the railway warning threshold on \(f_{1}(x)\) function and \(\theta _{2}\) denotes the railway warning threshold on \(f_{2}(x)\) function, while \(\theta _{k}\) denotes the railway warning threshold on \(f_{k}(x)\) function. Additionally, the parameter \(\eta _{1}\) is the smallest threshold on the whole safety score, while the parameter \(\eta _{2}\) is the middle threshold on \(\sum _{i=1}^{n}\alpha _{i}f_{i}(x)\). Additionally, the parameter \(\eta _{3}\) is the largest threshold on \(\sum _{i=1}^{n}\alpha _{i}f_{i}(x)\). It is necessary to utilize the PSO algorithm to optimize \(\theta _{1}\), \(\theta _{2}\), \(\cdots \), \(\theta _{k}\), \(\eta _{1}\), \(\eta _{2}\) and \(\eta _{3}\) in the safety assessment model.

According to (19), the complicated model on railway safety assessment is depicted in Fig. 4.

Fig. 4
figure 4

Railway safety assessment model by decision tree on the existing problem, equipment and worker, where f(x) is equal to \(\sum _{i=1}^{n}\alpha _{i}f_{i}(x)\)

Then the objective function on safety parameter optimization problem can be mathematically defined as

$$\begin{aligned} \min \sum _{i=1}^{n}(F(x)-F^{'}(x))^{2} \end{aligned}$$
(20)

where \(F^{'}(x)\) denotes the classification level of the ith safety assessment unit.

The objective of key parameter optimization problem is to search for the parameters which are mainly composed of \(\theta _{1}\), \(\theta _{2}\), \(\theta _{3}\), \(\cdots \), \(\theta _{i}\), \(\cdots \), \(\theta _{k}\), \(\eta _{1}\), \(\eta _{2}\) and \(\eta _{3}\), etc. Therefore, the parameter optimization problem on railway safety assessment can be described by

$$\begin{aligned} \arg \min _{\theta _{1}, \cdots , \theta _{k},\eta _{1}, \eta _{2}, \eta _{3}} \sum _{i=1}^{n}(F(x)-F^{'}(x))^{2}. \end{aligned}$$
(21)

The first constraint condition can be mathematically described by

$$\begin{aligned} \theta _{min}<\theta _{i}<\theta _{max} \end{aligned}$$
(22)

where \(\theta _{min}\) and \(\theta _{max}\) denote the minimum and the maximum on the threshold \(\theta \), respectively.

The second constraint condition can be mathematically described by

$$\begin{aligned} \eta _{min}<\eta _{i}<\eta _{max} \end{aligned}$$
(23)

where \(\eta _{min}\) and \(\eta _{max}\) denote the minimum and the maximum of the parameter \(\eta \), respectively.

The third constraint condition can be mathematically expressed by

$$\begin{aligned} \eta _{i}\le \eta _{i+1}. \end{aligned}$$
(24)

According to the objective function and some constraints, the parameter optimization problem on railway safety assessment is one of the continuous optimization problems with some constraints.

5 The Optimization Algorithm

5.1 Cloud Optimization Algorithm

Currently, the nature-inspired optimization algorithms are mainly composed of genetic algorithm, particle swarm optimization algorithm, ant colony optimization algorithm, and so on. The advantage of those nature-inspired optimization methods is to has good optimization performance and find suitable solution in the whole search space, however, the disadvantage of the above-mentioned optimization methods is to cost the computational time since each algorithm has some agents and the random factor in the evolutionary process. In order to reduce the large computational time, it needs to parallelly execute the nature-inspired algorithm by many virtual machines in one data center or several data centers. Therefore, the cloud optimization algorithm which is mainly depicted in Fig. 5 consists of several PSO algorithms in several data centers.

Fig. 5
figure 5

Cloud optimization algorithm includes several PSO algorithms in the data centers

To reduce the computational time of PSO algorithm, the PSO algorithm is parallelly executed in each virtual machine or each GPU in data center. Firstly, the PSO algorithm is executed in the virtual machines and those algorithms exchange the best position among all particles. In the virtual machine or GPU, the best position is exchanged by the best position in the virtual machine. In the data centers, the best position is exchanged according to IP address. Secondly, the best position is shared to several PSO algorithms in different data centers and the topology of the swam is mainly determined by the topology of data centers. And the communication bag including the best position possibly losses in the Internet, so it is key to consider the delay time in cloud optimization algorithm among data centers.

5.2 PSO Algorithm

Generally speaking, particle swarm optimization algorithm is one of the nature-inspired optimization algorithms and efficiently solves many realistic optimization problems including the continuous and discrete optimization problem, the multiple objective optimization problem, etc. The PSO algorithm has the good optimization performance in the field of evolutionary computation and swarm optimization algorithms. Firstly, the PSO algorithm is composed of several particles and each particle parallelly searches for the good solution in the whole solution space, so the optimization performance is generally better than that of the gradient optimization algorithm. Secondly, the computational time of PSO algorithm is relatively large since the PSO algorithm includes many particles and the trajectory of each particle has the convergence behavior and the divergence behavior. Thirdly, the PSO algorithm has the exploration ability in the early search stage and has the covergence behavior in the latter search stage. Finally, the PSO algorithm has the ability of solving the multiple objectives optimization problem and the constraint optimization problem.

In the PSO algorithm, \(\omega (t)\) is the inertia weight in the whole evolutionary process, while \(c_{1}\) and \(c_{2}\) are the acceleration coefficients. \(r_{1}^{'}\) and \(r_{2}^{'}\) is the random value between 0 and 1. \(P_{ij}(t)\) is the personal best position and \(G_{ij}(t)\) is the swarm best position in the whole evolutionary process. The velocity \(v_{ij}(t+1)\) and the position \(x_{ij}(t+1)\) at \(t+1\)th step in the PSO algorithm can be mainly formulated as

$$\begin{aligned} v_{ij}(t+1)= & {} \omega (t)v_{ij}(t)+c_{1}r_{1}^{'}(P_{ij}(t)-x_{ij}(t))\nonumber \\{} & {} +c_{2}r_{2}^{'}(G_{ij}(t)-x_{ij}(t)) \end{aligned}$$
(25)
$$\begin{aligned} x_{ij}(t+1)= & {} v_{ij}(t+1)+x_{ij}(t). \end{aligned}$$
(26)

Due to the communication loss and the delay in the Internet, it is necessary to consider the communication loss factor and delay factor in cloud optimization.

$$\begin{aligned} v_{ij}(t+1)= & {} \omega (t)v_{ij}(t)+c_{1}r_{1}^{'}(P_{ij}(t)-x_{ij}(t))\nonumber \\{} & {} +c_{2}r_{2}^{'}(G_{ij}(t-t_{d})-x_{ij}(t)) \end{aligned}$$
(27)
$$\begin{aligned} x_{ij}(t+1)= & {} v_{ij}(t+1)+x_{ij}(t) \end{aligned}$$
(28)

where \(t_{d}\) is the communication delay time between two data centers.

Additionally, in order to solve the key parameter optimization problem, the main steps on PSO algorithm with bounds and time-varying attractor are concluded as follows.

Step 1: The parameters in the safety assessment model and the PSO algorithm are set as follows. Firstly, it is necessary to initialize the number of particles, the maximum number of generations \(T_{max}\), the inertia weight \(\omega \), \(c_{1}\) and \(c_{2}\), etc. The particle’s velocity and position are set by the random value between the minimum value and the maximum value, respectively. Secondly, the number of safety assessment equipments or workers is set to \(N^{'}\) and the dimension of safety assessment is set to m, while the ith weight on each safety assessment item is set to \(\alpha _{i}\).

Step 2: Calculate the objective fitness according to (21). The ith best position in (29) at \(t+1\)th step is computed by

$$\begin{aligned} P_{i}(t+1)=\left\{ \begin{array}{cc} X_i(t) &{} \hspace{2ex} \text {if }\hspace{1ex} f(X_i(t))<f(P_i(t))\\ P_i(t) &{} \hspace{2ex} \text {if }\hspace{1ex} f(X_i(t))\ge f(P_i(t)).\\ \end{array} \right. \end{aligned}$$
(29)

The best position of all particles in (30) at \(t+1\)th step is computed by

$$\begin{aligned} \begin{aligned} G(t+1)=\arg \min \{{f(G_{1}(t+1)),\cdots ,f(G_{N}(t+1))}\}. \end{aligned} \end{aligned}$$
(30)

Step 3: \(v_{ij}(t+1)\) and \(x_{ij}(t+1)\) at \(t+1\)th step can be mathematically calculated by (31) and (32).

$$\begin{aligned} v_{ij}(t+1)= & {} \omega (t) v_{ij}(t)+c_{1}r_{1}^{'}(P_{ij}(t)-x_{ij}(t))\nonumber \\{} & {} +c_{2}r_{2}^{'}(G_{ij}(t)-x_{ij}(t)) \end{aligned}$$
(31)
$$\begin{aligned} x_{ij}(t+1)= & {} x_{ij}(t)+v_{ij}(t+1). \end{aligned}$$
(32)

Step 4: When \(v_{ij}(t)\) is larger than the maximum value or smaller than the minimum value, the current velocity value \(v_{ij}(t)\) is

$$\begin{aligned} v_{ij}(t)= & {} V_{max}\times (1-0.2\times r_{3}^{'}) \ \ \ v_{ij}(t)>V_{max} \end{aligned}$$
(33)
$$\begin{aligned} v_{ij}(t)= & {} V_{min}\times (1-0.2\times r_{4}^{'}) \ \ \ v_{ij}(t)<V_{min} \end{aligned}$$
(34)

where \(r_{3}^{'}\) and \(r_{4}^{'}\) are the random value between 0 and 1. \(V_{max}\) and \(V_{min}\) are the maximum velocity and the minimum velocity, respectively.

Furthermore, \(x_{ij}(t)\) is also reinitialized by

$$\begin{aligned} x_{ij}(t)= & {} X_{max}\times (1-0.2\times r_{5}^{'}) \ \ \ x_{ij}(t)>X_{max} \end{aligned}$$
(35)
$$\begin{aligned} x_{ij}(t)= & {} X_{max}\times 0.2\times r_{6}^{'} \ \ \ x_{ij}(t)<X_{min} \end{aligned}$$
(36)

where \(r_{5}^{'}\) and \(r_{6}^{'}\) are the random value between 0 and 1. \(X_{max}\) and \(X_{min}\) are the maximum position and the minimum position, respectively.

Step 5:If the current number of generations t is larger than the maximum number of generations \(T_{max}\), the PSO algorithm with bounds and time-varying attractor is stopped. If the current number of generations t is smaller than \(T_{max}\), the code of the PSO algorithm goes to step 2.

In the PSO algorithm with bounds and time-varying attractor, the computational time of all particles is closely related to the number of all particles, the number of generations, \(\omega \), \(c_{1}\), \(c_{2}\), the landscape of objective function, etc. In each evolutionary step, it is necessary to calculate the objective function according to the railway safety model. In order to reduce the computational time, the parallel technology can be utilized on the PSO algorithm. In summary, the large value of the parameters in the PSO algorithm with bounds and time-varying attractor leads to the large computational time, while the small value of those parameters leads to the small computational time.

5.3 Convergence Analysis on PSO Algorithm with Bounds and Time-varying Attractor

In the case of the Eqs. (33) and (34), the resetting operation on \(v_{ij}(t+1)\) can be considered as \(\triangle v\), and the Eq. (31) can be rewritten as

$$\begin{aligned} v_{ij}(t+1)= & {} \omega v_{ij}(t)+c_{1}r_{1j}^{'}(P_{i}(t)-x_{ij}(t))\nonumber \\{} & {} + c_{2}r_{2j}^{'}(G(t)-x_{ij}(t))+\triangle v_{ij}(t). \end{aligned}$$
(37)

where \(\triangle v_{ij}(t)\) is

$$\begin{aligned} \triangle v_{ij}(t)=\left\{ \begin{array}{cc} 0 &{} v_{min}\le v_{ij}(t)\le v_{max}\\ \beta v_{ij}(t) &{} otherwise. \end{array} \right. \end{aligned}$$
(38)

So the velocity Eq. (37) in PSO algorithm is

$$\begin{aligned} v_{ij}(t+1){} & {} =(\omega +\beta ) v_{ij}(t)+c_{1}r_{1j}^{'}(P_{i}(t)-x_{ij}(t))\nonumber \\{} & {} \quad +c_{2}r_{2j}^{'}(G(t)-x_{ij}(t)). \end{aligned}$$
(39)

With respect to the equations including (35) and (36), the resetting operation on \(x_{ij}(t+1)\) can be considered as \(\triangle x\), and the position (32) can be mathematically rewritten as

$$\begin{aligned} x_{ij}(t+1)=x_{ij}(t)+v_{ij}(t+1)+\triangle x_{ij}(t). \end{aligned}$$
(40)

where \(\triangle x_{ij}(t)\) is

$$\begin{aligned} \triangle x_{ij}(t)=\left\{ \begin{array}{cc} 0 &{} x_{min}\le x_{ij}(t)\le x_{max}\\ \gamma v_{ij}(t+1) &{} otherwise. \end{array} \right. \end{aligned}$$
(41)

Assume that \(\triangle x=\gamma v_{ij}(t+1)\), the position Eq. (40) in PSO algorithm can be also rewritten as

$$\begin{aligned} x_{ij}(t+1)=x_{ij}(t)+(1+\gamma )v_{ij}(t+1). \end{aligned}$$
(42)

To simplify the Eq. (39), we assume

$$\begin{aligned} Q(t)=\frac{\phi _{1}P(t)+\phi _{2}G(t)}{\phi _{1}+\phi _{2}}=\frac{\phi _{1}P(t)+\phi _{2}G(t)}{\phi } \end{aligned}$$
(43)

where \(\phi _{1}\) is equal to \(c_{1}r_{1}^{'}\) and \(\phi _{2}\) is equal to \(c_{2}r_{2}^{'}\). Additionally, \(\phi \) is equal to \(c_{1}r_{1}^{'}+c_{2}r_{2}^{'}\).

According to (43), the Eq. (39) can be rewritten as

$$\begin{aligned} v(t+1)=(\omega +\beta )v(t)+\phi (Q(t)-x(t)). \end{aligned}$$
(44)

On the basis of (42) and (44), we can get

$$\begin{aligned} x(t+1){} & {} =x(t)+(1+\gamma )(\omega +\beta )v(t)+(1+\gamma )\nonumber \\{} & {} \quad \phi (Q(t)-x(t)). \end{aligned}$$
(45)

The Eq. (45) is

$$\begin{aligned} Q(t+1){} & {} -x(t+1)=Q(t+1)-Q(t)+Q(t)-x(t)\nonumber \\{} & {} {-}(1{+}\gamma )(\omega {+}\beta )v(t){-}(1+\gamma )\phi (Q(t)-x(t)).\nonumber \\ \end{aligned}$$
(46)

Assume \(y(t)=Q(t)-x(t)\) and \(Q(t+1)-Q(t)=\kappa v(t)\), the Eq. (46) can be mathematically described by

$$\begin{aligned} y(t+1){=}(\kappa {-}(1{+}\gamma )(\omega {+}\beta ))v(t){+}(1{-}(1{+}\gamma )\phi ) y(t).\nonumber \\ \end{aligned}$$
(47)

On the basis of the Eq. (44), we can obtain

$$\begin{aligned} v(t+1)=(\omega +\beta )v(t)+\phi y(t). \end{aligned}$$
(48)

According to (48) and (47), the corresponding equations on PSO algorithm with bounds and time-varying attractor can be expressed by

$$\begin{aligned} \left[ \begin{array}{c} v(t+1)\\ y(t+1) \end{array} \right]= & {} \left[ \begin{array}{cc} \omega +\beta &{} \phi \\ \kappa -(1+\gamma )(\omega +\beta )&{} 1-(1+\gamma )\phi \end{array} \right] \nonumber \\{} & {} \left[ \begin{array}{c} v(t)\\ y(t) \end{array} \right] . \end{aligned}$$
(49)

So the Eq. (49) can be mathematically rewritten as

$$\begin{aligned} \left[ \begin{array}{c} v(t+1)\\ y(t+1) \end{array} \right] =M(t) \left[ \begin{array}{c} v(t)\\ y(t) \end{array} \right] \end{aligned}$$
(50)

The eigenvalues of matrix M are mathematically calculated by

$$\begin{aligned} \lambda _{1}=\frac{\omega +\beta -\phi -\phi \gamma +1+\sqrt{(\omega +\beta -\phi -\phi \gamma +1)^2-4\beta -4\omega +4\phi \kappa }}{2} \end{aligned}$$
(51)

and

$$\begin{aligned} \lambda _{2}=\frac{\omega +\beta -\phi -\phi \gamma +1-\sqrt{(\omega +\beta -\phi -\phi \gamma +1)^2-4\beta -4\omega +4\phi \kappa }}{2}. \end{aligned}$$
(52)

So the spectral radius \(\rho (M)\) is mainly based on the absolute values including \(\lambda _{1}\) and \(\lambda _{2}\). To analyze the convergence and the divergence of the particle, the equation \(\triangle \) can be mathematically defined as

$$\begin{aligned} \triangle =(\omega +\beta -\phi -\phi \gamma +1)^2-4\beta -4\omega +4\phi \kappa . \end{aligned}$$
(53)

Case 1: If the equation \(\triangle \) is larger than 0, the convergence condition is

$$\begin{aligned} \beta +\omega -\phi \kappa <\left( \frac{\omega +\beta -\phi -\phi \gamma +1}{2}\right) ^2. \end{aligned}$$
(54)

Additionally, the eigenvalue of transfer matrix is strictly larger than -1 and smaller than 1.

$$\begin{aligned} -1<\lambda _{2}\le \lambda _{1}<1. \end{aligned}$$
(55)

According to the Eq. (55), the parameter \(\lambda _{1}\) is strictly smaller than 1.

$$\begin{aligned} \frac{\omega +\beta -\phi -\phi \kappa +1+\sqrt{\triangle }}{2}<1. \end{aligned}$$
(56)

On the basis of the Eq. (55), the parameter \(\lambda _{2}\) is strictly larger than -1.

$$\begin{aligned} \frac{\omega +\beta -\phi -\phi \kappa +1-\sqrt{\triangle }}{2}>-1. \end{aligned}$$
(57)

Case 2: If the equation \(\triangle \) is smaller than 0, the corresponding convergence condition is

$$\begin{aligned} \beta +\omega -\phi \kappa \ge \left( \frac{\omega +\beta -\phi -\phi \gamma +1}{2}\right) ^2. \end{aligned}$$
(58)

According to (58), we can obtain

$$\begin{aligned} \beta +\omega \ge (\frac{\omega +\beta -\phi -\phi \gamma +1}{2})^2 +\phi \kappa . \end{aligned}$$
(59)

The eigenvalue of transfer matrix is

$$\begin{aligned} \rho (M)=\beta +\omega -\phi \kappa . \end{aligned}$$
(60)

Remark 1

Spectral radius mainly determines the convergence speed of each particle. The spectral radius has the large value in the early search stage, and each particle has the exploration ability. The spectral radius has the small value in the latter search stage, and each particle has the exploitation ability. The spectral radius \(\rho (M)\) is mainly determined by five parameters including \(\omega \), \(\phi \), \(\beta \), \(\gamma \) and \(\kappa \). The parameter \(\omega \) is the inertia weight in the evolutionary process and the random parameter \(\phi \) is equal to \(c_{1}r_{1}^{'}+c_{2}r_{2}^{'}\). The parameter \(\beta \) mainly determines the additional velocity \(\triangle v\) and the parameter \(\gamma \) determines the additional position \(\triangle x\). Finally, the parameter \(\kappa \) denotes the additional item between time-varying attractors.

Remark 2

Without the operation of setting the velocity, the parameter \(\gamma \) is equal to 0 in the evolutionary process, so the Eq. (49) in PSO algorithm can be also expressed by

$$\begin{aligned} \left[ \begin{array}{c} v(t+1)\\ y(t+1) \end{array} \right] =\left[ \begin{array}{cc} \omega +\beta &{} \phi \\ \kappa -\omega -\beta &{} 1-\phi \end{array} \right] \left[ \begin{array}{c} v(t)\\ y(t) \end{array} \right] . \end{aligned}$$
(61)

Without the operation of setting the velocity and the position, two parameters including \(\beta \) and \(\gamma \) are equal to 0 in the evolutionary process, so the Eq. (49) in PSO algorithm can be also expressed by

$$\begin{aligned} \left[ \begin{array}{c} v(t+1)\\ y(t+1) \end{array} \right] =\left[ \begin{array}{cc} \omega &{} \phi \\ \kappa -\omega &{} 1-\phi \end{array} \right] \left[ \begin{array}{c} v(t)\\ y(t) \end{array} \right] . \end{aligned}$$
(62)

When the attractor of PSO system is the constant parameter and there is no operation of setting the velocity and the position, three parameters including \(\beta \), \(\gamma \) and \(\eta \) are equal to 0, so the Eq. (49) in PSO algorithm can be also expressed by

$$\begin{aligned} \left[ \begin{array}{c} v(t+1)\\ y(t+1) \end{array} \right] =\left[ \begin{array}{cc} \omega &{} \phi \\ -\omega &{} 1-\phi \end{array} \right] \left[ \begin{array}{c} v(t)\\ y(t) \end{array} \right] . \end{aligned}$$
(63)

5.4 Spectral Radius Analysis in the Evolutionary Process

5.4.1 Sphere Function and Parameter Setting

Sphere function can be mathematically defined as

$$\begin{aligned} F({\textbf {x}})=\sum _{i=1}^n{x_i^2} \end{aligned}$$
(64)

where n denote the dimension in the search space.

The number N of all particles and the number \(T_{max}\) of generations are set to 10 and 2000, respectively. While \(\omega (t)\) decreases from 0.9 to 0.4 in the evolutionary process and acceleration coefficients including \(c_{1}\) and \(c_{2}\) are set to 2.0. According to the Eqs. (33) and (34), the current velocity is set to the random value between the minimum value and the maximum value where the current velocity is larger than the maximum value or it is smaller than the minimum value. According to the equations including (35) and (36), the current position is also set to the random value between the minimum value and the maximum value where the current position is not between the maximum value and the minimum value.

5.4.2 Key Parameters of PSO Algorithm in the Evolutionary Process

As depicted in Fig. 6, the objective fitness decreases in the evolutionary process and the particles have the convergence behavior. Additionally, all particles converge into the gbest in the latter search stage. In the realistic evolutionary process, the attractor of PSO algorithm, which is mainly determined by \(\frac{\phi _{1}P(t)+\phi _{2}G(t)}{\phi }\), is closely related to the landscape of objective function, swarm trajectory and key parameters in the PSO algorithm. The landscape of objective function determines the convergence direction and trajectory of each particle, while the attractor of the swarm is selected from those positions in the trajectories of all particles. In addition, key parameters in the PSO algorithm mainly determine the convergence speed of each particle. Generally speaking, the attractor of PSO system is the time-varying position in the early search stage and the stable position in the latter search stage. In Fig. 7, the time-varying attractor Q(t) of the first particle is the time-varying parameter from 1st step to 340th step, and the time-varying attractor Q(t) of the first particle is the stable parameter from 340th step to 1000th step. Therefore, in Fig. 8, the parameter \(\gamma \), which is equal to \(\frac{Q(t+1)-Q(t)}{v(t)}\), mainly determines the spectral radius and the convergence behavior in the evolutionary process.

Fig. 6
figure 6

Objective fitness on Sphere function in the evolutionary process

Fig. 7
figure 7

Time-varying attractor Q(t) in the evolutionary process

Fig. 8
figure 8

Key parameter \(\kappa \) in the whole evolutionary process

According to the Fig. 9, the additional position \(\Delta x\) of the particle exists from 1st step to 340th step and the position of the particle has the reset value. Furthermore, the additional position determines the particle trajectory and the convergence analysis. As shown in Fig. 10, the parameter \(\beta \) physically denotes the additional position. If the position of particle is larger than the maximum value or is smaller than the minimum value, the parameter \(\beta \) is not equal to 0. If the position of particle is between the minimum value and the maximum value, the parameter \(\beta \) is generally equal to 0.

Fig. 9
figure 9

The additional position \(\Delta x\) in the whole evolutionary process

Fig. 10
figure 10

The parameter \(\beta \) in the whole evolutionary process

The velocity of each particle mainly determines the convergence behavior and the divergence behavior. According to the Figs. 11 and 12, the additional velocity \(\Delta v\) of the particle is larger than the maximum value or is smaller than the minimum value from 1st step and 340th step. More importantly, the parameter \(\gamma \), which is not equal to 0 in the early search stage, mainly determines the convergence and divergence behavior.

Fig. 11
figure 11

The additional velocity \(\Delta v\) in the whole evolutionary process

Fig. 12
figure 12

Key parameter \(\gamma \) in the whole evolutionary process

5.4.3 Spectral Radius of PSO Algorithm with Bounds and Time-varying Attractor

In order to discuss the convergence analysis on PSO algorithm with bounds and time-varying attractor, it is key to analyze and compute the spectral radius on one transfer matrix under some parameters, while it is important to compute \(\rho (M)\) on the product of two transfer matrices of PSO algorithm with bounds and time-varying attractor.

Case 1: If the first case does not consider the time-varying attractor, the additional velocity \(\triangle v\) and the additional position \(\triangle x\), the parameters, which mainly consist of \(\kappa \), \(\beta \) and \(\gamma \), are set to 0, \(\rho \) on one transfer matrix is depicted in Fig. 13. In Fig. 13, the number of \(\rho <1\) is larger than that of \(\rho >1\). \(\rho \) on the product of two transfer matrix is shown in Fig. 14 and the corresponding spectral radius is larger than 1.

Fig. 13
figure 13

Spectral radius on one transfer matrix in the evolutionary process (\(\kappa =\beta =\gamma \)=0)

Fig. 14
figure 14

Spectral radius on two transfer matrices in the evolutionary process (\(\kappa =\beta =\gamma \)=0)

Fig. 15
figure 15

Spectral radius on one transfer matrix in the whole evolutionary process (\(\beta =\gamma \)=0)

Fig. 16
figure 16

Spectral radius on two transfer matrices in the whole evolutionary process (\(\beta =\gamma \)=0)

Fig. 17
figure 17

Spectral radius on one transfer matrix in the whole evolutionary process (\(\gamma \)=0)

Fig. 18
figure 18

Spectral radius on two transfer matrices in the whole evolutionary process (\(\gamma \)=0)

Fig. 19
figure 19

Spectral radius on one transfer matrix in the whole evolutionary process

Fig. 20
figure 20

Spectral radius on two transfer matrices in the whole evolutionary process

Case 2: When the second case does not consider the additional velocity \(\triangle v\) and the additional position \(\triangle x\), the parameters including \(\beta \) and \(\gamma \) are equal to 0. Considering the time-varying attractor factor, \(\rho \) on one transfer matrix is depicted in Fig. 15 and \(\rho \) on the product on two transfer matrices is shown in Fig. 16.

Case 3: When the third case does not consider the additional position \(\triangle x\), the parameter \(\gamma \) is equal to 0. Under the time-varying attractor factor and the additional velocity \(\triangle v\), \(\rho \) on one transfer matrix is shown in Fig. 17 and \(\rho \) on the product on two transfer matrices is shown in Fig. 18.

Case 4: In the realistic evolutionary process, it is necessary to consider the time-varying attractor, the additional velocity \(\triangle v\) and the additional position \(\triangle x\), furthermore, those above-mentioned parameters are not equal to 0. \(\rho \) on one transfer matrix is shown in Fig. 19 and \(\rho \) on the product on two transfer matrices is shown in Fig. 20.

According to the above-mentioned analysis on spectral radius, there are some key research points in the PSO algorithm with bounds and time-varying attractor as follows.

  • The attractor Q(t) is the time-varying random parameter, so it is key to calculate the convergence condition and the convergence trajectory on the basis of Q(t) and \(\eta \).

  • In the early search stage, each particle has the powerful exploration ability and the velocity of the particle has the large value, so the additional velocity \(\Delta v\) is not equal to 0 and it is important to consider the additional velocity \(\Delta v\) and the parameter \(\beta \) into the convergence analysis in the early search stage.

  • Those parameters in the PSO algorithm with bounds and time-varying attractor, which are mainly composed of \(\eta \), \(\beta \) and \(\gamma \), are not equal to 0 in the early search stage and determine the convergence behavior and the divergence behavior.

6 Simulation Results on Railway Safety Assessment

6.1 Parameter Setting

Some parameters in the PSO algorithm and safety assessment model are initialized as follows. In one aspect, the number of particles is set to 20, while the maximum and minimum velocity is set to 100 and -100, respectively. The inertia weight \(\omega \) linearly decreases from 0.9 to 0.0 in the evolutionary process, while the coefficients including \(c_{1}\) and \(c_{2}\) are equal to 2.0. \(T_{max}\) is set to 1000 and several parameters, including \(r_{3}^{'}\), \(r_{4}^{'}\), \(r_{5}^{'}\) and \(r_{6}^{'}\), are the uniform random value in [0, 1].

In another aspect, the sample number in the safety assessment model is set to 2000 in the first realistic scenario and the corresponding sample is depicted in Fig. 21, while the sample number in the safety assessment model is 10,000 in the second realistic scenario and the corresponding sample is shown in Fig. 22. The number of assessment items is set to 5 and the weight on each assessment item is set to 0.2.

Fig. 21
figure 21

The number of safety assessment problems (n = 2000)

Fig. 22
figure 22

The number of safety assessment problems (n = 10,000)

6.2 Railway Safety Assessment Model Training (n = 2000)

To analyze the parameter optimization problem, it is necessary to discuss the objective fitness and the swarm velocity in the evolutionary process. Additionally, it is also key to study the trajectory of the time-varying attractor of first particle and the convergence trajectory in G(t). Furthermore, it is important to study \(\rho \) on M(t) and \(M(t+1)M(t)\), together with the computational time of each evolutionary step.

In Fig. 23, the best objective fitness of all particles increases from the 1st step to the 330th step and the correct percent is equal to 100 from the 330th step to the 1000th step. The obtained results using PSO algorithm are 60.2453, 65.8826, 60.6338, 65.6190, 60.0707, 91.8827, 85.9543 and 77.8828. In Fig. 24, the swarm velocity \(|V|^{2}\) has the large velocity from the 1th step to the 400th step. The swarm velocity \(|V|^{2}\) has the small velocity of all particles from the 400th step to the 1000th step.

Additionally, the value \(x_{1}\) in the first particle, which is mainly shown in Fig. 25, is the time-varying value. In the early search stage, all particles search for the good solution in the whole solution space and the value \(x_{1}\) has the time-varying value from the 1st step to the 260th step. In the latter search stage, each particle converges into the attractor and the value \(x_{1}\) has the small value from the 300th step to the 1000th step. In Fig. 26, key parameters in G are optimized and the PSO algorithm obtains the suitable parameters in the safety assessment model.

Fig. 23
figure 23

Objective fitness in the evolutionary process (n = 2000)

Fig. 24
figure 24

The swarm velocity in the evolutionary process (n = 2000)

Fig. 25
figure 25

The time-varying attractor of the first particle in the evolutionary process (n = 2000)

Fig. 26
figure 26

Key parameters in safety assessment model in the evolutionary process (n = 2000)

With respect to the convergence analysis, \(\rho \) on the transfer matrix determines the convergence and divergence behavior. And one spectral radius on transfer matrix is shown in Fig. 27. Additionally, \(\rho \) on one transfer matrix at some steps is smaller than 1 and \(\rho \) on one transfer matrix at some steps is larger than 1. As shown in Fig. 28, \(\rho \) on the product of two transfer matrices controls the divergence or the convergence at two steps, and \(\rho \) on two transfer matrices at some steps is larger than 1.

Fig. 27
figure 27

Spectral radius on one transfer matrix in the evolutionary process

Fig. 28
figure 28

Spectral radius on two transfer matrices in the evolutionary process

In order to analyze the computational time at each step, the computational time at one step is depicted in Fig. 29 and the whole computational time of PSO algorithm is 59.31 s. The largest computational time at one step is 0.47 s and the computational time from the 1st step to the 200th step is larger than 0.05.

Fig. 29
figure 29

Computational time of all particles in the evolutionary process (n = 2000)

6.3 Railway Safety Assessment Model Training (n = 10,000)

The objective of this section is to study the parameter optimization problem where the number of safety assessment equipments or workers is equal to 10000. The objective fitness and the swarm velocity are depicted in Figs. 30 and 31, respectively. As shown in Fig. 30, PSO algorithm can find the good solution at the 320th step. In Fig. 31, the swarm velocity has the large value from the 1st step to the 350th step and from the 800th step to the 1000th step.

Fig. 30
figure 30

Objective fitness in the evolutionary process (n = 10,000)

Fig. 31
figure 31

The swarm velocity in the evolutionary process (n = 10,000)

Additionally, Q(t) in the first particle, which is mainly shown in Fig. 32, is the time-varying value during the whole evolutionary process. The attractor of the first particle is the time-varying position from the 1st step to the 350th step. Additionally, the time-varying attractor Q(t) of the first particle is the stable parameter from 350th step to 1000th step. Then the optimized parameters in the safety assessment models are shown in Fig. 33. The parameters in the safety assessment model are optimized to 60.3612, 65.5836, 60.5438, 65.4973, 60.5230, 91.9375, 85.8693 and 77.9450.

Fig. 32
figure 32

The time-varying attractor of the first particle in the evolutionary process (n = 10,000)

Fig. 33
figure 33

Key parameters in safety assessment model in the evolutionary process (n = 10,000)

The parameter \(\rho \) on one transfer matrix and two transfer matrices are shown in Figs. 34 and 35, respectively. Additionally, the parameter \(\rho \) on one transfer matrix at some steps is smaller than 1 and spectral radius on one transfer matrix at some steps is larger than 1.

Fig. 34
figure 34

Spectral radius on one transfer matrix in the evolutionary process

Fig. 35
figure 35

Spectral radius on two transfer matrices in the evolutionary process

Finally, the computational time at each step is depicted in Fig. 36 and the whole computational time is 77.982 s. The largest computational time at one step is 0.32 s and the computational time from the 1st step to the 160th step is larger than 0.06 s.

Fig. 36
figure 36

Computational time of all particles in the evolutionary process (n = 10,000)

7 Conclusions and Future Works

7.1 Conclusions

In order to improve the railway safety management efficiency, this paper mainly concentrates on the safety assessment model by using the PSO algorithm with bounds and time-varying attractor. Some concepts in the railway safety are composed of the risk source, the hidden danger, the railway accident, the equipment, the workers and the safety space, etc. Then, the railway assessment model is studied on the basis of the existing safety problem, the railway equipment and the railway worker. Furthermore, it is important to introduce the PSO algorithm with bounds and time-varying attractor and discuss the convergence analysis and the spectral analysis on the PSO algorithm. Additionally, it is key to analyze some key parameters in PSO algorithm with bounds and time-varying attractor during the evolutionary process. Finally, simulation results show that the PSO algorithm with bounds and time-varying attractor obtains the good result on railway assessment model when the number of samples is equal to 2000 and 10000.

7.2 Future Scope

In the future, it is important to apply the above-mentioned technologies to the realistic railway safety platform. Therefore, the future works and some challenging works on the railway safety assessment can be concluded as follows.

  • It is important to study the theory on the railway safety assessment and warning from the perspective of big data analytic.

  • The convergence analysis on PSO algorithm with time-varying attractor and bounds is investigated to deeply analyze the convergence speed and the convergence condition, while it is key to study the convergence analysis on the multiple objectives PSO algorithm.

  • Railway safety assessment problem, which is considered as one of the multiple objectives optimization problems or the dynamic optimization problems, can be solved by the swarm optimization algorithm.

  • The safety assessment model by the PSO algorithm is applied to the realistic railway safety platform to improve the safety management efficiency and achieve the railway safety warning.