You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse the tutorials and tests for usefull code snippets and examples of use
Reproduced the issue after updating with pip install --upgrade pandapower (or git pull)
Tried basic troubleshooting (if a bug/error) like restarting the interpreter and checking the pythonpath
Reproducible Example
IusedthePFexporteronameshedlowvoltagegrid.
Issue Description and Traceback
The PowerFactory export GUI is a handy tool. Unfortunately there is a bug in the validation part of the exporter.
I used the following settings:
The following output get displayed in the PF console:
set 5 lines out of service
set 0 impedances out of service
running pandapower loadflow
pandapower net converged: True
Error while verifying net: Unalignable boolean Series provided as indexer (index of the boolean Series and of the indexed object do not match).
Traceback (most recent call last):
File "C:\Users\Heiner.Frueh\Documents\Test\Lib\site-packages\pandapower\converter\powerfactory\main_pf.py", line 195, in calc
run_verify(net)
File "C:\Users\Heiner.Frueh\Documents\Test\Lib\site-packages\pandapower\converter\powerfactory\main_pf.py", line 134, in run_verify
all_diffs = validate_pf_conversion(net, ** load_flow_params)
File "C:\Users\Heiner.Frueh\Documents\Test\Lib\site-packages\pandapower\converter\powerfactory\validate.py", line 269, in validate_pf_conversion
wrong_switches = net.res_switch. loc[
File "C:\Python311\Lib\site-packages\pandas\core\indexing.py", line 1153, in _getitem_
return self ._ getitem_axis(maybe_callable, axis=axis)
File "C:\Python311\Lib\site-packages\pandas\core\indexing.py", line 1375, in _getitem_axis
return self ._ getbool_axis(key, axis=axis)
File "C:\Python311\Lib\site-packages\pandas\core\indexing.py", line 1171, in _getbool_axis
key = check_bool_indexer(labels, key)
File "C:\Python311\Lib\site-packages\pandas\core\indexing.py", line 2575, in check_bool_indexer
raise IndexingError(
pandas.errors. IndexingError: Unalignable boolean Series provided as indexer (index of the boolean Series and of the indexed object do not match).
Python-Skript 'convert2pandapower' erfolgreich ausgeführt
For some unknown reason the number of switches is different between PF and PP. The bug is caused by lines 268-271 in converter/powerfactory/validate.py:
pf_closed = pf_results['pf_switch_status']
wrong_switches = net.res_switch.loc[
pf_closed != net.switch.loc[pf_closed.index, 'closed']
].index.values if 'res switch' in net.keys() else []
I fixed it by changing it into:
pf_closed = pf_results['pf_switch_status']
wrong_switches = pf_closed.loc[
pf_closed != net.switch.loc[pf_closed.index, 'closed']
].index.values if 'res switch' in net.keys() else []
Thank you very much! As far as I know this bug was also present in the previous version, where the option to replace low-impedance lines with switches was not yet present (at least not in the GUI).
Could you please also add an option to specify the accuracy of the validation output or the units (e.g. kVA instead of MVA), or make it dependet on the lowest nominal voltage? Our use case includes LV-grids, which are tricky to model in PF because of the many scaling factors that may or may not be present. Hence we would like to be able to see any differences in loadflow results after the export. Currently the validation is displayed with 0.1 MVA accuracy. I could also make a PR sometime next week for you to decide.
In case you need a pfd grid for testing, please get in contact with me :)
Bug report checklis
Searched the issues page for similar reports
Read the relevant sections of the documentation
Browse the tutorials and tests for usefull code snippets and examples of use
Reproduced the issue after updating with
pip install --upgrade pandapower
(orgit pull
)Tried basic troubleshooting (if a bug/error) like restarting the interpreter and checking the pythonpath
Reproducible Example
Issue Description and Traceback
The PowerFactory export GUI is a handy tool. Unfortunately there is a bug in the validation part of the exporter.
I used the following settings:
The following output get displayed in the PF console:
For some unknown reason the number of switches is different between PF and PP. The bug is caused by lines 268-271 in converter/powerfactory/validate.py:
I fixed it by changing it into:
Expected Behavior
I can see the rest of the validation output.
Installed Versions
DlgSILENT PowerFactory 2023
<style> </style>python: 3.11
pandapower: 2.14.6
Label
The text was updated successfully, but these errors were encountered: