Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Wrong algorithm "id" for fdbx and fdxb (pypower fast decoupled) #2142

Closed
6 tasks done
BDonnot opened this issue Oct 3, 2023 · 1 comment · Fixed by #2156
Closed
6 tasks done

[bug] Wrong algorithm "id" for fdbx and fdxb (pypower fast decoupled) #2142

BDonnot opened this issue Oct 3, 2023 · 1 comment · Fixed by #2156
Labels

Comments

@BDonnot
Copy link
Contributor

BDonnot commented Oct 3, 2023

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 (or git pull)

  • Tried basic troubleshooting (if a bug/error) like restarting the interpreter and checking the pythonpath

Reproducible Example

# 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.

Issue Description and Traceback

In pandapower/pf/runpf_pypower.py line81 there is:

algorithm_pypower_dict = {'nr': 1, 'fdbx': 2, 'fdxb': 3, 'gs': 4}
see

algorithm_pypower_dict = {'nr': 1, 'fdbx': 2, 'fdxb': 3, 'gs': 4}

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

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

Expected Behavior

I think the code should be replaced by:

algorithm_pypower_dict = {'nr': 1, 'fdbx': 3, 'fdxb': 2, 'gs': 4}

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

  • Relevant labels are selected
@BDonnot BDonnot added the bug label Oct 3, 2023
@rbolgaryn
Copy link
Member

Hi @BDonnot, thank you! I will adjust it.

Best regards,
Roman

rbolgaryn added a commit to rbolgaryn/pandapower that referenced this issue Oct 24, 2023
rbolgaryn added a commit that referenced this issue Jan 2, 2024
bugfix powerflow algorithm id for fdxb, fdbx (closes #2142)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants