Merge pull request #1094 from PyPSA/fix-p_nom-existing-renewables

Hotfix for n.statistics.installed_capacity
This commit is contained in:
lisazeyen 2024-06-10 15:25:21 +02:00 committed by GitHub
commit 8438153638
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -10,6 +10,8 @@ Release Notes
Upcoming Release
================
* Set p_nom = p_nom_min for generators with baseyear == grouping_year in add_existing_baseyear. This has no effect on the optimization but helps n.statistics to correctly report already installed capacities.
* Reverted outdated hotfix for doubled renewable capacity in myopic optimization.
* Added Enhanced Geothermal Systems for generation of electricity and district heat.

View File

@ -272,9 +272,9 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
# this is for the year 2020
if not already_build.empty:
n.generators.loc[already_build, "p_nom_min"] = capacity.loc[
already_build.str.replace(name_suffix, "")
].values
n.generators.loc[already_build, "p_nom"] = n.generators.loc[
already_build, "p_nom_min"
] = capacity.loc[already_build.str.replace(name_suffix, "")].values
new_capacity = capacity.loc[new_build.str.replace(name_suffix, "")]
if "m" in snakemake.wildcards.clusters: