Open
Description
Running the myopic Code, CHP plants which are supposed to be filtered out in add_existing_baseyear
due to their expired lifetime remain within the network. The filter does not work, as several data points have missing values in the columns queried in
pypsa-de/scripts/add_existing_baseyear.py
Line 463 in ca2d8ff
A potential solution could be to provide a default value for the plants' lifetimes where it is missing and to filter out plants whose lifetimes have expired:
chp["lifetime"] = (chp.DateOut - chp["grouping_year"] + 1).fillna(
snakemake.params.costs["fill_values"]["lifetime"]
)
chp = chp.loc[chp.grouping_year + chp.lifetime >= baseyear]