Git Product home page Git Product logo

simbench's People

Contributors

jwiemer112 avatar steffenmeinecke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

simbench's Issues

Function signature change of `element_bus_tuples` results in TypeError

Upon using the develop trees of both pandapower and simbench for the code

import pandapower as power
import simbench
code = "1-LV-urban6--2-sw"
net = simbench.get_simbench_net(code)

I noticed the following error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Input In [2], in <cell line: 2>()
      1 code = "1-LV-urban6--2-sw"
----> 2 net = simbench.get_simbench_net(code)

File simbench/simbench/networks/extract_simbench_grids_from_csv.py:365, in get_simbench_net(sb_code_info, input_path)
    363 filter_unapplied_profiles(csv_data)
    364 filter_loadcases(csv_data)
--> 365 net = csv_data2pp(csv_data)
    367 # --- remove switches if wanted by sb_code_info
    368 if not sb_code_parameters[6]:  # remove Switches

File simbench/simbench/converter/csv_pp_converter.py:130, in csv_data2pp(csv_data)
    128 _set_vm_setpoint_to_trafos(net, csv_data)
    129 _csv_types_to_pp2(net)
--> 130 ensure_bus_index_columns_as_int(net)
    132 return net

File simbench/simbench/converter/pp_net_manipulation.py:563, in ensure_bus_index_columns_as_int(net)
    561 """ Ensures that all columns with bus indices, e.g. net.line.from_bus, have int as dtype. """
    562 ebts = pp.element_bus_tuples(bus_elements=True, branch_elements=True, res_elements=False)
--> 563 ebts += {("switch", "element"), ("measurement", "element")}
    564 for elm, bus in ebts:
    565     net[elm][bus] = net[elm][bus].astype(int)

TypeError: unsupported operand type(s) for |=: 'list' and 'set'

The reason for this error is a breaking API change of the public API of PandaPower. The changed function in question is element_bus_tuples() and can be found Here.

The commit that introduced the change is Here.

I see two possible solutions:

  1. Accept the breaking API change and adapt the simbench code to something like this:
ebts = list(pp.element_bus_tuples(...))
ebts += ...

Or:

ebts = set(pp.element_bus_tuples(...))
ebts |= ...
  1. Change the PandaPower code and roll back the breaking API change to the initial function signature.

Question: Time series simulation with scenarios

I saw the tutorial example where one can run a time series simulation with pre-defined load profiles. Similarly, is there a way to run a time series simulation for a pre-defined scenario (for example high load)?

pandas deprecated .append -> warning for loading grids

pandas has deprecated .append for DataFrames since Version 1.4.0, meaning that loading a simbench grid now comes with the warning at "buses_at_sw = net.switch.bus.append(net.switch.element.loc[net.switch.et == "b"])" in extract_simbench_grid_from_csv.py". Should be done via concat

time_as_index does not work for sb.get_absolute_values

When using the function sb.get_absolute_values (from simbench.network.profiles) with the keyword arguments profiles_instead_of_study_cases=True and time_as_index=True, you run into a KeyError. This is because get_absolute_profiles_from_relative_profiles gets called twice for the "load" element (once each for "p_mw" and "q_mvar"). The first time, the column time will be deleted from the relative_profiles data frame, so the second time around, relative_profiles["time"] produces a KeyError.

Error loading simbench networks: AttributeError: 'pandapowerNet' instance has no attribute 'res_bus'

Hello again,

after updating to:

simbench 1.2.0 (from 1.1.0)
pandapower 2.2.2
pandas 1.1.1 (from 1.0.3)
numpy 1.19.1 (1.18.1)

I get almost the same issue as in #7

net = sb.get_simbench_net("1-LV-urban6--0-sw")
Traceback (most recent call last):

File "", line 1, in
net = sb.get_simbench_net("1-LV-urban6--0-sw")

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/simbench/networks/extract_simbench_grids_from_csv.py", line 367, in get_simbench_net
net = csv_data2pp(csv_data)

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/simbench/converter/csv_pp_converter.py", line 127, in csv_data2pp
_convert_elements_and_types(csv_data, net)

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/simbench/converter/csv_pp_converter.py", line 660, in _convert_elements_and_types
_rename_and_multiply_columns(input_data)

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/simbench/converter/csv_pp_converter.py", line 725, in _rename_and_multiply_columns
to_rename_and_multiply_tuples = _get_parameters_to_rename_and_multiply()

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/simbench/converter/csv_pp_converter.py", line 761, in _get_parameters_to_rename_and_multiply
_prepare_res_bus_table(dummy_net)

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/simbench/converter/pp_net_manipulation.py", line 387, in _prepare_res_bus_table
if net.res_bus.shape[0]:

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/pandapower/auxiliary.py", line 162, in getattr
cls=self.class.name, name=key

