Fix duplicated years in add_land_use_constraint_m

This commit is contained in:
Thomas Gilon 2024-03-14 16:56:00 +01:00
parent 0a0a35e4a4
commit 1496c585d0
2 changed files with 3 additions and 1 deletions

View File

@ -106,6 +106,8 @@ Upcoming Release
* Adapt the disabling of transmission expansion in myopic foresight optimisations when limit is already reached to also handle cost limits.
* Fix duplicated years in `add_land_use_constraint_m`.
PyPSA-Eur 0.10.0 (19th February 2024)
=====================================

View File

@ -165,7 +165,7 @@ def _add_land_use_constraint_m(n, planning_horizons, config):
previous_years = [
str(y)
for y in planning_horizons + grouping_years
for y in set(planning_horizons + grouping_years)
if y < int(snakemake.wildcards.planning_horizons)
]