Open hazemakhalek opened 2 years ago
The issue is caused by function remove_stubs()
in simplify_network.py
The problem is already known I guess, but becomes much more apparent when you have a one-to-one comparison of the gadm clustered network with the OSM data. The problem arises because in the OSM data the lines and substations are not always connected and thus big parts of the network is disconnected and are considered as stubs to be removed.
This is the option I talked you about to increase the distance of the merged nodes. This may be relevant, for example, for the isolated node on the bottom left that is not expected to be isolated, I guess. I'd start by checking whether the tolerance is too small or whether there might be a bug somewhere.
For this issue I think there is no easy solution. My feeling is that we could add an option in the config to disable remove_stubs. The major concern in my opinion is the isolated bus in the south; missing lines in other regions may be justified by the expected behavior of that function
Checklist
main
branch or the latest release. Please indicate.pypsa-africa
environment. Update viaconda env update -f envs/environment.yaml
.Describe the Bug
Some lines are missing in the final representation of a tested country (Morocco) when comparing to clean osm data (possible when using gadm clustering)
Example
Notice the empty regions in the second plot