From 2119f4cee05c256509f48d4e9fe0d8fd9e9e3632 Mon Sep 17 00:00:00 2001 From: Philipp Glaum <95913147+p-glaum@users.noreply.github.com> Date: Thu, 7 Nov 2024 08:41:27 +0100 Subject: [PATCH] bugfix: only add waste chp to buses which have urban central heat buses (#1407) * prepare_sector_network: only add waste chp to buses which have urban central heat buses * add release note * prepare_sector_network: add empty location for CHP if heat network not available --- doc/release_notes.rst | 2 ++ scripts/prepare_sector_network.py | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 80af0514e..bb37ef1d9 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -15,6 +15,8 @@ Upcoming Release * Bugfix: Adjusted efficiency2 (to atmosphere) for bioliquids-to-oil Link in `prepare_sector_network` to exactly offset the corresponding oil emissions. +* Bugfix: Waste CHPs were added to all electricity buses even if they were not connected to heating network. This is now fixed. + * Bugfix: Duplicates in build_transmission_projects were caught, but not removed from the network. This is now fixed. * Replaced the Store representation of biogenic carriers (solid biomass, biogas, bioliquids, MSW) in ``prepare_sector_network`` with the extended Generator component that uses the ``e_sum_min`` and ``e_sum_max`` attributes to enforce minimum usage and limit maximum potential, respectively. diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 85e83dcfa..2c77e0e97 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -3625,12 +3625,19 @@ def add_industry(n, costs): waste_source = non_sequestered_hvc_locations if cf_industry["waste_to_energy"]: + urban_central = spatial.nodes + " urban central heat" + existing_urban_central = n.buses.index[ + n.buses.carrier == "urban central heat" + ] + urban_central_nodes = urban_central.map( + lambda x: x if x in existing_urban_central else "" + ) n.add( "Link", spatial.nodes + " waste CHP", bus0=waste_source, bus1=spatial.nodes, - bus2=spatial.nodes + " urban central heat", + bus2=urban_central_nodes, bus3="co2 atmosphere", carrier="waste CHP", p_nom_extendable=True, @@ -3649,7 +3656,7 @@ def add_industry(n, costs): spatial.nodes + " waste CHP CC", bus0=waste_source, bus1=spatial.nodes, - bus2=spatial.nodes + " urban central heat", + bus2=urban_central_nodes, bus3="co2 atmosphere", bus4=spatial.co2.nodes, carrier="waste CHP CC",