From 32451f6ca8e45ca6f3c292f29c324104499e9276 Mon Sep 17 00:00:00 2001 From: Fabian Hofmann Date: Mon, 5 Feb 2024 19:13:42 +0100 Subject: [PATCH] Update scripts/prepare_sector_network.py Co-authored-by: Fabian Neumann --- scripts/prepare_sector_network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 5abd2ce6..8eb38d69 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -3536,8 +3536,8 @@ def lossy_bidirectional_links(n, carrier, efficiencies={}): rev_links["reversed"] = True rev_links.index = rev_links.index.map(lambda x: x + "-reversed") - n.links["reversed"] = False n.links = pd.concat([n.links, rev_links], sort=False) + n.links["reversed"] = n.links["reversed"].fillna(False) n.links["length_original"] = n.links["length_original"].fillna(n.links.length) # do compression losses after concatenation to take electricity consumption at bus0 in either direction