Table 1.
Hypergraph construction algorithm pseudo-code
| Algorithm: Hypergraph construction |
| Input: Disturbance value ; Coupling coefficients and ; Number of the nearest neighbor nodes ; Flow matrix ; Distance matrix ; Node set . |
| Output: Hypergraph matrix . |
| 1 Initialize the hypergraph. Establish the empty hypergraph matrix , where rows represent hyperedges and columns represent nodes. |
| 2 For node in node set : |
| 3 Initialize node states. Using Eq. (5) in the main text to calculate each node state at time . Denote as . |
| 4 Apply the disturbance. Add to the state value of node , . |
| 5 While : |
| 6 Disturbance propagation. According Eq. (1) in the main text, update each node state set in the next time step. |
| 7 Flow propagation. According Eqs. (6) and (7) in the main text, the flow of all nodes are allocated to a maximum of neighbor nodes whose state values are in the interval . |
| 8 Node failure. For any node , if , we set , , , , . |
| 9 End |
| 10 Update hypergraph matrix . If node causes the failure of node (), then set the value in the th row and th column of to 1. |
| 11 End |