CHP plants remain as existing capacities despite expired lifetime

未关闭
#34 0 条评论 0 个 reaction 已指派 2 人 在 GitHub 查看

@cpschau 已经在做这个了。

开始于 2025年1月21日。

评估

这个 Issue 还没有评估数据。

描述

bug

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 https://github.com/PyPSA/pypsa-de/blob/ca2d8ff3502115034a0adca5ad8ed0aef2bae973/scripts/add_existing_baseyear.py#L463

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]

主要语言
Python
星标
54
派生
36
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

PyPSA/pypsa-de 的其他 Issue

查看 PyPSA/pypsa-de 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。