-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
bugSomething isn't workingSomething isn't working
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
| "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]
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working