Skip to content

Commit

Permalink
Merge pull request #728 from PyPSA/fix-min-capacity-myopic
Browse files Browse the repository at this point in the history
Fix min capacity myopic
  • Loading branch information
fneum authored Aug 22, 2023
2 parents 1fc83b7 + 46cdf2b commit 635877b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Upcoming Release

* For industry distribution, use EPRTR as fallback if ETS data is not available.

* The minimum capacity for renewable generators when using the myopic option has been fixed.

PyPSA-Eur 0.8.1 (27th July 2023)
================================

Expand Down
5 changes: 4 additions & 1 deletion scripts/solve_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def _add_land_use_constraint(n):
# warning: this will miss existing offwind which is not classed AC-DC and has carrier 'offwind'

for carrier in ["solar", "onwind", "offwind-ac", "offwind-dc"]:
extendable_i = (n.generators.carrier == carrier) & n.generators.p_nom_extendable
n.generators.loc[extendable_i, "p_nom_min"] = 0

ext_i = (n.generators.carrier == carrier) & ~n.generators.p_nom_extendable
existing = (
n.generators.loc[ext_i, "p_nom"]
Expand All @@ -67,7 +70,7 @@ def _add_land_use_constraint(n):
if len(existing_large):
logger.warning(
f"Existing capacities larger than technical potential for {existing_large},\
adjust technical potential to existing capacities"
adjust technical potential to existing capacities"
)
n.generators.loc[existing_large, "p_nom_max"] = n.generators.loc[
existing_large, "p_nom_min"
Expand Down

0 comments on commit 635877b

Please sign in to comment.