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
|
"Set == 'CHP' and (DateOut >= @baseyear or DateOut != DateOut) and (DateIn <= @limit or DateIn != DateIn) and Fueltype not in @drop_fueltypes" |
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]
Running the myopic Code, CHP plants which are supposed to be filtered out in
add_existing_baseyeardue to their expired lifetime remain within the network. The filter does not work, as several data points have missing values in the columns queried inpypsa-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: