Skip to content

Update cluster_network to avoid adding deleted links in clustered net…#678

Merged
fneum merged 1 commit intoPyPSA:masterfrom
davide-f:fix_clustering_LT
Jun 9, 2023
Merged

Update cluster_network to avoid adding deleted links in clustered net…#678
fneum merged 1 commit intoPyPSA:masterfrom
davide-f:fix_clustering_LT

Conversation

@davide-f
Copy link
Copy Markdown
Contributor

@davide-f davide-f commented Jun 9, 2023

Closes # (if applicable).

Changes proposed in this Pull Request

While testing PyPSA-Earth, I found a bug in the links clustering detailed in pypsa-meets-earth/pypsa-earth#735.
In particular, in the specific case, I clustered the LT network into 5 nodes and after the clustering, the unique link was connected to the same bus, so it was dropped and no links where available.
However, in performing the calculation to add the underground water, the old link was added with nan values because no dropna() was added.
This PR fixes that.

I don't think this needs a release_note, though, let me know

Checklist

  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in all of config.default.yaml.
  • Changes in configuration options are also documented in doc/configtables/*.csv.
  • A release note doc/release_notes.rst is added.

@fneum fneum enabled auto-merge June 9, 2023 15:30
@fneum fneum merged commit 778f850 into PyPSA:master Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants