Update scripts/prepare_sector_network.py

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
This commit is contained in:
Fabian Hofmann 2024-02-05 19:13:42 +01:00 committed by GitHub
parent 76872fa0f1
commit 32451f6ca8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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