AttributeError: 'pandapowerNet' instance has no attribute 'res_bus'

As far as I understand in the function "_prepare_res_bus_table(dummy_net)" the if statement is trying to access net.res_bus, which is not defined/initialised. I can't find a initialisation of the result tables for net.

Error while loading simbench network

Hi,

I'm trying to run a simple test for simbench and just load a network:
image

However, i get the following error:
image

Any ideas? I have the latest package versions installed.

'pandapowerNet' instance has no attribute 'load_p'

Hi there, thank you for providing an excellent platform to simulate grid. i am trying simple code to use constant controller fro load and generator but i am facing this issue. your positive response will highly appreciated.

import simbench as sb
grid_code = "1-HV-urban--0-sw"
net = sb.get_simbench_net(grid_code)
profiles = sb.get_absolute_values(net, profiles_instead_of_study_cases = True)

load_p = profiles[("load","p_mw")]
load_q = profiles[("load","q_mvar")]
sgen_p = profiles[("sgen","p_mw")]

print (load_p)

import pandapower.timeseries as ts
from pandapower.control.controller.const_control import ConstControl
from pandapower.timeseries.data_sources.frame_data import DFData

ds = DFData(sgen_p)
ConstControl(net, "sgen", "p_mw", element_index=net.sgen.index, profile_name=sgen_p.columns, data_source = ds)

ds = DFData(load_p)
ConstControl(net, "load", "p_mw", element_index=net.load_p.index, profile_name=load_p.columns, data_source = ds)

ds = DFData(load_q)
ConstControl(net, "load", "q_mvar", element_index=net.load_q.index, profile_name=load_q.columns, data_source = ds)

ts.OutputWriter(net, output_path="./", output_file_type= ".json")
ts.run_timeseries(net)
error1

pandas problem

Loading a simbench network in python 3.7 with pandas version higher than and equals to the version of 1.1, an error occurs. Maybe you can have a look.

PandaPower and Matpower give different results for SimBench grids

I am using PandaPower to convert SimBench grids to the Matpower format, and I am trying to verify that I am doing it correctly.

Therefore, I compare the results obtained using PandaPower to those obtained with Matpower, but there are discrepancies between the two.

I have attached the Python and Matlab scripts that I use (the Matpower path in line 15 must be changed).

