From cb03c30548211d6102f1f3a53c8cef2b90a6e777 Mon Sep 17 00:00:00 2001 From: Hantao Cui Date: Wed, 10 Apr 2024 02:36:19 +0000 Subject: [PATCH] Fix a bug in island detection to properly set `Bus.n_islanded_buses`. --- andes/system.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/andes/system.py b/andes/system.py index 1536cd87a..2497fc1a6 100644 --- a/andes/system.py +++ b/andes/system.py @@ -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,