# Safety Design of Rotary Drilling Rig Mast Based on Multi-Condition Analysis
## 3 Fuzzy Comprehensive Evaluation
### Method of Weight Assignment
#### 3.3.1 Analytic Hierarchy Process  
The subjective weighting method includes techniques such as the Delphi method and Analytic Hierarchy Process (AHP). In this study, the Analytic Hierarchy Process is chosen. The AHP is a method that decomposes a complex decision system into hierarchical levels, such as goals, criteria, and alternatives, to establish a relevant model. Based on this structure, the AHP combines both qualitative and quantitative analyses for systematic decision evaluation. This method is characterized by its clear structure, strong flexibility, and ease of implementation.  
When applying the AHP for weight assignment, the first step is to perform pairwise comparisons of the evaluation criteria based on their relative importance and construct the judgment matrix \(A\) (see Equation (11)), as shown in Table 8.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multicolumn{1}{c}{**Poor**} & \multicolumn{1}{c}{**Fair**} & \multicolumn{1}{c}{**Good**} & \multicolumn{1}{c}{**Excellent**} \\ \hline \(\begin{cases}m_{g1}=1,\\ m_{g1}=\frac{k_{1}^{g}-y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g1}=0,\end{cases}\) & \(\begin{cases}m_{g2}=1,\\ m_{g2}=\frac{k_{1}^{g}-y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ y_{g}>b_{2}^{g}\end{cases}\) & \(\begin{cases}m_{g2}=1,\\ m_{g2}=\frac{k_{1}^{g}-y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g2}=\frac{k_{1}^{g}-y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g2}=\frac{k_{1}^{g}-y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g3}=0,\end{cases}\) & \(\begin{cases}m_{g3}=0,\\ m_{g3}=\frac{k_{1}^{g}-y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g3}=\frac{k_{1}^{g}-y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g3}=\frac{k_{1}^{g}-y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g3}=\frac{k_{1}^{g}-y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g4}=0\end{cases}\) & \(\begin{cases}m_{g4}=1,\\ m_{g4}=\frac{y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g4}=\frac{y_{g}-y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g4}=0\end{cases}\) & \(\begin{cases}m_{g4}=1,\\ m_{g4}=\frac{y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g4}=\frac{y_{g}-y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g4}=0\end{cases}\) & \(\begin{cases}m_{g4}=1,\\ m_{g4}=\frac{y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g4}=\frac{y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g4}=0\end{cases}\) & \(\begin{cases}m_{g4}=1,\\ m_{g4}=\frac{y_{g}}{k_{1}^{g}-k_{1}^{g}},\\ m_{g4}=0\end{cases}\) \\ \hline \hline \end{tabular}
\end{table}
Table 7: The trapezoidal membership function calculation formulas.  
Then, the consistency of the judgment matrix is checked using Equations (12) and (13) to ensure the rationality of the weight allocation.  
\[A=\begin{vmatrix}1&a_{12}&a_{13}&a_{14}\\ 1/a_{12}&1&a_{23}&a_{34}\\ 1/a_{13}&1/a_{23}&1&a_{34}\\ 1/a_{14}&1/a_{34}&1/a_{34}&1\end{vmatrix} \tag{11}\]  
In the equation, \(a_{12}\) represents the relative importance of the first indicator compared to the second indicator.  
\[CI=\frac{\lambda_{\text{max}}-n}{n-1} \tag{12}\]  
\[CR=\frac{CI}{RI} \tag{13}\]  
In the equation, \(\lambda_{\text{max}}\) represents the maximum eigenvalue of the judgment matrix; \(n\) denotes the number of indicators; \(CI\) is the consistency index; \(RI\) is the average random consistency index, with values shown in Table 9; and \(CR\) is the consistency ratio.  
When the consistency check is satisfied for \(CR<0.1\), the eigenvector corresponding to the largest eigenvalue of the judgment matrix is normalized to obtain the weights of the indicators.