If I use the same scripts for the PandaPower example networks, I get absolute errors on the order of 1e-10. I have tested this for the smallest grids up to case1354pegase (https://pandapower.readthedocs.io/en/v2.6.0/networks.html). To be specific, I edit line 22 in the Python script and comment out lines 25, 28, and 38.

Looking at the branch results for 1-LV-rural1--2-no_sw, my impression is that when using PandaPower, more power is lost in the transformer connecting the external grid to the rest of the buses.

Perhaps there is some aspect of the PandaPower/SimBench datastructures that I'm missing?
mwe_2021_04_26.zip

Error when loading simbench net

When I run

net = sb.get_simbench_net('1-EHV-mixed--2-no_sw)

I get the following error:

Traceback (most recent call last):

File "c:\users\s792\documents\git_mathenergy_pybench\mathenergy_pybench\master_thesis_christoph\future_scenario_nep_c2030\ptg_instal_conv_gen_net_ext.py", line 30, in
net_simb = sb.get_simbench_net('1-EHV-mixed--2-no_sw')

File "c:\users\s792\documents\git_mathenergy_pybench\mathenergy_pybench\simbench\simbench\networks\extract_simbench_grids_from_csv.py", line 367, in get_simbench_net
net = csv_data2pp(csv_data)

File "c:\users\s792\documents\git_mathenergy_pybench\mathenergy_pybench\simbench\simbench\converter\csv_pp_converter.py", line 108, in csv_data2pp
_convert_measurement(csv_data)

File "c:\users\s792\documents\git_mathenergy_pybench\mathenergy_pybench\simbench\simbench\converter\csv_pp_converter.py", line 412, in _convert_measurement
data["Measurement"].loc[idx_trafo, "side"] = ["hv" if is_hv else "lv" for is_hv in are_hv]

File "C:\Users\s792\anaconda3\envs\gitpandapower\lib\site-packages\pandas\core\indexing.py", line 670, in setitem
iloc._setitem_with_indexer(indexer, value)

File "C:\Users\s792\anaconda3\envs\gitpandapower\lib\site-packages\pandas\core\indexing.py", line 1666, in _setitem_with_indexer
raise ValueError(

ValueError: cannot set using a multi-index selection indexer with a different length than the value

I got the error for pandas 1.1.3, 1.1.4 and 1.1.5.

Description of grids in dataset

Hi folks,

First of all thank you for publishing such a useful dataset. Realistic load profiles combined with the topology of the network on which they are situated is sorely needed.

For my own personal understanding of these datasets I think it would be nice to include some single line diagrams, and potentially a little more context as to what the various networks are, and how they are structured.

I am aware you can use simple_plot with pandapower, but I feel that doesn't provide as much information as diagrams and descriptions.

I am specifically interested in the LV grids

Weather data for renewables generation

First, I want to thank the whole team for their work. Simbench is a very useful dataset.

I want to combine the simbench dataset with the weather data for testing an analysis method.
For generating additional environmental condition profiles, I used weather stations near the geographic coordinates of the busses the wind power plants are connected. According to the simbench documentation, I tried to use weather data from DWD for 2011, 2012, and 2017. This way seems to fail because the wind profiles are very low correlated with the wind speed data from DWD.

Is there a way to get more detailed information on which data (year) is used to model renewables generation?

I tried it for the 1-HV-mixed grid but also need it for the EHV grid.

FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated

Hello,

i want to share the following FutureWarning that is thrown in the following environment:
We use simbench==1.4.0 together with pandapower==2.13.1 and pandas==2.1.4 in a python3.10 environment (see: https://gitlab.com/arl2/palaestrai/-/jobs/5888432431). That arises the following warning:

/opt/conda/lib/python3.10/site-packages/simbench/converter/csv_pp_converter.py:849: FutureWarning: The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.
  output_data[output_name] = pd.concat([output_data[output_name], input_data[

See: https://gitlab.com/arl2/palaestrai/-/jobs/5888432445

Maybe consider that, when developing further.

Regards

timezone

Currently all time series do not have any time zone information included. We should add this as otherwise it might be confusing dealing with daylight saving time.

Question: Integrating new load profiles

Thank you for the very useful library.
May I ask you what would be the best way if I want to integrate new load profiles to use with an existing benchmark grid in Simbench?

Thank you!

Error loading simbench networks

Hi SimBenchers,

I tried running the SimBench Tutorial simbench_grids_basics_and_usage.ipynb , but fail to load any network.

Specifically I ran the Jupyter code In [19]: and In [22]:.

pandas 1.0.3
numpy 1.18.1
pandapower 2.2.2
simbench 1.1.0

I get the following error:
AttributeError: 'pandapowerNet' instance has no attribute 'res_bus'

` sb_code2 = "1-HVMV-urban-all-0-no_sw" # urban hv grid with one connected mv grid which has the subnet 2.202
multi_voltage_grid = sb.get_simbench_net(sb_code2)
Traceback (most recent call last):

File "", line 2, in
multi_voltage_grid = sb.get_simbench_net(sb_code2)

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/simbench/networks/extract_simbench_grids_from_csv.py", line 367, in get_simbench_net
net = csv_data2pp(csv_data)

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/simbench/converter/csv_pp_converter.py", line 127, in csv_data2pp
_convert_elements_and_types(csv_data, net)

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/simbench/converter/csv_pp_converter.py", line 653, in _convert_elements_and_types
_rename_and_multiply_columns(input_data)

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/simbench/converter/csv_pp_converter.py", line 718, in _rename_and_multiply_columns
to_rename_and_multiply_tuples = _get_parameters_to_rename_and_multiply()

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/simbench/converter/csv_pp_converter.py", line 754, in _get_parameters_to_rename_and_multiply
_prepare_res_bus_table(dummy_net)

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/simbench/converter/pp_net_manipulation.py", line 387, in _prepare_res_bus_table
if net.res_bus.shape[0]:

File "/home/anaconda3/envs/env_panpow_py37/lib/python3.7/site-packages/pandapower/auxiliary.py", line 162, in getattr
cls=self.class.name, name=key

AttributeError: 'pandapowerNet' instance has no attribute 'res_bus'`

Is there a workaround?
Is the issue related to Issue #6 ?

Best wishes

Missing function 'pp.unsupplied_buses()'

When executing the tutorial simbench_grids_and_basic_usage.ipynb in line 13, I get the error message:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-13-50e6aefe7aa1> in <module>
      1 # print number of unsupplied buses
----> 2 unsupplied_buses = pp.unsupplied_buses(net)
      3 len(unsupplied_buses)

AttributeError: module 'pandapower' has no attribute 'unsupplied_buses'

Although this is seemingly an issue with the pandapower suite, I thought I'd mention it here since it occured when testing out SimBench.

Bug: Storage Profiles

This issue is discussed along with the example grid "1-LV-semiurb4--2-no_sw".

These are the hypotheses on which I am based:

  • The storages of this example grid include the PV plants and the batteries
  • The storage profiles, e.g. "Storage_PV5_H0-A", is generated by maximizing the self-consumption (in documentation section 3.5.5, 1st subsection). To maximize the self-consumption, the corresponding load profile must be taken into account. Therefore, to clarify the correlation, the storage profile names include the corresponding load profile name.
  • The storage profiles do not include the corresponding load profiles
  • storages and loads are with consumer based singing system

This behavior is expected for the active power of the storages:

  • the storage is used only to shift the PV infeed which exceeds the load consume to points of time in which the PV infeed is less than the load consume => the storage (PV and battery) always acts as generator and never as load. To let the profile be positive, the active power in the storage table is negative.
  • If the infeed of a storage exceeds the corresponding load consume, the PV power must exceed the load consume and SOC must already be 100% => abs(storage power) > abs(load power)
  • If SOC > 0%, the storages do infeed as much as possible => abs(storage power) = abs(load power)
  • If SOC = 0%, the PV power is less than the load consume => abs(storage power) < abs(load power)
  • Neglecting the energy difference of SOC at the beginning of the full year time series and at the ending, the energy infeed of the storages must be the same as the PV plants would have without batteries

Revealing the bug:

Refering to the last behavior expectation, the sum of profile "Storage_PV5_H0-A" (1st storage profile of the example grid) is 4548.6 but the sum of profile "PV5" is 2703.8.
These two graphs show the time series calculation for the first 4 days revealing that the storage power seems to be the corresponding load with a factor of around -2. If that is the case and the assumptions and expactation made above are ok, the storage profile values are to high and thus do not fit.
1-LV-semiurb4--2-no_sw 1  Speicher   Last Tag1-4
1-LV-semiurb4--2-no_sw Leistungssummen Tag1-4

Simbench not compatible with Pandapower Collection Plots

Hey,

i'm stated working with the simbench model. Thank you for all the hard work in creating this package!
I have noticed a incompatibility issue, when creating plots with collections (pandapower.plotting.draw_collections).

It seems there is a problem when plotting buses, loads or sgen, so all PatchCollection elements. Plotting LineCollection Elements is working, but as soon as i plot node elements it seems like the coords are not passed correctly. For example when plotting all busses i only get one big circle as plot.

Here is a minimal example code:

import pandapower as pp
import pandapower.networks as nw
import pandapower.plotting as plot
import matplotlib.pyplot as plt

import simbench as sb

net = sb.get_simbench_net("1-MV-rural--0-sw")
# net = nw.mv_oberrhein()
pp.runpp(net)

lc = plot.create_line_collection(net, net.line.index, use_bus_geodata=True)

bc = plot.create_bus_collection(net, net.bus.index)

plot.simple_plot(net)
plot.draw_collections([lc, bc])
plt.show()

This seems to happen with all networks (i tested several LV and MV networks). When changing the net to mv_overrhein everything is working as intended.

Repeating problems within various operations

C:\APPS\Anaconda3\envs\pandapower_env\lib\site-packages\simbench\converter\csv_pp_converter.py:390: FutureWarning: Index.or operating as a set operation is deprecated, in the future this will be a logical operation matching Series.or. Use index.union(other) instead
idx_bus = data["Measurement"].index.difference(idx_line | idx_trafo).astype(int)
C:\APPS\Anaconda3\envs\pandapower_env\lib\site-packages\simbench\converter\csv_pp_converter.py:468: FutureWarning: Index.or operating as a set operation is deprecated, in the future this will be a logical operation matching Series.or. Use index.union(other) instead
missing = csv_data["Line"].index.difference(idx_lines | idx_dclines)
C:\APPS\Anaconda3\envs\pandapower_env\lib\site-packages\simbench\converter\csv_pp_converter.py:472: FutureWarning: Index.and operating as a set operation is deprecated, in the future this will be a logical operation matching Series.and. Use index.intersection(other) instead
if len(idx_lines & idx_dclines):
C:\APPS\Anaconda3\envs\pandapower_env\lib\site-packages\simbench\converter\csv_pp_converter.py:829: FutureWarning: Index.or operating as a set operation is deprecated, in the future this will be a logical operation matching Series.or. Use index.union(other) instead
columns=input_data[corr_str].columns | Type_col_except_std_type)

AssertionError

Why I can't install PandaPower?, I follow the instructions of Youtube

(base) C:\Users\4PF96LA_RS6>pip install pandapower
Requirement already satisfied: pandapower in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (2.10.1)
Requirement already satisfied: packaging in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (from pandapower) (21.3)
Requirement already satisfied: pandas>=1.0 in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (from pandapower) (1.4.4)
Requirement already satisfied: numpy>=0.11 in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (from pandapower) (1.21.5)
Requirement already satisfied: tqdm in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (from pandapower) (4.64.1)
Requirement already satisfied: deepdiff in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (from pandapower) (6.2.1)
Requirement already satisfied: scipy in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (from pandapower) (1.9.1)
Requirement already satisfied: networkx>=2.5 in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (from pandapower) (2.8.4)
Requirement already satisfied: pytz>=2020.1 in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (from pandas>=1.0->pandapower) (2022.1)
Requirement already satisfied: python-dateutil>=2.8.1 in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (from pandas>=1.0->pandapower) (2.8.2)
Requirement already satisfied: ordered-set<4.2.0,>=4.0.2 in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (from deepdiff->pandapower) (4.1.0)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (from packaging->pandapower) (3.0.9)
Requirement already satisfied: colorama in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (from tqdm->pandapower) (0.4.5)
Requirement already satisfied: six>=1.5 in c:\users\4pf96la_rs6\anaconda3\lib\site-packages (from python-dateutil>=2.8.1->pandas>=1.0->pandapower) (1.16.0)

(base) C:\Users\4PF96LA_RS6>python
Python 3.9.13 (main, Aug 25 2022, 23:51:50) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.

import pandapower.test
pandapower.test.run_all_tests()
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages\pandapower\test\run_tests.py", line 55, in run_all_tests
pytest.main([test_dir, "-xs"])
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages_pytest\config_init_.py", line 145, in main
config = prepareconfig(args, plugins)
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages_pytest\config_init
.py", line 324, in _prepareconfig
config = pluginmanager.hook.pytest_cmdline_parse(
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages\pluggy_hooks.py", line 265, in call
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages\pluggy_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages\pluggy_callers.py", line 55, in multicall
gen.send(outcome)
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages_pytest\helpconfig.py", line 102, in pytest_cmdline_parse
config: Config = outcome.get_result()
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages\pluggy_result.py", line 60, in get_result
raise ex[1].with_traceback(ex[2])
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages\pluggy_callers.py", line 39, in multicall
res = hook_impl.function(*args)
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages_pytest\config_init
.py", line 1016, in pytest_cmdline_parse
self.parse(args)
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages_pytest\config_init
.py", line 1304, in parse
self.preparse(args, addopts=addopts)
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages_pytest\config_init
.py", line 1206, in _preparse
self.hook.pytest_load_initial_conftests(
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages\pluggy_hooks.py", line 265, in call
return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages\pluggy_manager.py", line 80, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages\pluggy_callers.py", line 60, in _multicall
return outcome.get_result()
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages\pluggy_result.py", line 60, in get_result
raise ex[1].with_traceback(ex[2])
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages\pluggy_callers.py", line 39, in multicall
res = hook_impl.function(*args)
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages_pytest\config_init
.py", line 1083, in pytest_load_initial_conftests
self.pluginmanager.set_initial_conftests(
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages_pytest\config_init
.py", line 529, in _set_initial_conftests
self.try_load_conftest(anchor, namespace.importmode, rootpath)
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages_pytest\config_init
.py", line 551, in _try_load_conftest
self.getconftestmodules(x, importmode, rootpath)
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages_pytest\config_init
.py", line 575, in _getconftestmodules
mod = self.importconftest(conftestpath, importmode, rootpath)
File "C:\Users\4PF96LA_RS6\anaconda3\lib\site-packages_pytest\config_init
.py", line 620, in _importconftest
assert mod not in mods
AssertionError

error on loadflow with backward forward sweep algorithm on simbench lv rural network

sb_net = "1-LV-rural1--0-sw" net = sb.get_simbench_net(sb_net) pp.runpp(net, algorithm='bfsw') print(net.res_bus)

on running the above code , i m getting the following error
Traceback (most recent call last):
File "d:/python rahat/osman boyaci/pp_try_four.py", line 37, in
pp.runpp(net, algorithm='bfsw')
File "C:\Users\Mairah\AppData\Local\Programs\Python\Python37\lib\site-packages\pandapower\run.py", line 232, in runpp
_powerflow(net, **kwargs)
File "C:\Users\Mairah\AppData\Local\Programs\Python\Python37\lib\site-packages\pandapower\powerflow.py", line 84, in _powerflow
result = _run_pf_algorithm(ppci, net["_options"], **kwargs)
File "C:\Users\Mairah\AppData\Local\Programs\Python\Python37\lib\site-packages\pandapower\powerflow.py", line 162, in _run_pf_algorithm
result = _run_bfswpf(ppci, options, **kwargs)[0]
File "C:\Users\Mairah\AppData\Local\Programs\Python\Python37\lib\site-packages\pandapower\pf\run_bfswpf.py", line 408, in _run_bfswpf
ppci, DLF, buses_ordered_bfs_nets = _get_bibc_bcbv(ppci, options, bus, branch, G)
File "C:\Users\Mairah\AppData\Local\Programs\Python\Python37\lib\site-packages\pandapower\pf\run_bfswpf.py", line 178, in _get_bibc_bcbv
DLF, buses_ordered_bfs_nets = make_bibc_bcbv(bus, branch, graph)
File "C:\Users\Mairah\AppData\Local\Programs\Python\Python37\lib\site-packages\pandapower\pf\run_bfswpf.py", line 149, in make_bibc_bcbv
shape=(nobranch, nobranch))
File "C:\Users\Mairah\AppData\Local\Programs\Python\Python37\lib\site-packages\scipy\sparse\compressed.py", line 54, in init
t

self._check()
File "C:\Users\Mairah\AppData\Local\Programs\Python\Python37\lib\site-packages\scipy\sparse\coo.py", line 289, in _check
raise ValueError('negative column index found')
ValueError: negative column index found

what could be the issue
kindly help

Unit conversion in simbench 1.4.0 update

Since the pandapower 2.0 update is processing All the loads in the Mw unit and the simbench Low voltage dataset is in Kw, I wanted to kindly ask if the unit conversion for load profiles is considered to be injected into Pandapower time series power flow.

If this issue exists I would appreciate to provide me with a solution for this purpose.

List of grid codes

Hi,

I'd like to search through all the simbench grids in a for loop to find some I like based on some criteria. To do that, I manually have to copy all grid codes. Is there a file or list or something, where all the existing grid codes are available and can be easily copied or loaded into python?

missing 25h of daylight saving time in relative profiles of powerplants

Hey,

applying the get_absolute_values() function produces NaN values for the last 4 quarterly-hour timesteps of generation.

The relative profiles seem to miss 4 steps for 'powerplants'. Is this connected with the time-change?
I used '1-EHV-mixed--0-sw' grid set.

Do you have a good workaround?

regards

net.loadcases

Hello,

I am using simbench as a test model. I do not know what does the net.loadcases mean?
net.loadcases
Out[207]:
pload qload Wind_p PV_p RES_p Slack_vm
Study Case
hL 1.0 1.000000 0.00 0.00 0.0 0.965
n1 1.0 1.000000 0.00 0.00 0.0 0.965
hW 1.0 1.000000 1.00 0.80 1.0 0.965
hPV 1.0 1.000000 0.85 0.95 1.0 0.965
lW 0.1 0.122543 1.00 0.80 1.0 1.055
lPV 0.1 0.122543 0.85 0.95 1.0 1.055

If I want remove all the default wind, PV, sgen generation, how can we make it? set value to 0?

Best,

Can't pass the test due to AssertionError in test_csv_pp_converter.py

I installed simbench and pandapower with pip but couldn't pass the test when executing the simbench.test.run_all_tests()

The error info is as follows.
image

ENVIRONMENT:
platform linux --

  1. Python 3.6.9
  2. pytest-6.0.1
  3. pluggy-0.13.1
  4. pandapower=2.2.0
  5. newest verison of simbench
  6. pandas = 1.1.0

Error using EHVHV grid with run_timeseries

Hi,

Thank you for all the hard work in maintaining this package!

I have stumbled upon an error when trying to use the 1-EHVHV-mixed-all-1-no_sw grid. See the following minimal example to reproduce the error:

import simbench as sb
from pandapower.timeseries.run_time_series import run_timeseries

# The first grid works, the second doesn't
working_grid = "1-EHVHV-mixed-all-0-no_sw"
non_working_grid = "1-EHVHV-mixed-all-1-no_sw"

net_working = sb.get_simbench_net(working_grid)
net_non_working = sb.get_simbench_net(non_working_grid)

profiles_working = sb.get_absolute_values(
    net_working, profiles_instead_of_study_cases=True
)
profiles_non_working = sb.get_absolute_values(
    net_non_working, profiles_instead_of_study_cases=True
)

sb.apply_const_controllers(net_working, profiles_working)
sb.apply_const_controllers(net_non_working, profiles_non_working)

# check that all needed profiles existent
assert not sb.profiles_are_missing(net_working)
assert not sb.profiles_are_missing(net_non_working)

timesteps = range(96)

# This run_timeseries should work
run_timeseries(net_working, timesteps)

# The following run_timeseries results in an error
run_timeseries(net_non_working, timesteps)

Trying to use the run_timeseries function from pandapower with the 1-EHVHV-mixed-all-1-no_sw grid results in the following error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "[...]/.venv/lib/python3.8/site-packages/pandapower/timeseries/run_time_series.py", line 346, in run_timeseries
    run_loop(net, ts_variables, **kwargs)
  File "[...]/.venv/lib/python3.8/site-packages/pandapower/timeseries/run_time_series.py", line 318, in run_loop
    run_time_step(net, time_step, ts_variables, run_control_fct, output_writer_fct, **kwargs)
  File "[...]/.venv/lib/python3.8/site-packages/pandapower/timeseries/run_time_series.py", line 121, in run_time_step
    run_control_fct(net, run_control=False, ctrl_variables=ts_variables, **kwargs)
  File "[...]/.venv/lib/python3.8/site-packages/pandapower/control/run_control.py", line 293, in run_control
    control_implementation(net, controller_order, ctrl_variables, max_iter, **kwargs)
  File "[...]/.venv/lib/python3.8/site-packages/pandapower/control/run_control.py", line 216, in control_implementation
    ctrl_variables = evaluate_net_fct(net, levelorder, ctrl_variables, **kwargs)
  File "[...]/.venv/lib/python3.8/site-packages/pandapower/control/run_control.py", line 180, in _evaluate_net
    run_funct(net, **kwargs)  # run can be runpp, runopf or whatever
  File "[...]/.venv/lib/python3.8/site-packages/pandapower/run.py", line 205, in runpp
    _recycled_powerflow(net, **kwargs)
  File "[...]/.venv/lib/python3.8/site-packages/pandapower/powerflow.py", line 121, in _recycled_powerflow
    _build_gen_ppc(net, ppc)
  File "[...]/.venv/lib/python3.8/site-packages/pandapower/build_gen.py", line 53, in _build_gen_ppc
    add_element_to_gen(net, ppc, element, f, t)
  File "[...]/.venv/lib/python3.8/site-packages/pandapower/build_gen.py", line 82, in add_element_to_gen
    _build_pp_gen(net, ppc, f, t)
  File "[...]/.venv/lib/python3.8/site-packages/pandapower/build_gen.py", line 198, in _build_pp_gen
    gen_buses = bus_lookup[net["gen"]["bus"].values[gen_is]]
IndexError: boolean index did not match indexed array along dimension 0; dimension is 338 but corresponding boolean dimension is 342

The same error also appears with 1-EHVHV-mixed-all-2-no_sw.

Can you have a look at what is going on?

I'm using pandapower 2.7.0 with Simbench 1.3.0.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.