New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly enforce existing capacities if build year >= base year #966
Comments
With #967 in place and grouping years [2015,2021] all existing capacities seem to be assigned correctly and do not get overwritten by the optimization. However, for the extendable solar-2020 generator, the p_nom is still very high. I thought it would be 0 if all existing capcities are added as solar-2015 and solar-2021. We might get some double counting in n.statistics.installed_capacity because of that. @p-glaum |
possibly related to #1016 |
This is indeed the same issue as in #1016. Renewable capacities can be added in two ways:
electricity:
estimate_renewable_capacities:
enable: true
Option 1 should be used only for electricity-only models and overnight sector-coupled models. Option 2 is used in any case for myopic pathway sector-coupled models. This is quite error-prone, and we should change it soon. Will be tracked via #1016. So, the problem occurs if you do options 1 and 2 simultaneously, in which case all existing capacities are added to With option 1 disabled one gets in n.generators.query("carrier == 'solar'").groupby("build_year")[["p_nom_min", "p_nom"]].sum()
With option 1 enabled, one gets:
which is wrong / double-counting -- yet without effect on the optimisation |
Describe the Bug
The baseyear in pypsa-ariadne is 2020. We want to enforce capacities that have been build in 2020 or afterwards.
At the moment this is done in
add_existing_baseyear.py
, just as if the build year was before 2020, by setting p_nom.However, after the optimisation, for some carriers, the optimal capacity is smaller than p_nom. This means that the already existing assets are not used by the model. Why?
pypsa-eur/scripts/add_existing_baseyear.py
Lines 248 to 250 in 0a0a35e
However, for renewable carriers
p_nom_min
gets reset to0
in solve_network.py. I would consider this a bug, since that way existing capacities get disregarded. The responsible lines arepypsa-eur/scripts/solve_network.py
Lines 100 to 101 in 0a0a35e
pypsa-eur/scripts/solve_network.py
Lines 126 to 127 in 0a0a35e
Apparently the behaviour was first introduced in #728 to limit the land use of renewables.
When i revert this PR the p_nom_lims are correctly carried forward. However, then
p_nom_min
is still smaller than thep_nom
for most carriers, which i understand to be indicative of the existing capacities. And thus, once againp_nom_opt
is lower than it should be.For offwind-ac the situation is actually the opposite and p_nom is smaller than p_nom_min. This might be related to the issue that existing wind capacities get added without a suffix and are thus overlooked
How to Fix
Basically two approaches could work:
set p_nom_min = p_nom
differentiate between enforced assets and optimized assets. then
carrier-year
would exist twice if build year >= base year.(and also assign all already existing offwind capacities to offwind-ac and offwind-dc)
I am a bit reluctant to simply go for 1. since it might break other peoples code (??)
The text was updated successfully, but these errors were encountered: