Skip to content

Commit

Permalink
Merge pull request #1094 from PyPSA/fix-p_nom-existing-renewables
Browse files Browse the repository at this point in the history
Hotfix for n.statistics.installed_capacity
  • Loading branch information
lisazeyen committed Jun 10, 2024
2 parents 24b50e8 + a4a048f commit 8438153
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions scripts/add_existing_baseyear.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8438153

Please sign in to comment.