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

Conversation

rbolgaryn
Copy link
Member

No description provided.

@rbolgaryn rbolgaryn added the bug label Apr 2, 2024
@rbolgaryn rbolgaryn self-assigned this Apr 2, 2024
@vogt31337
Copy link
Contributor

Looks good @rbolgaryn, can you resolve the current conflicts and then we can accept it.

@rbolgaryn
Copy link
Member Author

Looks good @rbolgaryn, can you resolve the current conflicts and then we can accept it.

fixed the conflicts

@rbolgaryn rbolgaryn requested a review from hilbrich July 26, 2024 12:56
@rbolgaryn
Copy link
Member Author

# TODO: drop switches from the full grid that are not relevant

sw_to_drop = list(set(net_cut.res_switch.index) - set(net_cut.switch.index))
net_cut.res_switch.drop(sw_to_drop, inplace=True)
missing = list(set(net_cut.switch.index) - set(net_cut.res_switch.index))
for i in missing:
    net_cut.res_switch.loc[i, ["pf_closed", "pf_in_service"]] = True, True
net_cut.res_switch = net_cut.res_switch.loc[net_cut.switch.index]
# TODO: drop controllers for transformers in the full grid that are not relevant
for i in net_cut.controller.index.values:
    c = net_cut.controller.at[i, "object"]
    if isinstance(c, pp.control.TrafoController):
        if c.trafotype=="2W" and c.tid not in net_cut.trafo.index.values:
            net_cut.controller.drop([i], inplace=True)
        elif c.trafotype=="3W" and c.tid not in net_cut.trafo3w.index.values:
            net_cut.controller.drop([i], inplace=True)

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 this pull request may close these issues.

None yet

3 participants