Skip to content

Commit

Permalink
Small Refactoring of pf import
Browse files Browse the repository at this point in the history
  • Loading branch information
hilbrich committed Jan 17, 2025
1 parent 19ebbda commit 0572ae5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pandapower/converter/powerfactory/pp_import_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2818,23 +2818,23 @@ def create_trafo3w(net, item, tap_opt='nntap'):
elif table_side == 1:
tap_min = pf_type.n3tmn_m
tap_max = pf_type.n3tmx_m
new_tap_table["angle_deg"] = -new_tap_table["angle_deg"]
#new_tap_table["angle_deg"] = -new_tap_table["angle_deg"]
if meas_side == 0:
new_tap_table["voltage_ratio"] = pf_type.utrn3_h / new_tap_table["voltage_ratio"]
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_h
elif meas_side == 1:
new_tap_table["voltage_ratio"] = pf_type.utrn3_m / new_tap_table["voltage_ratio"]
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_m
elif meas_side == 2:
new_tap_table["voltage_ratio"] = pf_type.utrn3_l / new_tap_table["voltage_ratio"]
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_l
elif table_side == 2:
tap_min = pf_type.n3tmn_l
tap_max = pf_type.n3tmx_l
new_tap_table["angle_deg"] = -new_tap_table["angle_deg"]
#new_tap_table["angle_deg"] = -new_tap_table["angle_deg"]
if meas_side == 0:
new_tap_table["voltage_ratio"] = pf_type.utrn3_h / new_tap_table["voltage_ratio"]
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_h
elif meas_side == 1:
new_tap_table["voltage_ratio"] = pf_type.utrn3_m / new_tap_table["voltage_ratio"]
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_m
elif meas_side == 2:
new_tap_table["voltage_ratio"] = pf_type.utrn3_l / new_tap_table["voltage_ratio"]
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_l

snom_h_a = item.GetAttribute("Snom_h_a")
snom_m_a = item.GetAttribute("Snom_m_a")
Expand Down

0 comments on commit 0572ae5

Please sign in to comment.