Skip to content

Commit 9929f27

Browse files
committed
fix line lengths
Signed-off-by: Martijn Govers <[email protected]>
1 parent 97a55a9 commit 9929f27

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/power_grid_model_io/converters/pandapower_converter.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,10 +2017,12 @@ def _pp_trafos_output_3ph(self): # pylint: disable=too-many-statements
20172017
# Only derating factor used here. Sn is already being multiplied by parallel
20182018
loading_multiplier = pp_input_transformers["df"] * 1e2
20192019
if self.trafo_loading == "current":
2020-
# since "i_from" and "i_to" are (n, 3) arrays while "u1" and "u2" are (n,) arrays, ValueError is generated during broadcast
2020+
# since "i_from" and "i_to" are (n, 3) arrays while "u1" and "u2" are (n,) arrays, ValueError is generated
2021+
# during broadcast
20212022
ui_from = pgm_output_transformers["i_from"] * np.tile(pgm_input_transformers["u1"][:, None], (1, 3))
20222023
ui_to = pgm_output_transformers["i_to"] * np.tile(pgm_input_transformers["u2"][:, None], (1, 3))
2023-
# for phase wise loading, sn_ph = sn / 3, v_n = v / sqrt(3), so (i * u / sqrt(3)) / (sn / 3) --> sqrt(3) * i * u / sn
2024+
# for phase wise loading, sn_ph = sn / 3, v_n = v / sqrt(3), so (i * u / sqrt(3)) / (sn / 3)
2025+
# ==> sqrt(3) * i * u / sn
20242026
loading_a_percent = np.sqrt(3) * np.maximum(ui_from[:, 0], ui_to[:, 0]) / pgm_input_transformers["sn"]
20252027
loading_b_percent = np.sqrt(3) * np.maximum(ui_from[:, 1], ui_to[:, 1]) / pgm_input_transformers["sn"]
20262028
loading_c_percent = np.sqrt(3) * np.maximum(ui_from[:, 2], ui_to[:, 2]) / pgm_input_transformers["sn"]

0 commit comments

Comments
 (0)