## 3 Case Study
### Stability Evaluation Based on Genetic Algorithm and Discrete Element Analysis
The termination criterion is given by Equation (5):  
\[\max(f(x_{i}))-\max(f(x_{i}))_{prev}<\epsilon \tag{5}\]  
where \(\max(f(x_{i}))\) represents the optimal fitness value in the current population, \(\max(f(x_{i}))\)prev denotes the optimal fitness value in the previous generation, and \(\epsilon\) represents the predefined convergence threshold. A genetic algorithm was implemented using the Python programming language, leveraging the built-in Python module of 3 DEC discrete element analysis software to combine Python with discrete element methods for computational analysis. The 3 DEC softwareprovides a dedicated Python module, which enables the implementation of genetic algorithms using the Python programming language. Moreover, this module includes built-in functions that allow direct access to 3 DEC numerical simulation commands, covering tasks such as model construction, parameter assignment, boundary condition setup, monitoring of model response data, and exporting of simulation results. By integrating genetic algorithms with these built-in functions, seamless communication between Python and 3 DEC can be achieved. The parameter settings for the genetic algorithm are shown in Tables 7 and 8 below. The objective function is defined as the sum of the differences between the actual monitored displacements at four monitoring points on the slope, and the displacements are calculated by numerical simulation. When defining the objective function, it is essential to standardize the measurement units. In this engineering case, displacement units for both field monitoring data and numerical simulation results are unified in meters for the formulation of the objective function. The variation of the objective function with the number of iterations is shown in Figure 9 below. \begin{table}
\begin{tabular}{c c c c c} \hline
**Objective Function** & **Objective Dimension** & **Population Size** & **Maximum Number of Iterations** & **Mutation Probability** \\ \hline Difference between the numerical model slope monitoring data and actual monitoring data & 3 & 30 & 100 & 0.01 \\ \hline \end{tabular}
\end{table} 
Table 7: Genetic algorithm parameters. Figure 8: Numerical simulation results. (**a**) Cumulative horizontal displacement curve with a creep time of 2000 h; (**b**) cumulative horizontal displacement curve with a creep time of 10,000 h; (**c**) cumulative horizontal displacement curve with a creep time of 45,000 h. \begin{table}
\begin{tabular}{c c c} \hline
**Upper Limit of Creep Parameters** & **Lower Limit of Creep Parameters** & **Precision** \\ \hline
7 & 18 & 0.1 \\
49 & 173 & 1 \\
550 & 8951 & 1 \\ \hline \end{tabular}
\end{table} 
Table 8: Range of numerical model parameters and optimization precision. The comparison between the actual displacement curve at the monitoring points and the displacement curve obtained from numerical simulation is shown in Figure 10 below. Figure 10: Comparison between the numerical simulation monitoring curve and actual displacement monitoring curve. (**a**) Cumulative horizontal displacement monitoring curve at monitoring point TPZQX4-3; (**b**) cumulative horizontal displacement monitoring curve at monitoring point TPZQX4-4; (**c**) cumulative horizontal displacement monitoring curve at monitoring point TPZQX4-5; (**d**) cumulative horizontal displacement monitoring curve at monitoring point TPZQX4-6. Figure 9: Variation of the objective function with iteration count. The root mean square error (RMSE) was employed to quantitatively analyze the discrepancy between the displacements obtained from the numerical model and those from field monitoring in order to assess the accuracy of the proposed evaluation method. The mathematical expression for RMSE is given in Equation (6):  
\[RMSE=\sqrt{\frac{1}{n}{\sum\limits_{i=1}^{n}{(y_{i}-y_{i}^{\prime})^{2}}}} \tag{6}\]  
where y\({}_{i}\) represents the measured (observed) value, yi denotes the corresponding value obtained from the numerical model, and n is the number of samples.