PyPSA / pypsa-eur

PyPSA-Eur: A Sector-Coupled Open Optimisation Model of the European Energy System
https://pypsa-eur.readthedocs.io/
345 stars 242 forks source link

Addressing edge case of already existing chp capacities #1401

Closed toniseibold closed 2 weeks ago

toniseibold commented 2 weeks ago

Closes https://github.com/PyPSA/pypsa-ariadne/issues/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 rule prepare_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: image

Checklist