Skip to content

Commit

Permalink
Merge pull request #479 from PyPSA/cluster-m
Browse files Browse the repository at this point in the history
cluster option 'm' only aggregates conventional carriers not excluded
  • Loading branch information
fneum authored Mar 5, 2023
2 parents e28e106 + 8512129 commit 2633b25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/cluster_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,10 @@ def plot_busmap_for_n_clusters(n, n_clusters, fn=None):
aggregate_carriers = set(n.generators.carrier) - set(exclude_carriers)
if snakemake.wildcards.clusters.endswith("m"):
n_clusters = int(snakemake.wildcards.clusters[:-1])
aggregate_carriers = snakemake.config["electricity"].get(
"conventional_carriers"
conventional = set(
snakemake.config["electricity"].get("conventional_carriers", [])
)
aggregate_carriers = conventional.intersection(aggregate_carriers)
elif snakemake.wildcards.clusters == "all":
n_clusters = len(n.buses)
else:
Expand Down

0 comments on commit 2633b25

Please sign in to comment.