Closed BDonnot closed 9 months ago
[X] Searched the issues page for similar reports
[X] Read the relevant sections of the documentation
[X] Browse the tutorials and tests for usefull code snippets and examples of use
[X] Reproduced the issue after updating with pip install --upgrade pandapower (or git pull)
pip install --upgrade pandapower
git pull
[X] Tried basic troubleshooting (if a bug/error) like restarting the interpreter and checking the pythonpath
# I had to dive deep in the code to find this error, it's not reproducible "as is" as it is a mixed up between fdxb and fdbx somewhere in a file.
In pandapower/pf/runpf_pypower.py line81 there is:
algorithm_pypower_dict = {'nr': 1, 'fdbx': 2, 'fdxb': 3, 'gs': 4} see https://github.com/e2nIEE/pandapower/blob/80ca87dbb991c682f56e48ea90ea4035be3dff6c/pandapower/pf/runpf_pypower.py#L81
This would imply that fdbx is the algorithm id 2.
But I think "fdxb" and "fdbx" are mixed up. Indeed:
In pypower (module pandapower/pypower), it is written that alg==2 is XB method, see for example: https://github.com/e2nIEE/pandapower/blob/80ca87dbb991c682f56e48ea90ea4035be3dff6c/pandapower/pypower/makeB.py#L36C7-L36C8
alg==2
We can also see that the XB method is alg 2 here: https://github.com/e2nIEE/pandapower/blob/80ca87dbb991c682f56e48ea90ea4035be3dff6c/pandapower/pypower/ppoption.py#L14C1-L14C1
I think the code should be replaced by:
algorithm_pypower_dict = {'nr': 1, 'fdbx': 3, 'fdxb': 2, 'gs': 4}
I just look at the code in the repo, so all version with current code are concerned (and this bug probably originates a long time ago)
Hi @Bdonnot, thank you! I will adjust it.
Best regards, Roman
Bug report checklis
[X] Searched the issues page for similar reports
[X] Read the relevant sections of the documentation
[X] Browse the tutorials and tests for usefull code snippets and examples of use
[X] Reproduced the issue after updating with
pip install --upgrade pandapower
(orgit pull
)[X] Tried basic troubleshooting (if a bug/error) like restarting the interpreter and checking the pythonpath
Reproducible Example
Issue Description and Traceback
In pandapower/pf/runpf_pypower.py line81 there is:
This would imply that fdbx is the algorithm id 2.
But I think "fdxb" and "fdbx" are mixed up. Indeed:
In pypower (module pandapower/pypower), it is written that
alg==2
is XB method, see for example: https://github.com/e2nIEE/pandapower/blob/80ca87dbb991c682f56e48ea90ea4035be3dff6c/pandapower/pypower/makeB.py#L36C7-L36C8We can also see that the XB method is alg 2 here: https://github.com/e2nIEE/pandapower/blob/80ca87dbb991c682f56e48ea90ea4035be3dff6c/pandapower/pypower/ppoption.py#L14C1-L14C1
Expected Behavior
I think the code should be replaced by:
Installed Versions
I just look at the code in the repo, so all version with current code are concerned (and this bug probably originates a long time ago)
Label