update Fabians comments

This commit is contained in:
Philipp Glaum 2022-09-19 11:46:58 +02:00
parent 24e008a98e
commit d51ca8695b
5 changed files with 13 additions and 8 deletions

View File

@ -258,10 +258,11 @@ clustering:
to_substations: false # network is simplified to nodes with positive or negative power injection (i.e. substations or offwind connections)
algorithm: kmeans # choose from: [hac, kmeans]
feature: solar+onwind-time # only for hac. choose from: [solar+onwind-time, solar+onwind-cap, solar-time, solar-cap, solar+offwind-cap] etc.
exclude_carriers: []
cluster_network:
algorithm: kmeans
feature: solar+onwind-time
exclude_carriers: [] # list of carriers which will not be aggregated. If empty, all carriers will be aggregated.
exclude_carriers: []
aggregation_strategies:
generators:
p_nom_max: sum # use "min" for more conservative assumptions

View File

@ -188,10 +188,11 @@ clustering:
to_substations: false # network is simplified to nodes with positive or negative power injection (i.e. substations or offwind connections)
algorithm: kmeans # choose from: [hac, kmeans]
feature: solar+onwind-time # only for hac. choose from: [solar+onwind-time, solar+onwind-cap, solar-time, solar-cap, solar+offwind-cap] etc.
exclude_carriers: []
cluster_network:
algorithm: kmeans
feature: solar+onwind-time
exclude_carriers: [] # list of carriers which will not be aggregated. If empty, all carriers will be aggregated.
exclude_carriers: []
aggregation_strategies:
generators:
p_nom_max: sum # use "min" for more conservative assumptions

View File

@ -3,9 +3,11 @@ simplify_network,,,
-- to_substations,bool,"{'true','false'}","Aggregates all nodes without power injection (positive or negative, i.e. demand or generation) to electrically closest ones"
-- algorithm,str,"One of {kmeans, hac, modularity}",
-- feature,str,"Str in the format carrier1+carrier2+...+carrierN-X, where CarrierI can be from {solar, onwind, offwind, ror} and X is one of {cap, time}.",
cluster_network
-- exclude_carriers,list,"List of Str like [ 'solar', 'onwind'] or empy list []","List of carriers which will not be aggregated. If empty, all carriers will be aggregated."
cluster_network,,,
-- algorithm,str,"One of {kmeans, hac}",
-- feature,str,"Str in the format carrier1+carrier2+...+carrierN-X, where CarrierI can be from {solar, onwind, offwind, ror} and X is one of {cap, time}.",
-- exclude_carriers,list,"List of Str like [ 'solar', 'onwind'] or empy list []","List of carriers which will not be aggregated. If empty, all carriers will be aggregated."
aggregation_strategies,,,
-- generators,,,
-- -- {key},str,"{key} can be any of the component of the generator (str). Its value can be any that can be converted to pandas.Series using getattr(). For example one of {min, max, sum}.","Aggregates the component according to the given strategy. For example, if sum, then all values within each cluster are summed to represent the new generator."

Can't render this file because it has a wrong number of fields in line 6.

View File

@ -393,7 +393,8 @@ if __name__ == "__main__":
for tech in n.generators.carrier.unique()
if tech in snakemake.config['renewable']])
aggregate_carriers=set(n.carriers.index)-set(snakemake.config["clustering"]["exclude_carriers"])
exclude_carriers = snakemake.config["clustering"]["cluster_network"].get("exclude_carriers", [])
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")

View File

@ -211,7 +211,7 @@ def _aggregate_and_move_components(n, busmap, connection_costs_to_bus, output,
_, generator_strategies = get_aggregation_strategies(aggregation_strategies)
carriers=set(n.carriers.index)-set(exclude_carriers)
carriers = set(n.generators.carrier) - set(exclude_carriers)
generators, generators_pnl = aggregategenerators(
n, busmap, carriers=carriers, custom_strategies=generator_strategies
)
@ -321,7 +321,7 @@ def simplify_links(n, costs, config, output, aggregation_strategies=dict()):
logger.debug("Collecting all components using the busmap")
exclude_carriers=config["clustering"]["exclude_carriers"]
exclude_carriers = config["clustering"]["simplify_network"].get("exclude_carriers", [])
_aggregate_and_move_components(n, busmap, connection_costs_to_bus, output,
aggregation_strategies=aggregation_strategies, exclude_carriers=exclude_carriers)
return n, busmap
@ -333,7 +333,7 @@ def remove_stubs(n, costs, config, output, aggregation_strategies=dict()):
connection_costs_to_bus = _compute_connection_costs_to_bus(n, busmap, costs, config)
exclude_carriers=config["clustering"]["exclude_carriers"]
exclude_carriers = config["clustering"]["simplify_network"].get("exclude_carriers", [])
_aggregate_and_move_components(n, busmap, connection_costs_to_bus, output,
aggregation_strategies=aggregation_strategies, exclude_carriers=exclude_carriers)