simplenet.preprocess¶
Preprocess raw input case: drop isolated buses / out-of-service branches.
Port of matlab/NetworkReduction2/PreProcessData.m.
PreprocessStats
dataclass
¶
PreprocessStats(isolated_buses: int = 0, branches_removed: int = 0, generators_removed: int = 0, dclines_removed: int = 0)
Counts of items removed during preprocessing (matches MATLAB log).
preprocess
¶
Drop isolated buses, oos branches, and sync the external bus list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
case
|
PowerCase
|
The full input :class: |
required |
excluded
|
ndarray
|
1-D array of bus IDs (original numbering) the user wants to eliminate. The result drops any IDs that have already been removed as isolated. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
case |
PowerCase
|
New :class: |
excluded |
ndarray
|
Pruned external-bus array (still in original bus numbering). |
stats |
PreprocessStats
|
Counts of items removed during preprocessing. |