Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates hydro and energy storage device models to align with the newer InfrastructureOptimizationModels (IOM) helper APIs, primarily by switching to the add_to_objective_function! interface and delegating common bound/cost logic to IOM utilities.
Changes:
- Replace legacy
objective_function!calls withadd_to_objective_function!in hydro/storage constructors and implement/rename corresponding methods. - Refactor hydro proportional-cost and pump reservation/commitment bound constraints to use IOM helpers (
add_cost_term_invariant!,add_*_bound_range_constraints!), reducing duplicated JuMP constraint/objective plumbing. - Extend initial-condition updating to support
InitialReservoirVolumevia the generic IC-to-variable mapping.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/static_injector_models/thermal_generation.jl |
Updates IOM semicontinuous bound constraint specialization to support a meta suffix (needed by newer helper call patterns). |
src/static_injector_models/hydrogeneration_constructor.jl |
Switches hydro constructors to call add_to_objective_function! instead of objective_function!. |
src/static_injector_models/hydro_generation.jl |
Refactors hydro constraint dispatch signatures, cost addition, and pump reservation/commitment bound constraints to use IOM helpers. |
src/initial_conditions/update_initial_conditions.jl |
Adds IC mapping for InitialReservoirVolume → HydroReservoirVolumeVariable. |
src/energy_storage_models/storage_models.jl |
Renames objective hooks to add_to_objective_function! and refactors final-timestep proportional slack penalties via IOM.add_cost_term_invariant!. |
src/energy_storage_models/storage_constructor.jl |
Switches storage constructors to call add_to_objective_function!. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Performance Results
|
Collaborator
Author
Wait why did the solve time just drop by a factor of 3... edit: apparently it's just high variance. Ran it locally and got similar performance between the two. |
jd-lara
approved these changes
Apr 27, 2026
acostarelli
pushed a commit
that referenced
this pull request
Apr 29, 2026
Adds the bilinear (flow*head) hydro dispatch formulation and folds in adjacent refactors merged through this branch: - Hydro and storage updates to IOM helpers (#97) - POM-to-IOM type-dispatch API migration - MarketBidCost / ImportExportCost static/TS split + IEC refactor - Shiftable-load interval indexing and validation fixes - HDF system serialization (#75) - Pin GitHub revisions; bridge IOM system-query stubs to PSY public API Co-Authored-By: Luke Kiernan <86331877+luke-kiernan@users.noreply.github.com> Co-Authored-By: Rodrigo Henríquez-Auba <rodrigo.henriquezauba@nrel.gov> Co-Authored-By: Jose Daniel Lara <jdlara@berkeley.edu> Co-Authored-By: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
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.
Update hydro/storage to use the new IOM helpers. Requires IOM #88.
I plan to merge #77 (
lk/mbc_iec_refactorintomain) then this (lk/hydro-storage-updateintomain). But I'm still waiting for approval on the first.edit: #77 is merged, so this is up next.