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

added failing test for select_subnet with switch results #2251

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Change Log

[upcoming release] - 2024-..-..
-------------------------------
- [FIXED] handling of switch results in :code:`pp.toolbox.select_subnet`
- [ADDED] DERController with multiple options to define DER reactive power provision depending on P and V
- [ADDED] switch results p and q
- [ADDED] PowerFactory converter: option to export lines with sections as a single line with averaged-out impedance, or export line sections as separate individual lines
Expand Down
9 changes: 9 additions & 0 deletions pandapower/test/toolbox/test_grid_modification.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,15 @@ def test_select_subnet():
subnet = pp.select_subnet(net2, buses | elements)
assert net2.switch[net2.switch.et == 'b'].index.isin(subnet.switch.index).all()

pp.runpp(net2)
net3 = pp.select_subnet(net2, [0, 1], include_results=True)
assert len(net3.res_switch) > 0
assert net3.switch.index.equals(net3.res_switch.index)

net3 = pp.select_subnet(net2, [0, 1], include_results=True, keep_everything_else=True)
assert len(net3.res_switch) > 0
assert net3.switch.index.equals(net3.res_switch.index)


def test_add_zones_to_elements():
net = nw.create_cigre_network_mv()
Expand Down
Loading