Skip to content

Commit f9b4808

Browse files
committed
fixed problem with pandpower diagnostic function
1 parent a084ed1 commit f9b4808

1 file changed

Lines changed: 27 additions & 8 deletions

File tree

simbench/converter/csv_pp_converter.py

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019-2025 by University of Kassel, Tu Dortmund, RWTH Aachen University and Fraunhofer
1+
# Copyright (c) 2019-2026 by University of Kassel, Tu Dortmund, RWTH Aachen University and Fraunhofer
22
# Institute for Energy Economics and Energy System Technology (IEE) Kassel and individual
33
# contributors (see AUTHORS file for details). All rights reserved.
44

@@ -14,6 +14,7 @@
1414
from copy import deepcopy
1515
from packaging import version
1616
import pandapower as pp
17+
from pandapower.diagnostic.diagnostic_functions import DeviationFromStdType
1718
from pandapower.plotting import create_generic_coordinates
1819
import warnings
1920

@@ -22,15 +23,27 @@
2223
except ImportError:
2324
import logging
2425

25-
from simbench.converter.auxiliary import *
26-
from simbench.converter.format_information import *
26+
from simbench.converter.auxiliary import (
27+
reindex_dict_dataframes,
28+
idx_in_2nd_array,
29+
avoid_duplicates_in_column,
30+
get_unique_duplicated_dict,
31+
ensure_iterability,
32+
merge_dataframes,
33+
ensure_full_column_data_existence,
34+
)
2735
from simbench.converter.format_information import (
2836
_correct_calc_type,
2937
_csv_table_pp_dataframe_correspondings,
3038
_csv_pp_column_correspondings,
39+
csv_tablenames,
40+
get_columns,
41+
)
42+
from simbench.converter.read_and_write import (
43+
_init_csv_tables,
44+
read_csv_data,
45+
write2csv,
3146
)
32-
from simbench.converter.read_and_write import *
33-
from simbench.converter.read_and_write import _init_csv_tables
3447
from simbench.converter.pp_net_manipulation import (
3548
_extend_pandapower_net_columns,
3649
_add_dspf_calc_type_and_phys_type_columns,
@@ -41,8 +54,15 @@
4154
_add_coordID,
4255
_set_vm_setpoint_to_trafos,
4356
_set_dependency_table_parameters,
57+
ensure_bus_index_columns_as_int,
58+
convert_parallel_branches,
59+
merge_busbar_coordinates,
60+
move_slack_gens_to_ext_grid,
61+
provide_subnet_col,
62+
provide_voltLvl_col,
63+
provide_substation_cols,
64+
pp_profile_names,
4465
)
45-
from simbench.converter.csv_data_manipulation import *
4666
from simbench.converter.csv_data_manipulation import (
4767
_extend_coordinates_to_node_shape,
4868
_sort_switch_nodes_and_prepare_element_and_et,
@@ -51,7 +71,6 @@
5171
_ensure_safe_csv_ids,
5272
_correct_autoTapSide_of_nonTapTrafos,
5373
)
54-
from simbench.converter.pp_net_manipulation import *
5574

5675
logger = logging.getLogger(__name__)
5776

@@ -312,7 +331,7 @@ def pp2csv_data(
312331
if drop_inactive_elements:
313332
# attention: trafo3ws are not considered in current version of drop_inactive_elements()
314333
pp.drop_inactive_elements(net, respect_switches=False)
315-
dev_from_std = pp.deviation_from_std_type(net)
334+
dev_from_std = DeviationFromStdType().diagnostic(net)
316335
if dev_from_std:
317336
logger.warning(
318337
"There are deviations from standard types in elements: "

0 commit comments

Comments
 (0)