Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure correct dtype of "reverse" column #1525

Merged
merged 11 commits into from
Feb 4, 2025
2 changes: 1 addition & 1 deletion scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -4378,8 +4378,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"] = n.links.get("reversed", False)
n.links = pd.concat([n.links, rev_links], sort=False)
n.links["reversed"] = n.links["reversed"].fillna(False).infer_objects(copy=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
Expand Down
Loading