From 27d4af8e6574d8b39f1a442caa37d896ff1ae876 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 28 Dec 2022 09:31:48 +0100 Subject: [PATCH 1/9] entsoegridkit: additional parameter corrections --- data/parameter_corrections.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/data/parameter_corrections.yaml b/data/parameter_corrections.yaml index b50fc03a..850d060b 100644 --- a/data/parameter_corrections.yaml +++ b/data/parameter_corrections.yaml @@ -36,12 +36,19 @@ Link: "5583": "7428" # bus0 == bus1 to remove link in remove_unconnected_components (Sardinia) "13588": "7428" # bus0 == bus1 to remove link in remove_unconnected_components (Sardinia) "T23": "6355" # bus0 == bus1 to remove link in remove_unconnected_components (NordBalt) + "14815": "5939" # Kainachtal + "8706": "6448" bus1: index: "12931": "8152" # BorWin3 "5582": "2382" # combine link 5583 + 5582 in 5582 (Sardinia) "13589": "1349" # combine link 13589 + 13588 in 13589 (Sardinia) "14820": "6354" # NordBalt + "14810": "6365" # Skagerrak + "8708": "6448" + "8394": "6695" + "14813": "7052" + "8009": "5939" length: index: "5582": 26.39 # new length of combined links (sum) @@ -53,6 +60,7 @@ Line: bus0: index: "14573": "7179" #fix bus-id substation in PT (220/380kV issue) + "14756": "8577" # Deeside connection v_nom: index: "14573": 220 # 220/380kV issue of substation in PT From e9f3d20432deb548895443dff9e34451a27cdd9f Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 28 Dec 2022 09:33:08 +0100 Subject: [PATCH 2/9] simplify_networks: add control for removing stubs --- config.default.yaml | 2 ++ scripts/simplify_network.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) 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) From 780834ad872d90af90fe1558400f82157a8a99a6 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 28 Dec 2022 09:33:36 +0100 Subject: [PATCH 3/9] tyndp: add greenlink and celtic interconnector --- data/links_tyndp.csv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/links_tyndp.csv b/data/links_tyndp.csv index 8079be72..a0603120 100644 --- a/data/links_tyndp.csv +++ b/data/links_tyndp.csv @@ -24,3 +24,5 @@ Gridlink,Kingsnorth (UK),Warande (FR),160,,1400,in permitting,,https://tyndp.ent NeuConnect,Grain (UK),Fedderwarden (DE),680,,1400,in permitting,,https://tyndp.entsoe.eu/tyndp2018/projects/projects/309,0.716666666666667,51.44,8.046524,53.562763 NordBalt,Klaipeda (LT),Nybro (SE),450,,700,built,,https://en.wikipedia.org/wiki/NordBalt,21.256667,55.681667,15.854167,56.767778 Estlink 1,Harku (EE),Espoo (FI),105,,350,built,,https://en.wikipedia.org/wiki/Estlink,24.560278,59.384722,24.551667,60.203889 +Greenlink,Waterford (IE),Pembroke (UK),,180,500,under construction,,https://tyndp2022-project-platform.azurewebsites.net/projectsheets/transmission/286,-6.987,52.260,-4.986,51.686 +Celtic Interconnector,Aghada (IE),La Martyre (FR),,572,700,under consideration,,https://tyndp2022-project-platform.azurewebsites.net/projectsheets/transmission/107,-8.16642,51.91413,-4.184,48.459 From bb5c5bd14338798c4fabdc412f04852afaeafe8e Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 28 Dec 2022 09:34:28 +0100 Subject: [PATCH 4/9] simplify_networks: add control for removing stubs II --- scripts/simplify_network.py | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/scripts/simplify_network.py b/scripts/simplify_network.py index 38446e46..5b8c8f49 100644 --- a/scripts/simplify_network.py +++ b/scripts/simplify_network.py @@ -532,22 +532,20 @@ if __name__ == "__main__": n, technology_costs, snakemake.config, snakemake.output, aggregation_strategies ) - n, stub_map = remove_stubs( - n, - technology_costs, - snakemake.config, - snakemake.output, - aggregation_strategies=aggregation_strategies, - ) + busmaps = [trafo_map, simplify_links_map] - busmaps = [trafo_map, simplify_links_map, stub_map] + cluster_config = snakemake.config["clustering"]["simplify_network"] + if cluster_config.get("remove_stubs", True): + n, stub_map = remove_stubs( + n, + technology_costs, + snakemake.config, + snakemake.output, + aggregation_strategies=aggregation_strategies, + ) + busmaps.append(stub_map) - cluster_config = snakemake.config.get("clustering", {}).get("simplify_network", {}) - if ( - cluster_config.get("clustering", {}) - .get("simplify_network", {}) - .get("to_substations", False) - ): + if cluster_config.get("to_substations", False): n, substation_map = aggregate_to_substations(n, aggregation_strategies) busmaps.append(substation_map) From a08c20d7c88d459e97d9865ae57e757f8f0dc1de Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 28 Dec 2022 09:35:11 +0100 Subject: [PATCH 5/9] build_shapes: cleanup shape union of RS and KV --- scripts/build_shapes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/build_shapes.py b/scripts/build_shapes.py index dff6313d..cda27963 100644 --- a/scripts/build_shapes.py +++ b/scripts/build_shapes.py @@ -129,6 +129,8 @@ def countries(naturalearth, country_list): s = df.set_index("name")["geometry"].map(_simplify_polys) if "RS" in country_list: s["RS"] = s["RS"].union(s.pop("KV")) + # cleanup shape union + s["RS"] = Polygon(s["RS"].exterior.coords) return s From 9e1eec9c9d20df50e913850bc58031fdcb5e161f Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 28 Dec 2022 11:10:19 +0100 Subject: [PATCH 6/9] env: add pygeos dependency --- envs/environment.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/envs/environment.yaml b/envs/environment.yaml index 8f38465a..ec2fbb5f 100644 --- a/envs/environment.yaml +++ b/envs/environment.yaml @@ -54,6 +54,7 @@ dependencies: - pytz - tabula-py - pyxlsb +- pygeos - pip: - vresutils>=0.3.1 From 67b3c964d4a028b56aa2f5f620eee5650b6e5133 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 28 Dec 2022 11:11:13 +0100 Subject: [PATCH 7/9] env: add pygeos dependency >= 0.11 --- envs/environment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/envs/environment.yaml b/envs/environment.yaml index ec2fbb5f..2574e413 100644 --- a/envs/environment.yaml +++ b/envs/environment.yaml @@ -54,7 +54,7 @@ dependencies: - pytz - tabula-py - pyxlsb -- pygeos +- pygeos>=0.11 - pip: - vresutils>=0.3.1 From 8b363fe108781e00d043daa1f2b069596332e88c Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 28 Dec 2022 11:21:52 +0100 Subject: [PATCH 8/9] env: remove pygeos dependency --- envs/environment.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/envs/environment.yaml b/envs/environment.yaml index 2574e413..8f38465a 100644 --- a/envs/environment.yaml +++ b/envs/environment.yaml @@ -54,7 +54,6 @@ dependencies: - pytz - tabula-py - pyxlsb -- pygeos>=0.11 - pip: - vresutils>=0.3.1 From c17ae85f9b094271f96bf2e712fca453681b61bd Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 28 Dec 2022 12:15:17 +0100 Subject: [PATCH 9/9] HVDC links Sweden Germany parameter correction --- data/parameter_corrections.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/data/parameter_corrections.yaml b/data/parameter_corrections.yaml index 850d060b..df15738a 100644 --- a/data/parameter_corrections.yaml +++ b/data/parameter_corrections.yaml @@ -49,6 +49,7 @@ Link: "8394": "6695" "14813": "7052" "8009": "5939" + "5601": "7052" # Link Sweden - Lübeck length: index: "5582": 26.39 # new length of combined links (sum)