fix: improve assignment of CHP and PP for MASTR data - #313
Open
lindnemi wants to merge 2 commits into
Open
Conversation
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.
Too many units from the MASTR data were classified as CHP.
Changes proposed in this Pull Request
Multiple units in MASTR may have the same "KwkMastrNummer". Each of these have identical "ThermischeNutzleistung" and "ElektrischeKwkLeistung" which are characteristics of the KWK.
Previously, all units with such a number (and a positive "ThermischeNutzleistung") were classified as CHP.
However many units have only a very small part that contributes to CHP. E.g. Neurath, lignite, 2 GW Electric, 40 MW heat.
This PR checks all units with the same KwkMastrNummer and assigns CHP status only to the subset which best matches the electrical KWK Leistung of the KwKMastrNummer. If the Capacity of the smallest unit with a given KwkMastrNummer is larger than twice the ElektrischeKwkLeistung, all of the corresponding units are classified PP and the CHP is ignored.
Copilot made a comparison of the current master with this branch:

Also, for units which have the carrier "Wärme" and belong to a KWK, the dominant carrier (e.g. gas) of the KWK is assigned.
Checklist
docs.docs/release_notes.mdof the upcoming release is included.docs/contributors.md.