cluster option 'm' only aggregates conventional carriers not excluded

This commit is contained in:
Fabian Neumann 2023-02-22 18:55:05 +01:00
parent e2ec25073a
commit 846049770e

View File

@ -478,9 +478,10 @@ if __name__ == "__main__":
aggregate_carriers = set(n.generators.carrier) - set(exclude_carriers) aggregate_carriers = set(n.generators.carrier) - set(exclude_carriers)
if snakemake.wildcards.clusters.endswith("m"): if snakemake.wildcards.clusters.endswith("m"):
n_clusters = int(snakemake.wildcards.clusters[:-1]) n_clusters = int(snakemake.wildcards.clusters[:-1])
aggregate_carriers = snakemake.config["electricity"].get( conventional = set(
"conventional_carriers" snakemake.config["electricity"].get("conventional_carriers", [])
) )
aggregate_carriers = conventional.intersection(aggregate_carriers)
elif snakemake.wildcards.clusters == "all": elif snakemake.wildcards.clusters == "all":
n_clusters = len(n.buses) n_clusters = len(n.buses)
else: else: