## 3 Network Optimization of the Coal Mine Safety Risk Assessment
### Modeling
#### 3.1.2 The PSO-BP Neural Network
Selecting the number of particles in the PSO population can be a challenging task that requires careful consideration of the problem characteristics, the available resources, and the desired performance [70]. A good practice is to perform a sensitivity analysis to evaluate the effect of different population sizes on the optimization results and to choose a reasonable value based on the trade-off between exploration and exploitation [71]. Iterations refer to the number of times the population of particles is updated before the algorithm terminates. The more iterations an algorithm has, the more thoroughly the search space can be explored, but it also requires more computing resources and may result in slower convergence [72]. Similar to the selection of the population size, there are different approaches to determining the number of iterations in PSO. One common approach is to set a fixed number of iterations based on prior experience or a rule of thumb [73]. For example, a common rule of thumb is to run PSO for 500-2000 iterations for most optimization problems. The role of the inertia weight is to balance the global and local search behaviors of the particles. A higher inertia weight favors global exploration, allowing the particles to move faster and cover a larger search space [74]. A lower inertia weight favors local exploitation, allowing the particles to converge more tightly around the best solutions found. In this study, the adaptive approach has been used. The equation is described as follows:  
\[v_{i}^{(t+1)}=phi*\left[v_{i}^{(t)}+C1*r1*(pbest_{i}-x_{i}^{(t)})+C2*r2*(gbest -x_{i}^{(t)})\right] \tag{19}\]  
where \(phi\) is the sum of the cognitive and social learning factors. The inertia weight damping ratio is a parameter used in some adaptive approaches for setting the inertia weight in PSO. The damping ratio is used to adjust the rate at which \begin{table}
\begin{tabular}{c c} \hline \hline
**Optimization Parameters** & **Values** \\ \hline The number of particles in the population (SwarmSize) & 50 \\ The maximum number of iterations & 500 \\ Inertia weight (W) & 0.60 \\ The inertia weight damping ratio & 0.40 \\ The personal learning coefficient (C1) & 2.5 \\ The global learning coefficient (C2) & 2.5 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: PSO initial optimization parameters. the inertia weight changes over iterations in order to balance exploration and exploitation and improve convergence [75]. According to the formula below, the damping ratio is the ratio of the current and maximum inertia weights. \[d=\frac{w^{(t)}}{w_{\max}} \tag{20}\]  
where \(w^{(t)}\) is the current inertia weight at iteration \(t\), and \(W_{\max}\) is the maximum inertia weight allowed in the optimization. The acceleration coefficients \(C1\) and \(C2\) are typically constant during the optimization process and can be set to different values depending on the problem characteristics and the desired convergence behavior [76; 77]. For example, setting \(C1=2.5\) and \(C2=2.5\) gives equal importance to the personal best and global best positions, while setting \(C1=1\) and \(C2=2\) gives more weight to the global best position.