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

fix: ensure that no fueled generators with zero heat rate can be built #118

Merged
merged 1 commit into from
Jul 27, 2021

Conversation

danielolsen
Copy link
Contributor

Pull Request doc

Purpose

Ensure that no fueled generators with zero heat rate can be built. Closes #117.

What the code is doing

We add one new pandas dataframe assignment to effect this change:

df.loc[
    (
        df.index.isin(indices["expansion"])
        & (df.gen_full_load_heat_rate == 0)
        & df.gen_energy_source.isin(const.fuels)
    ),
    "gen_capacity_limit_mw",
] = 0

Two other pandas assignments are moved, so that the logical flow of the function is:

  1. Add columns to the data frame (full columns)
  2. Refine the data in the data frame (partial column re-assignments)

Testing

Tested manually using the code snippet from #117. The only changed information are the ten expansion candidates previously identified, and the new values should produce a hard limit that prevents them from being expanded.

Time estimate

15 minutes.

@danielolsen danielolsen self-assigned this Jul 26, 2021
@BainanXia
Copy link
Collaborator

This only closes #117 partially, right? Eventually, we will need meaningful heat rate rates for generators with 0 Pmax. One immediate application would be the case in which we would like to add a hypothetical plant with fuel but no such plant exists in the same location.

Copy link
Collaborator

@BainanXia BainanXia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will prevent Switch from building generation capacities if heat rate is zero for a power plant consuming fuel.

@danielolsen
Copy link
Contributor Author

This only closes #117 partially, right? Eventually, we will need meaningful heat rate rates for generators with 0 Pmax. One immediate application would be the case in which we would like to add a hypothetical plant with fuel but no such plant exists in the same location.

It fixes what I consider as the main problem from #117, that the inputs are currently being prepared in a way that they should not be. I think your example would fall under the umbrella of #69.

@danielolsen danielolsen merged commit f7c384a into develop Jul 27, 2021
@danielolsen danielolsen deleted the daniel/fix_zero_heat_rate_gens branch July 27, 2021 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inputs are prepared with gen_full_load_heat_rate equal to 0
3 participants