From 29fe0fb7fb8ab34cde94dc01ca947cece2ed924c Mon Sep 17 00:00:00 2001 From: martacki Date: Mon, 27 Jun 2022 21:02:45 +0200 Subject: [PATCH] hierarchical clustering: account for changes from merging master --- scripts/cluster_network.py | 1 + scripts/simplify_network.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/cluster_network.py b/scripts/cluster_network.py index b1bf759d..59641a7e 100644 --- a/scripts/cluster_network.py +++ b/scripts/cluster_network.py @@ -12,6 +12,7 @@ Relevant Settings .. code:: yaml clustering: + cluster_network: aggregation_strategies: focus_weights: diff --git a/scripts/simplify_network.py b/scripts/simplify_network.py index 7e258966..0b31e5c6 100644 --- a/scripts/simplify_network.py +++ b/scripts/simplify_network.py @@ -14,7 +14,8 @@ Relevant Settings .. code:: yaml clustering: - simplify: + simplify_network: + cluster_network: aggregation_strategies: costs: @@ -415,7 +416,7 @@ if __name__ == "__main__": busmaps = [trafo_map, simplify_links_map, stub_map] cluster_config = snakemake.config.get('clustering', {}).get('simplify_network', {}) - if cluster_config.get('clustering', {}).get('simplify', {}).get('to_substations', False): + if cluster_config.get('clustering', {}).get('simplify_network', {}).get('to_substations', False): n, substation_map = aggregate_to_substations(n, aggregation_strategies) busmaps.append(substation_map) @@ -429,7 +430,7 @@ if __name__ == "__main__": for carrier in carriers: buses_i = list(set(n.buses.index)-set(n.generators.query("carrier == @carrier").bus)) logger.info(f'clustering preparaton (hac): aggregating {len(buses_i)} buses of type {carrier}.') - n, busmap_hac = aggregate_to_substations(n, buses_i) + n, busmap_hac = aggregate_to_substations(n, aggregation_strategies, buses_i) busmaps.append(busmap_hac) if snakemake.wildcards.simpl: