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
Clustering problems for regions with few buses/lines #554
Comments
With the new implementation of #632 this problem becomes easily more frequent; running NG withdefault dropping parameters leads with a single isolated bus left disconnected that gets disconnected and triggers this issue. |
I'm trying to reproduce an error for Rwanda with 5 clusters, but it works (config corresponds to Although, there is a problem if @davide-f, could you please give some more hints on how to reproduce exactly this issue: should it be NG with 5 clusters and |
Thanks katia! |
@davide-f, super, thanks a lot for the detailed description! Current reproducibility issues sound intriguing :) I'll experiment with it and hopefully we'll have some material to better capture and fix them |
This issue appears if the clustering algorithm obtains a set of isolated buses. That is caused by definition of interlines as The Apparently, the clustering algorithm with As for reproducibility, it feels like a somewhat probabilistic output of clustering means difficulties in reproducing the results |
A solution would be probably to check A case with links could need some additional attention as links seems to be treated by sub-networks in a bit special way |
Nice! :D |
This issue seems to be quite needed to fix as it is affecting the CI in this PR with a simple fix #654 |
Thanks for notifying 🙂 |
Have introduced a quick fix. It is functional but I'm not sure that is the best approach as it kind of justify having isolated clusters. My feeling is that it's worth to issue a warning at least if the network is reduced to some disconnected clusters. But it doesn't feel right to introduce too much changes into PyPSA source code for that Probably, it would be better to move this fixing into |
Update: troubles with network connectivity are not linked with the drafted PyPSA fix. Checked on an environment version which doesn't include PyPSA-fix It looks like reducing the network for some disconnected nodes is a result of lower threshold set for drop and merge nodes. The "cannot-insert" issue appears if a number of clusters set to minimal possible value Increasing a number of clusters resolve this issue as along with isolated buses, there is an additional network: That corresponds to the main assumptions used for the fix, namely empty |
This should be fixed with PyPSA/PyPSA#599 |
Closing this as it is already fixed into pypsa main and soon available into conda. |
Checklist
main
branch or the latest release. Please indicate.pypsa-earth
environment. Update viaconda env update -f envs/environment.yaml
.Describe the Bug
When running the workflow for some countries, such as Rwanda, and relatively few clusters (5) or Gabon, errors in the workflow occur, such as the one mentioned here: PyPSA/PyPSA#531
The simplification and clustering shall be revised
Error Message
If applicable, paste any terminal output to help illustrating your problem.
In some cases it may also be useful to share your list of installed packages:
conda list
.The text was updated successfully, but these errors were encountered: