From 788e07a0d16729bfcf0b01353092cd0d7d86e9aa Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Mon, 13 May 2024 17:56:28 +0200 Subject: [PATCH] bugfix to avoid duplicated offshore regions (closes #396) --- doc/release_notes.rst | 2 ++ scripts/base_network.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index ef019ad6..012f1155 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -10,6 +10,8 @@ Release Notes Upcoming Release ================ +* Bugfix to avoid duplicated offshore regions. + * Added option ``industry: HVC_environment_sequestration_fraction:`` to specify the fraction of carbon contained plastics that is permanently sequestered in landfill. The default assumption is that all carbon contained in plastics is diff --git a/scripts/base_network.py b/scripts/base_network.py index 432813cf..870fcf19 100644 --- a/scripts/base_network.py +++ b/scripts/base_network.py @@ -569,7 +569,7 @@ def _set_countries_and_substations(n, config, country_shapes, offshore_shapes): buses["substation_lv"] = ( lv_b & onshore_b & (~buses["under_construction"]) & has_connections_b ) - buses["substation_off"] = (offshore_b | (hv_b & onshore_b)) & ( + buses["substation_off"] = ((hv_b & offshore_b) | (hv_b & onshore_b)) & ( ~buses["under_construction"] )