Skip to content

Commit

Permalink
Merge pull request #2217 from retoflow/fix/unbalanced_powerflow_trafo…
Browse files Browse the repository at this point in the history
…_results

fix key error in unbalanced powerflow if trafo index is not consecutive or not starting at zero
  • Loading branch information
SteffenMeinecke authored Mar 25, 2024
2 parents 685ca90 + a0cf82e commit 5e85ca8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandapower/results_branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def _get_trafo_results_3ph(net, ppc0, ppc1, ppc2, I012_f, V012_f, I012_t, V012_t
if len(gap_trafo_index > 0):
for i_trafo in gap_trafo_index:
Iabc_sum = [0, 0, 0]
lv_bus = net.trafo.lv_bus[i_trafo]
lv_bus = net.trafo.lv_bus.iat[i_trafo]
V_bus_abc = np.array([[net.res_bus_3ph['vm_a_pu'][lv_bus] * net.bus['vn_kv'][lv_bus]],
[net.res_bus_3ph['vm_b_pu'][lv_bus] * net.bus['vn_kv'][lv_bus]],
[net.res_bus_3ph['vm_c_pu'][lv_bus] * net.bus['vn_kv'][lv_bus]]])
Expand Down

0 comments on commit 5e85ca8

Please sign in to comment.