update Fabians comments
This commit is contained in:
parent
24e008a98e
commit
d51ca8695b
@ -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)
|
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]
|
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.
|
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:
|
cluster_network:
|
||||||
algorithm: kmeans
|
algorithm: kmeans
|
||||||
feature: solar+onwind-time
|
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:
|
aggregation_strategies:
|
||||||
generators:
|
generators:
|
||||||
p_nom_max: sum # use "min" for more conservative assumptions
|
p_nom_max: sum # use "min" for more conservative assumptions
|
||||||
|
@ -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)
|
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]
|
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.
|
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:
|
cluster_network:
|
||||||
algorithm: kmeans
|
algorithm: kmeans
|
||||||
feature: solar+onwind-time
|
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:
|
aggregation_strategies:
|
||||||
generators:
|
generators:
|
||||||
p_nom_max: sum # use "min" for more conservative assumptions
|
p_nom_max: sum # use "min" for more conservative assumptions
|
||||||
|
@ -3,11 +3,13 @@ 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"
|
-- 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‘}",
|
-- 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’}.",
|
-- 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’}",
|
-- 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’}.",
|
-- 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,,,
|
aggregation_strategies,,,
|
||||||
-- generators,,,
|
-- generators,,,
|
||||||
-- -- {key},str,"{key} can be any of the component of the generator (str). It’s 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."
|
-- -- {key},str,"{key} can be any of the component of the generator (str). It’s 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."
|
||||||
-- buses,,,
|
-- buses,,,
|
||||||
-- -- {key},str,"{key} can be any of the component of the bus (str). It’s 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 bus."
|
-- -- {key},str,"{key} can be any of the component of the bus (str). It’s 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 bus."
|
Can't render this file because it has a wrong number of fields in line 6.
|
@ -393,7 +393,8 @@ if __name__ == "__main__":
|
|||||||
for tech in n.generators.carrier.unique()
|
for tech in n.generators.carrier.unique()
|
||||||
if tech in snakemake.config['renewable']])
|
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'):
|
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_carriers")
|
aggregate_carriers = snakemake.config["electricity"].get("conventional_carriers")
|
||||||
|
@ -211,7 +211,7 @@ def _aggregate_and_move_components(n, busmap, connection_costs_to_bus, output,
|
|||||||
|
|
||||||
_, generator_strategies = get_aggregation_strategies(aggregation_strategies)
|
_, 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(
|
generators, generators_pnl = aggregategenerators(
|
||||||
n, busmap, carriers=carriers, custom_strategies=generator_strategies
|
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")
|
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,
|
_aggregate_and_move_components(n, busmap, connection_costs_to_bus, output,
|
||||||
aggregation_strategies=aggregation_strategies, exclude_carriers=exclude_carriers)
|
aggregation_strategies=aggregation_strategies, exclude_carriers=exclude_carriers)
|
||||||
return n, busmap
|
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)
|
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,
|
_aggregate_and_move_components(n, busmap, connection_costs_to_bus, output,
|
||||||
aggregation_strategies=aggregation_strategies, exclude_carriers=exclude_carriers)
|
aggregation_strategies=aggregation_strategies, exclude_carriers=exclude_carriers)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user