From 34f5d2eb68f4dd35dcb77a7e813e3af91685b406 Mon Sep 17 00:00:00 2001 From: Michael Lindner Date: Tue, 3 Sep 2024 16:04:00 +0200 Subject: [PATCH] bugfix missing oil generator: remove else clause --- scripts/prepare_sector_network.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 5f579c5d..6c0fc6c3 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -604,16 +604,14 @@ def add_carrier_buses(n, carrier, nodes=None): suffix = " primary" - else: - - n.madd( - "Generator", - nodes + suffix, - bus=nodes + suffix, - p_nom_extendable=True, - carrier=carrier + suffix, - marginal_cost=costs.at[carrier, "fuel"], - ) + n.madd( + "Generator", + nodes + suffix, + bus=nodes + suffix, + p_nom_extendable=True, + carrier=carrier + suffix, + marginal_cost=costs.at[carrier, "fuel"], + ) # TODO: PyPSA-Eur merge issue