Skip to content

Commit

Permalink
Merge pull request #2351 from retoflow/fix/unbalanced_pf_index_error
Browse files Browse the repository at this point in the history
fix index error during unbalanced powerflow with multiple ext grids
  • Loading branch information
vogt31337 authored Jan 3, 2025
2 parents 0d627ba + 2f83f21 commit 28168c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Change Log
- [ADDED] support for unequal leakage resistance and reactance for HV and LV sides of a 2W-transformer
- [ADDED] Add VSC element, dc buses, dc lines, and hybrid AC/DC power flow calculation
- [CHANGED] accelerate _integrate_power_elements_connected_with_switch_buses() in get_equivalent()
- [FIXED] index error during unbalanced powerflow if multiple external grids are present
- [CHANGED] accelerate distributed slack power flow calculation by using sparse-aware operations in _subnetworks()
- [CHANGED] Trafo Controllers can now be added to elements that are out of service, changed self.nothing_to_do()
- [ADDED] Discrete shunt controller for local voltage regulation with shunt steps
Expand Down
2 changes: 1 addition & 1 deletion pandapower/results_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def _get_ext_grid_results_3ph(net, ppc0, ppc1, ppc2):
eg_bus_idx_ppc = np.real(ppc1["gen"][eg_idx_ppc, GEN_BUS]).astype(np.int64)
# read results from ppc for these buses
V012 = np.array(np.zeros((3, n_res_eg)),dtype = np.complex128)
V012[:, eg_is_idx] = np.array([ppc["bus"][eg_bus_idx_ppc, VM] * ppc["bus"][eg_bus_idx_ppc, BASE_KV]
V012[:, eg_idx_ppc] = np.array([ppc["bus"][eg_bus_idx_ppc, VM] * ppc["bus"][eg_bus_idx_ppc, BASE_KV]
* np.exp(1j * np.deg2rad(ppc["bus"][eg_bus_idx_ppc, VA]))
for ppc in [ppc0, ppc1, ppc2]])

Expand Down

0 comments on commit 28168c4

Please sign in to comment.