<jupyter_start><jupyter_text>SimBench Converter This tutorial introduces the SimBench csv format and the converter, connecting pandapower with the SimBench csv format:    The SimBench csv format is, similar to the pandapower format, an element based model which stores the parameters of each element in a table. Widespread element models are used.Two function, one in each direction, connects the csv files where the SimBench csv format data is stored with the pandapower net structure: csv2pp() and pp2csv(). These functions uses the internal functions csv_data2pp() and pp2csv_data(). The internal functions do the full conversion but do not perform reading or writing csv files.<jupyter_code>import pandapower.networks as nw
import simbench as sb
import os

# let's have a look at the SimBench csv format appearance
net = nw.mv_oberrhein()
csv_data = sb.pp2csv_data(net)
list(csv_data.keys())<jupyter_output>hp.pandapower.toolbox - INFO: set 0 of 0 unsupplied buses out of service
hp.pandapower.toolbox - INFO: dropped 0 lines with 0 line switches
hp.pandapower.toolbox - INFO: dropped 0 trafo elements with 0 switches
hp.pandapower.toolbox - INFO: dropped 0 trafo3w elements with 0 switches
hp.pandapower.toolbox - INFO: dropped 0 switches
hp.converter.simbench.csv_pp_converter - WARNING: In elements ['sgen', 'load']'scaling' differs from 1, which is not converted.
C:\Users\e2n011\Documents\GIT\pandapower-pro\converter\simbench\csv_pp_converter.py:777: FutureWarning:

Sorting because non-concatenation axis is not aligned. A future version
of pandas will change to not sort by default.

To accept the future behavior, pass 'sort=False'.

To retain the current behavior and silence the warning, pass 'sort=True'.


hp.converter.simbench.csv_pp_converter - INFO: There are 2 ExternalNet without subnet data.
hp.converter.simbench.csv_pp_converter - INFO: There are 181 Line without subnet data.
hp.conver[...]<jupyter_text>The list of csv_data keys show which element table exist in the SimBench csv format. The keys can be devided classes like "elements", "profiles", "types", "study cases" and "results", as done by csv_tablenames(). Now let's do a full conversion from csv files to pandapower net and the same in other way around.<jupyter_code># determine relevant paths
test_network_path = os.path.join(sb.sb_dir, "test", "converter", "test_network")
test_output_folder_path = os.path.join(simbench_converter_path(), "test_network_output_folder")

# get the pandapower net from test network csv files
net = sb.csv2pp(test_network_path)

# convert pp net to csv files
sb.pp2csv(net, test_output_folder_path, export_pp_std_types=False)<jupyter_output>C:\Users\e2n011\Documents\GIT\pandapower-pro\converter\simbench\csv_pp_converter.py:777: FutureWarning:

Sorting because non-concatenation axis is not aligned. A future version
of pandas will change to not sort by default.

To accept the future behavior, pass 'sort=False'.

To retain the current behavior and silence the warning, pass 'sort=True'.


hp.pandapower.toolbox - INFO: set 0 of 0 unsupplied buses out of service
hp.pandapower.toolbox - INFO: dropped 0 lines with 0 line switches
hp.pandapower.toolbox - INFO: dropped 0 trafo elements with 0 switches
hp.pandapower.toolbox - INFO: dropped 0 trafo3w elements with 0 switches
hp.pandapower.toolbox - INFO: dropped 0 switches
hp.converter.simbench.csv_pp_converter - INFO: There are 2 Bay without subnet data.
hp.converter.simbench.csv_pp_converter - INFO: There are 5 ExternalNet without subnet data.
hp.converter.simbench.csv_pp_converter - INFO: There are 10 Line without subnet data.
hp.converter.simbench.csv_pp_converter - INFO: There a[...]
StarcoderdataJupyterStructuredCleanDedup