From dd470070a3a92a5ffb3428295397fe4ac2026915 Mon Sep 17 00:00:00 2001 From: ekatef Date: Tue, 21 Jan 2025 00:36:40 +0100 Subject: [PATCH 1/5] Remove supplementary data from lines dataframe --- scripts/build_osm_network.py | 4 ---- scripts/cluster_network.py | 2 -- 2 files changed, 6 deletions(-) diff --git a/scripts/build_osm_network.py b/scripts/build_osm_network.py index de88be8e5..91a66ef5f 100644 --- a/scripts/build_osm_network.py +++ b/scripts/build_osm_network.py @@ -32,14 +32,10 @@ LINES_COLUMNS = [ "line_id", "circuits", - "tag_type", "voltage", "bus0", "bus1", "length", - "underground", - "under_construction", - "tag_frequency", "dc", "country", "geometry", diff --git a/scripts/cluster_network.py b/scripts/cluster_network.py index 562b9cfa7..6d97216f6 100644 --- a/scripts/cluster_network.py +++ b/scripts/cluster_network.py @@ -736,8 +736,6 @@ def consense(x): "v_nom": "first", "lat": "mean", "lon": "mean", - "tag_substation": "first", - "tag_area": "first", "country": "first", }, ) From 05fb7ad46cdd2a2cf8ff118e4e0ec003c25debc0 Mon Sep 17 00:00:00 2001 From: ekatef Date: Tue, 21 Jan 2025 00:37:57 +0100 Subject: [PATCH 2/5] Update the clustering strategy --- scripts/simplify_network.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/simplify_network.py b/scripts/simplify_network.py index 502cf1b9d..9e3576388 100644 --- a/scripts/simplify_network.py +++ b/scripts/simplify_network.py @@ -1003,8 +1003,6 @@ def merge_isolated_nodes(n, threshold, aggregation_strategies=dict()): "v_nom": "first", "lat": "mean", "lon": "mean", - "tag_substation": "first", - "tag_area": "first", "country": "first", }, ) From 02be9ffbb9a32701ff1c8e097aa7b9dea9373473 Mon Sep 17 00:00:00 2001 From: ekatef Date: Tue, 21 Jan 2025 00:59:51 +0100 Subject: [PATCH 3/5] Improve dealing with the frequency field --- scripts/base_network.py | 4 ++++ scripts/build_osm_network.py | 1 + 2 files changed, 5 insertions(+) diff --git a/scripts/base_network.py b/scripts/base_network.py index e11ff83c6..dea56739b 100644 --- a/scripts/base_network.py +++ b/scripts/base_network.py @@ -492,6 +492,10 @@ def base_network( lines_ac = lines[lines.tag_frequency.astype(float) != 0].copy() lines_dc = lines[lines.tag_frequency.astype(float) == 0].copy() + # avoiding the conflicts in processing the network model + lines_ac = lines_ac.drop(["tag_frequency"], axis=1) + lines_dc = lines_dc.drop(["tag_frequency"], axis=1) + lines_ac = _set_electrical_parameters_lines(lines_config, voltages_config, lines_ac) lines_dc = _set_electrical_parameters_dc_lines( diff --git a/scripts/build_osm_network.py b/scripts/build_osm_network.py index 91a66ef5f..f3fb1ca77 100644 --- a/scripts/build_osm_network.py +++ b/scripts/build_osm_network.py @@ -36,6 +36,7 @@ "bus0", "bus1", "length", + "tag_frequency", "dc", "country", "geometry", From 2b0492d7644a779b856b2f780a01b6acfad4a7c7 Mon Sep 17 00:00:00 2001 From: ekatef Date: Tue, 21 Jan 2025 09:57:07 +0100 Subject: [PATCH 4/5] Remove redundand use of the frequency tag --- scripts/base_network.py | 9 ++------- scripts/build_osm_network.py | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/base_network.py b/scripts/base_network.py index dea56739b..2c4aa6afd 100644 --- a/scripts/base_network.py +++ b/scripts/base_network.py @@ -489,13 +489,8 @@ def base_network( transformers = _load_transformers_from_osm(inputs.osm_transformers, buses) converters = _load_converters_from_osm(inputs.osm_converters, buses) - lines_ac = lines[lines.tag_frequency.astype(float) != 0].copy() - lines_dc = lines[lines.tag_frequency.astype(float) == 0].copy() - - # avoiding the conflicts in processing the network model - lines_ac = lines_ac.drop(["tag_frequency"], axis=1) - lines_dc = lines_dc.drop(["tag_frequency"], axis=1) - + lines_ac = lines[~lines.dc].copy() + lines_dc = lines[lines.dc].copy() lines_ac = _set_electrical_parameters_lines(lines_config, voltages_config, lines_ac) lines_dc = _set_electrical_parameters_dc_lines( diff --git a/scripts/build_osm_network.py b/scripts/build_osm_network.py index f3fb1ca77..91a66ef5f 100644 --- a/scripts/build_osm_network.py +++ b/scripts/build_osm_network.py @@ -36,7 +36,6 @@ "bus0", "bus1", "length", - "tag_frequency", "dc", "country", "geometry", From 834cd92f96c0916f07551eb2c1ff3750c7e108a0 Mon Sep 17 00:00:00 2001 From: ekatef Date: Tue, 21 Jan 2025 15:37:49 +0100 Subject: [PATCH 5/5] Add release note --- doc/release_notes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index b28b545b5..7d8be983c 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -25,6 +25,8 @@ This part of documentation collects descriptive release notes to capture the mai **Minor Changes and bug-fixing** +* Align structure of the components with consistency checks in the updated PyPSA version `PR #1315 `__ + * Prevent computation of powerplantmatching if replace option is selected for custom_powerplants `PR #1281 `__ * Fix overlapping bus regions when alternative clustering is selected `PR #1287 `__