Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHP plants remain as existing capacities despite expired lifetime #34

Open
cpschau opened this issue Jan 21, 2025 · 0 comments
Open

CHP plants remain as existing capacities despite expired lifetime #34

cpschau opened this issue Jan 21, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@cpschau
Copy link
Contributor

cpschau commented Jan 21, 2025

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]

@cpschau cpschau added the bug Something isn't working label Jan 21, 2025
cpschau pushed a commit to SysGF-internal/pypsa-de that referenced this issue Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants