Skip to content

pass type not instance to is_time_variant_term#78

Merged
jd-lara merged 2 commits intomainfrom
lk/types-vs-instance-bug
Apr 16, 2026
Merged

pass type not instance to is_time_variant_term#78
jd-lara merged 2 commits intomainfrom
lk/types-vs-instance-bug

Conversation

@luke-kiernan
Copy link
Copy Markdown
Collaborator

At some point IOM's is_time_variant_term was changed to take component types (here). Update POM accordingly.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates PowerOperationsModels’ is_time_variant_term method specializations to match InfrastructureOptimizationModels’ updated interface (passing component types instead of component instances), so time-variant proportional-cost handling continues to dispatch correctly.

Changes:

  • Update is_time_variant_term overloads for thermal generation costs to accept ::Type{<:PSY.ThermalGen}.
  • Update is_time_variant_term overloads for hydro market bid costs to accept ::Type{<:PSY.HydroGen}.
  • Update is_time_variant_term overloads for controllable load costs to accept ::Type{<:PSY.ControllableLoad}.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/static_injector_models/thermal_generation.jl Switches thermal is_time_variant_term dispatch from instances to component types.
src/static_injector_models/hydro_generation.jl Switches hydro MarketBidCost is_time_variant_term dispatch to component types (but needs a corresponding call-site update).
src/static_injector_models/electric_loads.jl Switches controllable load is_time_variant_term dispatch from instances to component types.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/static_injector_models/hydro_generation.jl
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jd-lara jd-lara merged commit d0583f7 into main Apr 16, 2026
1 of 6 checks passed
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.

3 participants