Skip to content

fix: improve assignment of CHP and PP for MASTR data - #313

Open
lindnemi wants to merge 2 commits into
masterfrom
improve-mastr-chp
Open

fix: improve assignment of CHP and PP for MASTR data#313
lindnemi wants to merge 2 commits into
masterfrom
improve-mastr-chp

Conversation

@lindnemi

@lindnemi lindnemi commented Sep 1, 2026

Copy link
Copy Markdown

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:
germany-chp-pp-by-fueltype-before-after

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

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in docs.
  • Unit tests for new features were added (if applicable).
  • A note for the release notes docs/release_notes.md of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license and have added my name to the docs/contributors.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant