diff --git a/doc/release_notes.rst b/doc/release_notes.rst index ad1bbf4fa..5682d7886 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -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) ===================================== diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 7e53e6063..7adf492a6 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -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) ]