fixup non-clustering of conventional generators

This commit is contained in:
Fabian 2023-04-27 10:10:30 +02:00
parent 85e02c9743
commit a6ae03d133
5 changed files with 11 additions and 4 deletions

View File

@ -40,7 +40,7 @@ localrules:
wildcard_constraints:
simpl="[a-zA-Z0-9]*",
clusters="[0-9]+m?|all",
clusters="[0-9]+(m|c)?|all",
ll="(v|c)([0-9\.]+|opt)",
opts="[-+a-zA-Z0-9\.]*",
sector_opts="[-+a-zA-Z0-9\.\s]*",

View File

@ -25,6 +25,7 @@ scenario:
- v1.0
clusters: # number of nodes in Europe, any integer between 37 (1 node per country-zone) and several hundred
- 37
- "37c"
# - 128
# - 256
# - 512

View File

@ -15,7 +15,7 @@ def memory(w):
if m is not None:
factor *= int(m.group(1)) / 8760
break
if w.clusters.endswith("m"):
if w.clusters.endswith("m") or w.clusters.endswith("c"):
return int(factor * (18000 + 180 * int(w.clusters[:-1])))
elif w.clusters == "all":
return int(factor * (18000 + 180 * 4000))

View File

@ -482,6 +482,12 @@ if __name__ == "__main__":
snakemake.config["electricity"].get("conventional_carriers", [])
)
aggregate_carriers = conventional.intersection(aggregate_carriers)
elif snakemake.wildcards.clusters.endswith("c"):
n_clusters = int(snakemake.wildcards.clusters[:-1])
conventional = set(
snakemake.config["electricity"].get("conventional_carriers", [])
)
aggregate_carriers = aggregate_carriers - conventional
elif snakemake.wildcards.clusters == "all":
n_clusters = len(n.buses)
else:

View File

@ -667,8 +667,8 @@ if __name__ == "__main__":
"solve_network",
# configfiles="test/config.overnight.yaml",
simpl="",
opts="",
clusters="37",
opts="Co2L",
clusters="37c",
ll="v1.0",
sector_opts="",
planning_horizons="2020",