drop assets which reached end of lifetime

This commit is contained in:
lisazeyen 2023-08-28 13:52:55 +02:00
parent abb584de45
commit 4cd492bb6f

View File

@ -608,6 +608,10 @@ def add_heating_capacities_installed_before_baseyear(
],
)
# drop assets which are at the end of their lifetime
links_i = n.links[(n.links.build_year+n.links.lifetime<=baseyear)].index
n.mremove("Link", links_i)
# %%
if __name__ == "__main__":
@ -621,7 +625,7 @@ if __name__ == "__main__":
clusters="37",
ll="v1.0",
opts="",
sector_opts="8760H-T-H-B-I-A-solar+p3-dist1",
sector_opts="1p7-4380H-T-H-B-I-A-solar+p3-dist1",
planning_horizons=2020,
)