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

Isolated nodes in the PyPSA graph #48

Closed
gplssm opened this issue Sep 22, 2017 · 4 comments
Closed

Isolated nodes in the PyPSA graph #48

gplssm opened this issue Sep 22, 2017 · 4 comments
Assignees
Labels

Comments

@gplssm
Copy link
Contributor

gplssm commented Sep 22, 2017

Some grid districts (197, 1066, ...) have isolated node in the PyPSA graph thus multiple islanded grids result of this. Find the reason for some node not being connected to the remaining part of the grid and fix it. The isolated nodes are mostly buses of BranchTee()'s.

@gplssm gplssm added the bug label Sep 22, 2017
@gplssm gplssm self-assigned this Sep 22, 2017
@gplssm
Copy link
Contributor Author

gplssm commented Sep 22, 2017

This is an issue related to import_from_ding0() it 😏

With [_.node for _ in connected_component_subgraphs(network.mv_grid.graph)] you can see 4 subgraphs exist.

0 = {dict} {Generator_717: {'type': 'generator'}, LVStation_176765: {'type': 'lv_station'}, LVStation_176770: {'type': 'lv_station'}, Generator_720: {'type': 'generator'}, BranchTee_MVGrid_1066_2: {'type': 'branch_tee'}, LVStation_176709: {'type': 'lv_station'}, LVSt
1 = {dict} {BranchTee_MVGrid_1066_5: {'type': 'branch_tee'}}
2 = {dict} {MVDisconnectingPoint_1: {'type': 'disconnection_point'}}
3 = {dict} {MVDisconnectingPoint_2: {'type': 'disconnection_point'}}

We don't have to worry about the last two, but about the second. Somehow there appear unconnected BranchTee's

@gplssm
Copy link
Contributor Author

gplssm commented Sep 22, 2017

Hmm, maybe it's not a problem of the importer. We can see there are cable distributors included in Ding0's MV cable distributors list without being part of the MV graph. Therefore, put a break point in _build_mv_grid() and ask for

set(ding0_grid._cable_distributors) - set(ding0_grid._graph.nodes())

It will show mv_cable_dist_5 is not a node of the graph. Neither an isolated one.

@nesnoj do you have idea why the mv_cable_dist_5 is in the list but not in the graph?

A quick, dirty fix would be possible in eDisGo being asking if the node is part of the Ding0 graph, but I would prefer to solve it in Ding0 itself.

nesnoj added a commit to openego/ding0 that referenced this issue Sep 22, 2017
@nesnoj
Copy link
Member

nesnoj commented Sep 22, 2017

Thanks for discovering!

Fixed in openego/ding0@1bb0530 .
Reason: When CDs are disconnected from graph (procedure: connect -> check if branch constraints are violated -> if yes, disconnect), they were removed from graph but not from CD list in MV grid.

Please close if ok @gplssm

PS: I used

for cd in nd._mv_grid_districts[0].mv_grid._cable_distributors:
    if not nd._mv_grid_districts[0].mv_grid._graph.has_node(cd):
        print(repr(cd), 'is no member of graph')

to check if all CDs in MV grid list are member of the MV graph..

@gplssm
Copy link
Contributor Author

gplssm commented Sep 22, 2017

🍻 man!

@gplssm gplssm closed this as completed Sep 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants