Skip to content

CHP plants remain as existing capacities despite expired lifetime #34

Description

@cpschau

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]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions