diff --git a/config.default.yaml b/config.default.yaml index 0ec5e9fb..20c05727 100755 --- a/config.default.yaml +++ b/config.default.yaml @@ -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 diff --git a/scripts/simplify_network.py b/scripts/simplify_network.py index 2c7f8413..38446e46 100644 --- a/scripts/simplify_network.py +++ b/scripts/simplify_network.py @@ -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)