Merge pull request #968 from Climact/feature/fix-duplicated-years

Fix duplicated years in add_land_use_constraint_m
This commit is contained in:
Fabian Neumann 2024-03-15 13:53:01 +01:00 committed by GitHub
commit a5002f53cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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)
]