simplify_networks: add control for removing stubs
This commit is contained in:
parent
27d4af8e65
commit
e9f3d20432
@ -262,6 +262,8 @@ clustering:
|
||||
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: []
|
||||
remove_stubs: true
|
||||
remove_stubs_across_borders: true
|
||||
cluster_network:
|
||||
algorithm: kmeans
|
||||
feature: solar+onwind-time
|
||||
|
@ -395,7 +395,9 @@ def simplify_links(n, costs, config, output, aggregation_strategies=dict()):
|
||||
def remove_stubs(n, costs, config, output, aggregation_strategies=dict()):
|
||||
logger.info("Removing stubs")
|
||||
|
||||
busmap = busmap_by_stubs(n) # ['country'])
|
||||
across_borders = config["clustering"]["simplify_network"].get("remove_stubs_across_borders", True)
|
||||
matching_attrs = [] if across_borders else ['country']
|
||||
busmap = busmap_by_stubs(n, matching_attrs)
|
||||
|
||||
connection_costs_to_bus = _compute_connection_costs_to_bus(n, busmap, costs, config)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user