Key Transmission Section Search Based on Graph Theory and PMU Data for Vulnerable Line Identification in Power System
Algorithm 2
Improved Floyd algorithm.
Input: W, weight matrix
(1)
Replace distance matrix D with matrix W.
(2)
Remove the edges k=i, k=j and ωij = ∞.
(3)
Use Floyd algorithm to find the shortest path and distance.
(4)
Update distance matrix D and routing matrix R.
(5)
If ωij < 0, stop.
(6)
Else if k=n, stop.
(7)
End if
(8)
End if
(9)
Eliminate the same number in each element of matrix R.
(10)
Traverse all elements in matrix R. If the element in R is a unit group, traverse all elements in the unit group, and generate the shortest path corresponding to the number of elements. In this way, until all the shortest paths are generated.