From cefc09ce5e6afe2ad5b4a60aa3552dcc376dbcc6 Mon Sep 17 00:00:00 2001 From: ekatef Date: Sun, 21 Jul 2024 16:54:55 +0200 Subject: [PATCH] Define an explicit clustering strategy for v_nom --- scripts/cluster_network.py | 3 ++- scripts/simplify_network.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/cluster_network.py b/scripts/cluster_network.py index ef6369a58..d6466e47f 100644 --- a/scripts/cluster_network.py +++ b/scripts/cluster_network.py @@ -740,12 +740,13 @@ def consense(x): update_config_dictionary( config_dict=aggregation_strategies, parameter_key_to_fill="lines", - dict_to_use={"geometry": "first", "bounds": "first"}, + dict_to_use={"v_nom": "first", "geometry": "first", "bounds": "first"}, ) update_config_dictionary( config_dict=aggregation_strategies, parameter_key_to_fill="buses", dict_to_use={ + "v_nom": "first", "lat": "mean", "lon": "mean", "tag_substation": "first", diff --git a/scripts/simplify_network.py b/scripts/simplify_network.py index de051f151..ac02e836d 100644 --- a/scripts/simplify_network.py +++ b/scripts/simplify_network.py @@ -993,12 +993,13 @@ def merge_isolated_nodes(n, threshold, aggregation_strategies=dict()): update_config_dictionary( config_dict=aggregation_strategies, parameter_key_to_fill="lines", - dict_to_use={"geometry": "first", "bounds": "first"}, + dict_to_use={"v_nom": "first", "geometry": "first", "bounds": "first"}, ) update_config_dictionary( config_dict=aggregation_strategies, parameter_key_to_fill="buses", dict_to_use={ + "v_nom": "first", "lat": "mean", "lon": "mean", "tag_substation": "first",