Merge pull request #728 from PyPSA/fix-min-capacity-myopic
Fix min capacity myopic
This commit is contained in:
commit
635877b53c
@ -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)
|
||||
================================
|
||||
|
||||
|
@ -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"]
|
||||
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user