Skip to content

Commit

Permalink
Refactoring of build branch
Browse files Browse the repository at this point in the history
  • Loading branch information
hilbrich committed Jan 17, 2025
1 parent 0572ae5 commit 9f8ab09
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions pandapower/converter/powerfactory/pp_import_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2480,6 +2480,7 @@ def create_trafo(net, item, export_controller=True, tap_opt="nntap", is_unbalanc
if tap_side == 0:
new_tap_table["voltage_ratio"] = pf_type.utrn_l / new_tap_table["voltage_ratio"]
else:
new_tap_table["angle_deg"] = -new_tap_table["angle_deg"]
new_tap_table["voltage_ratio"] = pf_type.utrn_h / new_tap_table["voltage_ratio"]
else:
raise ValueError("Measurement location for tap table not given.")
Expand Down Expand Up @@ -2812,9 +2813,10 @@ def create_trafo3w(net, item, tap_opt='nntap'):
if meas_side == 0:
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_h
elif meas_side == 1:
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_m
new_tap_table["voltage_ratio"] = pf_type.utrn3_m / new_tap_table["voltage_ratio"]
elif meas_side == 2:
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_l
new_tap_table["angle_deg"] = -new_tap_table["angle_deg"]
new_tap_table["voltage_ratio"] = pf_type.utrn3_l / new_tap_table["voltage_ratio"]
elif table_side == 1:
tap_min = pf_type.n3tmn_m
tap_max = pf_type.n3tmx_m
Expand All @@ -2824,15 +2826,18 @@ def create_trafo3w(net, item, tap_opt='nntap'):
elif meas_side == 1:
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_m
elif meas_side == 2:
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_l
new_tap_table["angle_deg"] = -new_tap_table["angle_deg"]
new_tap_table["voltage_ratio"] = pf_type.utrn3_l / new_tap_table["voltage_ratio"]
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"]
if meas_side == 0:
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_h
new_tap_table["angle_deg"] = -new_tap_table["angle_deg"]
new_tap_table["voltage_ratio"] = pf_type.utrn3_h / new_tap_table["voltage_ratio"]
elif meas_side == 1:
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_m
new_tap_table["angle_deg"] = -new_tap_table["angle_deg"]
new_tap_table["voltage_ratio"] = pf_type.utrn3_m / new_tap_table["voltage_ratio"]
elif meas_side == 2:
new_tap_table["voltage_ratio"] = new_tap_table["voltage_ratio"] / pf_type.utrn3_l

Expand Down

0 comments on commit 9f8ab09

Please sign in to comment.