## 2 The Seismic Reliability Analysis Process for the Substation System
### Triangle Algorithm for Solving the Connectivity Matrix  
One of the most challenging tasks in the adjacency matrix method is to solve the connectivity matrix of a given system. In the adjacency matrix, \(a_{ij}\) represents the situation in which there is an edge (that is, the path length is one) between point \(v_{i}\) and point \(v_{j}\). The proof shows that the power of the adjacency matrix also has a special meaning [34; 35; 36; 37; 38; 39; 40; 41]. For example, if element \(a_{ij}\) in the square of adjacency matrix \(A^{2}\) is not zero, point \(v_{i}\) and point \(v_{j}\) are connected by a link with a path length of two. From this, the following conclusions can be drawn: if \(a_{i,j}^{k}(k=1,2,\cdots,n-1)=1\), there is a link with path length \(k\) between point \(v_{i}\) and point \(v_{j}\). In the graph theory method, Equation (8) is called the connectivity matrix of the adjacency matrix, and the points are the critical functional units in the substation system:  
\[\mathbf{M}=\mathbf{I}\lor\mathbf{A}\lor\mathbf{A^{2}}\lor\cdots\lor\mathbf{A^{n-1}} \tag{8}\]  
where \(\mathbf{M}\) is the connectivity matrix and \(\mathbf{I}\) is the original adjacency matrix.  
By using graph theory to obtain the connectivity matrix of the adjacency matrix, the shortest path between two nodes can be obtained [42; 43; 44]. However, for the seismic connectivity analysis of the substation system, more attention should be given to whether the input-output nodes are connected. The graph theory method requires a large number of factorial operations on the adjacency matrix, resulting in low computational efficiency, and it is not suitable for the seismic connectivity analysis of large systems. [PERSON] proposed an effective algorithm for solving the transitive closure (connectivity matrix) of the adjacency matrix in 1962, which is called the [PERSON] algorithm [45; 46]. The algorithm obtains the final \(n\)-order connectivity matrix \(\mathbf{M}(n)\) by constructing a series of \(n\)-order matrices \(\mathbf{M}(k)\), each of which is calculated from its predecessor matrix \(\mathbf{M}(k-1)\). The [PERSON] algorithm is concise and clear and is easy to implement on a computer. However, the algorithm has some shortcomings when matrix \(\mathbf{M}\) is sparse. Because there is a large number of \(\mathbf{M}[j,i]=0\) elements in matrix \(\mathbf{M}\), the algorithm makes many empty judgments during the execution process, which leads to a long calculation time. Therefore, a triangle algorithm suitable for the seismic reliability analysis of substation systems is proposed. The basic idea is given below.  
(1) Set a new matrix \(\mathbf{M}:=\mathbf{A}\);  
(2) Set \(i:=1\);  
(3) For any \(j\) column, if the lower triangle of the matrix satisfies \(\mathbf{M}(i,j|n\geq i\geq 2\), \(i-1\geq j\geq 1)=1\) (processing the lower triangle) or the upper triangle of the matrix satisfies \(\mathbf{M}(i,j|n-1\geq i\geq 1,n\geq j\geq i+1)=1\) (processing the upper triangle), set \(\mathbf{M}[i,k]=\mathbf{M}[i,j]\lor\mathbf{M}[j,k]\), \(k\)\(=1\), \(2\cdots n\);  
(4) Set \(i:=i+1\);  
(5) If \(j\leq n\), proceed to step 3; otherwise, stop.  
A measure of system reliability is represented by the failure probability associated with \(EDP\). The process of the triangle algorithm based on the QMC simulation is shown in Figure 1.  
The steps are as follows:  
(1) Simplify the substation network into a directed topology graph.  
(2) Define the following key parameters: engineering demand parameter (\(EDP\)), initial simulation count (\(n\)), initial iteration count (\(e\)), and total simulation count (\(E\)).  
(3) Establish an adjacency matrix \(\mathbf{A}\) to record the failure probabilities of equipment under the \(e\)-th condition.  
(4) Use the quasi-Monte Carlo (QMC) method to adjust the adjacency matrix \(\mathbf{A}\).  
(5) Apply the triangle algorithm to solve for the system connectivity matrix.  
(6) Output the final results.