Skip to content

Commit

Permalink
Fix a bug in island detection to properly set Bus.n_islanded_buses.
Browse files Browse the repository at this point in the history
  • Loading branch information
cuihantao committed Apr 10, 2024
1 parent df5dc68 commit cb03c30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions andes/system.py
Expand Up @@ -1256,6 +1256,9 @@ def connectivity(self, info=True):
# store `a` and `v` indices for zeroing out residuals
self.Bus.islanded_a = np.array(self.Bus.islanded_buses)
self.Bus.islanded_v = self.Bus.n + self.Bus.islanded_a
# `self.Bus.n_islanded_buses` is used to determine if `g_islands`
# needs to be call
self.Bus.n_islanded_buses = len(self.Bus.islanded_a)

# find islanded areas - Goderya's algorithm
temp = spmatrix(list(u) * 4,
Expand Down

0 comments on commit cb03c30

Please sign in to comment.