pwrs.core.extract_islands#
- pwrs.core.extract_islands.extract_islands(mpc, *args)[source]#
Extract one or more electrical islands from a MATPOWER case.
Mirrors MATPOWER’s
extract_islandshelper. It identifies islands from branch connectivity, then returns case structs restricted to selected islands, including optional reordering of custom fields.- Parameters:
mpc (dict) – MATPOWER case struct.
*args – Optional MATPOWER-style arguments specifying precomputed island groups, island indices, and custom field reorderings.
nargout (int, optional) – MATLAB compatibility flag.
- Returns:
Extracted island case struct, or a list of island case structs when multiple islands are requested.
- Return type:
dict or list of dict