|
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 |
2 | 2 | # Institute for Energy Economics and Energy System Technology (IEE) Kassel and individual |
3 | 3 | # contributors (see AUTHORS file for details). All rights reserved. |
4 | 4 |
|
|
14 | 14 | from copy import deepcopy |
15 | 15 | from packaging import version |
16 | 16 | import pandapower as pp |
| 17 | +from pandapower.diagnostic.diagnostic_functions import DeviationFromStdType |
17 | 18 | from pandapower.plotting import create_generic_coordinates |
18 | 19 | import warnings |
19 | 20 |
|
|
22 | 23 | except ImportError: |
23 | 24 | import logging |
24 | 25 |
|
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 | +) |
27 | 35 | from simbench.converter.format_information import ( |
28 | 36 | _correct_calc_type, |
29 | 37 | _csv_table_pp_dataframe_correspondings, |
30 | 38 | _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, |
31 | 46 | ) |
32 | | -from simbench.converter.read_and_write import * |
33 | | -from simbench.converter.read_and_write import _init_csv_tables |
34 | 47 | from simbench.converter.pp_net_manipulation import ( |
35 | 48 | _extend_pandapower_net_columns, |
36 | 49 | _add_dspf_calc_type_and_phys_type_columns, |
|
41 | 54 | _add_coordID, |
42 | 55 | _set_vm_setpoint_to_trafos, |
43 | 56 | _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, |
44 | 65 | ) |
45 | | -from simbench.converter.csv_data_manipulation import * |
46 | 66 | from simbench.converter.csv_data_manipulation import ( |
47 | 67 | _extend_coordinates_to_node_shape, |
48 | 68 | _sort_switch_nodes_and_prepare_element_and_et, |
|
51 | 71 | _ensure_safe_csv_ids, |
52 | 72 | _correct_autoTapSide_of_nonTapTrafos, |
53 | 73 | ) |
54 | | -from simbench.converter.pp_net_manipulation import * |
55 | 74 |
|
56 | 75 | logger = logging.getLogger(__name__) |
57 | 76 |
|
@@ -312,7 +331,7 @@ def pp2csv_data( |
312 | 331 | if drop_inactive_elements: |
313 | 332 | # attention: trafo3ws are not considered in current version of drop_inactive_elements() |
314 | 333 | 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) |
316 | 335 | if dev_from_std: |
317 | 336 | logger.warning( |
318 | 337 | "There are deviations from standard types in elements: " |
|
0 commit comments