Addressing edge case of already existing chp capacities #1401
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.
Closes PyPSA/pypsa-ariadne#250
Changes proposed in this Pull Request
The function
add_chp_plants
now iterates over every chp plant build before the first planning horizon and checks whether the link is already existing from the ruleprepare_sector_network
. If that's the case, the minimum capacity of the extendable link is adjusted to the installed capacity.Since for German CHPs a efficiency depending on size and build year is passed, the efficiency is also adjusted for the extendable links. This is not the case for other European CHP plants.
A side effect of the iteration over all buses is avoiding the warnings
WARNING:pypsa.components:Single value sequence for ... is treated as a scalar and broadcasted to all components. It is recommended to explicitly pass a scalar instead.
in that function.After executing the rule
add_existing_baseyear
the following installed capacities of CHPs are added for the year 2015-2020:Checklist
not applicable
envs/environment.yaml
.not applicable
config/config.default.yaml
.not applicable
doc/configtables/*.csv
.not applicable
doc/data_sources.rst
.not applicable
doc/release_notes.rst
is added.not applicable