pypsa-eur icon indicating copy to clipboard operation
pypsa-eur copied to clipboard

`remove_stubs: false` not supported

Open koen-vg opened this issue 1 year ago • 2 comments

Checklist

  • [x] I am using the current master branch or the latest release. Please indicate.
  • [x] I am running on an up-to-date pypsa-eur environment. Update via conda env update -f envs/environment.yaml.

Describe the Bug

It must have a been a while ago that the clustering["simplify_network"]["remove_stubs"] configuration option actually worked. Right now, when set to false, the workflow actually crashes because the connection_costs output of the simplify_network rule is never produced. (This output is written by the _adjust_capital_costs_using_connection_costs function, which, slightly indirectly, is only run when the remove_stubs option is enabled.)

Moreover, when I was playing around with the option, I found several problems later in the workflow too for sector-coupled networks, apparently mostly related to DC offshore wind buses that are stubs and usually merged with onshore AC buses, but lead to problems when remove_stubs: false. This is the case only for certain countries (Germany, Sweden, possibly more).

One option would be to remove the choice altogether and just remove the configuration option.

On the other hand, not removing stubs actually helps quite a bit with the spatial representation of Northern Norway, which is the reason for me to look into the option in the first place. Right now I sort of hacked together a solution where stubs are removed everywhere but in Norway, and this basically works for me.

I'm not exactly sure what the best solution for the project overall is. If nobody else is interested in having networks with stubs, it's probably best to just remove the configuration option. If it's a clear ambition that stubs should be supported, however, the lack of functionality should at least be mentioned in the documentation.

koen-vg avatar Jan 03 '24 15:01 koen-vg

Just to illustrate what I mean, here the topology of a network I'm currently working with. When stubs are removed, every node north of Lofoten (i.e. all the upper "tree-like" network extensions) are merged into more southern nodes, unfortunately removing any kind of spatial resolution in the representation of wind capacity factors, etc. bilde

koen-vg avatar Jan 03 '24 15:01 koen-vg

If any of the above ideas or something else is preferred, I'd be happy to draft and submit a pull request.

koen-vg avatar Jan 23 '24 09:01 koen-vg

closed by #1031? reopen if that's not the case

fneum avatar Apr 18 '24 07:04 fneum