Pb/combined fixes 60, 64, 65, 66#72
Merged
jd-lara merged 12 commits intoMay 18, 2026
Merged
Conversation
…enna-Platform#68) * Initial plan * Update legacy org, docs domain, and Slack workspace references Agent-Logs-Url: https://github.com/Sienna-Platform/PowerAnalytics.jl/sessions/f7d7ad47-b1c6-439f-a209-13e78403092c Co-authored-by: jd-lara <16385323+jd-lara@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jd-lara <16385323+jd-lara@users.noreply.github.com>
Replace PSY.StaticInjection with Union{PSY.StaticLoad, PSY.Generator, PSY.Storage}
to exclude Source and other non-fuel injectors that have no mapping entry
and would otherwise trigger a KeyError.
Fixes PowerGraphics.jl#132.
PowerSystems v5 introduced HydroPumpTurbine (primemover=PS), which previously fell through the YAML resolver to the generic Storage rule. Add a HydroGen catch-all rule before the Any/HY rule so any HydroGen subtype is categorized as Hydropower regardless of prime mover. Also adds a regression test covering HydroPumpTurbine and HydroTurbine. Closes PowerGraphics.jl#132.
Add coverage for prime-mover codes that PSY v5 systems commonly use: - NG-CT now catches both CT (combustion turbine) and GT (gas turbine) - NG-CC now catches both CC (whole-plant combined cycle) and CA (steam side of a decomposed CC train) Changes are purely additive; existing CT thermals still categorize as NG-CT. Adds a positive regression test exercising each new prime-mover code.
…n ComponentSelector)
m-bossart
reviewed
May 12, 2026
| @@ -16,11 +16,16 @@ Storage: | |||
| - {gentype: Any, primemover: PS, fuel: null} | |||
| NG-CT: | |||
| - {gentype: Any, primemover: CT, fuel: NATURAL_GAS} | |||
Contributor
There was a problem hiding this comment.
This is a bit counter-intuitive, but the entry for primemover = CT should be moved to the NG-CC category. CT indicates the combustion turbine of a CC block whereas this category should be for non-CC gas.
|
|
||
| @testset "Test natural-gas prime-mover categorization" begin | ||
| mapping = PA.get_generator_mapping() | ||
| # NG-CT should catch both classic combustion-turbine (CT) and gas-turbine (GT) |
Contributor
There was a problem hiding this comment.
See above, this interpretation of CT prime mover is incorrect
| @testset "Test natural-gas prime-mover categorization" begin | ||
| mapping = PA.get_generator_mapping() | ||
| # NG-CT should catch both classic combustion-turbine (CT) and gas-turbine (GT) | ||
| @test PA.get_generator_category( |
Contributor
There was a problem hiding this comment.
This test will need to change
This was referenced May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per Jose s request I agrupated mentioned PRs into a single one after review and applying a few little changes then solved conflicts. Each was previously a standalone branch; this combined branch merges them for this single PR.
Changes descriptions
Match slack variables by bare type name (fix for
categorize_data)SystemBalanceSlackUp__Systemare recognized regardless of suffixes.categorize_data surfaces slack variables.Regression test for Issue
StackOverflowErrorforcalc_active_powerThermalStandardmake_selector #54calc_active_power(make_selector(ThermalStandard), results_uc)to prevent regressions related toComponentSelectordispatch.main; the test pins the reproducer for future safety.Narrow
make_fuel_dictionaryto fuel-bearing component typesStaticLoad,Generator, andStorage, excluding non-fuel types.filter_funcbehavior across types.Extend natural-gas prime-mover mapping (
deps/generator_mapping.yaml)NG-CTalso matchesGT(gas turbine) in addition toCT.NG-CCalso matchesCA(steam side) in addition toCC.Map all
HydroGensubtypes toHydropower{gentype: HydroGen, primemover: null, fuel: null}rule soHydroPumpTurbineandHydroTurbinecategorize asHydropower.Anyfallbacks.Verification
Included PRs and related issues
make_fuel_dictionaryto appropriate typescategorize_datamisses slack variablesStackOverflowErrorforcalc_active_powerwithmake_selector