Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions tests/data/pandapower/pp_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@

from power_grid_model_io.converters.pandapower_converter import (
PP_COMPATIBILITY_VERSION_3_2_0,
PP_COMPATIBILITY_VERSION_3_4_0,
PP_CONVERSION_VERSION,
)

mag0_multiplier = 1.0 if PP_CONVERSION_VERSION < PP_COMPATIBILITY_VERSION_3_4_0 else 100.0


@lru_cache
def pp_net() -> pp.pandapowerNet:
Expand Down Expand Up @@ -61,7 +64,7 @@ def pp_net() -> pp.pandapowerNet:
tap_neutral=1,
parallel=2,
vk0_percent=17.8,
mag0_percent=100.0,
mag0_percent=100.0 * mag0_multiplier,
mag0_rx=0.01,
)
pp.create_line(
Expand Down Expand Up @@ -228,7 +231,7 @@ def pp_net_3ph() -> pp.pandapowerNet:
parallel=2,
vk0_percent=8.9,
vkr0_percent=4.0,
mag0_percent=374531.83520599245,
mag0_percent=374531.83520599245 * mag0_multiplier,
mag0_rx=0.47628073,
si0_hv_partial=0.9,
in_service=True,
Expand Down Expand Up @@ -359,7 +362,7 @@ def pp_net_3ph_minimal_trafo():
vector_group="Dyn",
vk0_percent=4,
vkr0_percent=0,
mag0_percent=100,
mag0_percent=100 * mag0_multiplier,
mag0_rx=0,
si0_hv_partial=0.9,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@
"is_multicolumn": false
},
"version": "3.3.3",
"format_version": "3.3.0",
"format_version": "3.1.0",
"converged": true,
"OPF_converged": false,
"name": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@
"is_multicolumn": false
},
"version": "3.3.3",
"format_version": "3.3.0",
"format_version": "3.1.0",
"converged": true,
"OPF_converged": false,
"name": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,6 @@ def test_pp_gen_output_3ph():
# Act
actual_values = actual_data[component][attribute]
expected_values = expected_data[component][attribute]
print(component)
print(attribute)
print(actual_values)
print(expected_values)
# Assert
pd.testing.assert_series_equal(actual_values, expected_values, atol=5e-4, rtol=1e-4)

Expand Down
Loading