Repository navigation
Nonannual-example - #6
Open
jaredthomas68 wants to merge 28 commits into
Open
jaredthomas68 wants to merge 28 commits into
jaredthomas68 wants to merge 28 commits into
Conversation
…ent schedule for non-annual simulation
jaredthomas68
changed the base branch from
nonannual-resource
to
nonannual-framework
October 8, 2026 22:31
jaredthomas68
added this pull request to stack #8
October 8, 2026 22:31
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.
Apply non-annual simulation support to models and add Example 24 demo
This PR is the fourth and final in the stack enabling non-annual simulatios in H2Integrate (built on top of the framework annualization and duration-bounds checks in #, which itself builds on NatLabRockies#893, which followed on NatLabRockies#897).
Key changes:
PYSAMSolarPlantPerformanceModel,GridPerformanceModel,StoragePerformanceBase, andDemandComponentBaseto project annual capacity factor, annual production, and stack replacement schedules usingcalculate_annual_cf_and_replacement_schedule().GridCostModelto annualize timestep buy and sell costs usingcalculate_annual_varopex().DemandOpenLoopStorageControllerto handle arbitrary time steps by converting energy capacity headroom to charge/discharge rates using the timestep interval._simulation_duration_boundsfrom annual-only to(0.0, float("inf"))on validated concrete models:PYSAMSolarPlantPerformanceModel,ATBUtilityPVCostModel,StoragePerformanceModel,ATBBatteryCostModel,DemandOpenLoopStorageController,GenericDemandComponent,GridPerformanceModel,GridCostModel,CablePerformanceModel, andGenericCombinerPerformanceModel.solar_battery_grid) to demonstrate sub-annual (half-year at 15-min), annual (1-year at 1-hour), and multi-year (2-year at 3-hour) simulations with solar resource resampling.test_24_solar_battery_grid_non_annualintegration regression test verifying sub-annual runs and plant-life CF projection.Section 1: Type of Contribution
Section 2: Draft PR Checklist
TODO:
_simulation_duration_boundson validated concrete modelstest_all_examples.pyType of Reviewer Feedback Requested (on Draft PR)
Implementation feedback:
calculate_annual_cf_and_replacement_scheduleandcalculate_annual_varopexacross grid, solar, storage, and demand modelsSection 3: General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.mdSection 4: Related Issues
Resolves H2Integrate NatLabRockies#204
Section 5: Impacted Areas of the Software
Section 5.1: New Files
resource_files/solar/30.6617_-101.7096_psmv3_60_2014.csvtest_pysam_solar.py.Section 5.2: Modified Files
h2integrate/converters/solar/solar_pysam.pycalculate_annual_cf_and_replacement_schedule()for non-annual horizons and widens duration bounds.h2integrate/converters/solar/atb_utility_pv_cost.pyh2integrate/converters/grid/grid.pycalculate_annual_cf_and_replacement_schedule()andcalculate_annual_varopex(); widens duration bounds.h2integrate/demand/demand_baseclass.py&generic_demand.pyGenericDemandComponent.h2integrate/storage/storage_baseclass.py&storage_performance_model.pyStoragePerformanceModel.h2integrate/storage/battery/atb_battery_cost.pyh2integrate/control/control_strategies/storage/demand_openloop_storage_controller.pydt_amount; widens duration bounds.h2integrate/transporters/cable.py&generic_combiner.pyexamples/24_solar_battery_grid/(run_solar_battery_grid.py,plant_config.yaml)examples/test/test_all_examples.pytest_24_solar_battery_grid_non_annual.h2integrate/converters/solar/test/test_pysam_solar.pySection 6: Additional Supporting Information
Completes the non-annual simulation feature stack (NatLabRockies#897> -> NatLabRockies#893 -> # -> this PR).
Section 7: Test Results, if applicable
Targeted solar, grid, storage, demand, and example integration tests all pass.