Fix: config link type carriers#2191
Open
nicolezechneraggm wants to merge 6 commits into
Open
Conversation
This reverts commit 535aecca6aeab864799f4a9919451a8cca302601.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this Pull Request
Bugfix: As introduced for
H2 pipeline retrofittedin #2174, the link type carriersgas pipeline newandCO2 pipelinemust be called to correctly address losses.If the bidirectional links with (
p_min_pu=-1) are not added here, they are not split inlossy_bidirectional_linksinprepare_sector_network. They are then allowed negative flows, leading to negative marginal costs in the exporting bus and generating artificial revenue there.Additionally, the if-gate in the
lossy_bidirectional_linksfunction triggers only ifcarrier_i.empty:https://github.com/AGGM-AG/pypsa-eur/blob/f750d664f1d5f2afa4c57a3f8b4132ecdd59873f/scripts/prepare_sector_network.py#L5852-L5856
The first part of the condition
(v != 1.0) or (v >= 0)is alwaysTrue. This may be an oversight that allows the split of bidirectional links regardless of efficiency values, as long as they are given in the config.Checklist
Required:
doc/release_notes.md.If applicable:
scripts/lib/validation.doc/*.mdfiles.