Merge branch 'master' into update-entsoe-gridextract
This commit is contained in:
commit
49cd51f463
@ -313,6 +313,8 @@ def memory(w):
|
|||||||
break
|
break
|
||||||
if w.clusters.endswith('m'):
|
if w.clusters.endswith('m'):
|
||||||
return int(factor * (18000 + 180 * int(w.clusters[:-1])))
|
return int(factor * (18000 + 180 * int(w.clusters[:-1])))
|
||||||
|
elif w.clusters == "all":
|
||||||
|
return int(factor * (18000 + 180 * 4000))
|
||||||
else:
|
else:
|
||||||
return int(factor * (10000 + 195 * int(w.clusters)))
|
return int(factor * (10000 + 195 * int(w.clusters)))
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ def clustering_for_n_clusters(n, n_clusters, custom_busmap=False, aggregate_carr
|
|||||||
else:
|
else:
|
||||||
raise AttributeError(f"potential_mode should be one of 'simple' or 'conservative' but is '{potential_mode}'")
|
raise AttributeError(f"potential_mode should be one of 'simple' or 'conservative' but is '{potential_mode}'")
|
||||||
|
|
||||||
if not custom_busmap:
|
if not isinstance(custom_busmap, pd.Series):
|
||||||
busmap = busmap_for_n_clusters(n, n_clusters, solver_name, focus_weights, algorithm)
|
busmap = busmap_for_n_clusters(n, n_clusters, solver_name, focus_weights, algorithm)
|
||||||
else:
|
else:
|
||||||
busmap = custom_busmap
|
busmap = custom_busmap
|
||||||
@ -343,6 +343,9 @@ if __name__ == "__main__":
|
|||||||
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 = pd.Index(n.generators.carrier.unique()).difference(renewable_carriers)
|
aggregate_carriers = pd.Index(n.generators.carrier.unique()).difference(renewable_carriers)
|
||||||
|
elif snakemake.wildcards.clusters == 'all':
|
||||||
|
n_clusters = len(n.buses)
|
||||||
|
aggregate_carriers = None # All
|
||||||
else:
|
else:
|
||||||
n_clusters = int(snakemake.wildcards.clusters)
|
n_clusters = int(snakemake.wildcards.clusters)
|
||||||
aggregate_carriers = None # All
|
aggregate_carriers = None # All
|
||||||
|
Loading…
Reference in New Issue
Block a user