Repository navigation
Conversation
johnjasa
added this pull request to stack #959
October 23, 2026 05:42
# Conflicts: # CHANGELOG.md
Collaborator
|
After the example is run, I am seeing all of the set points from the SLC have the same value for the whole 8760. Why is this? Will this always be the case or should the SLC set points change according to wind/solar resource or other time-varying inputs? |
This branch has not been deployed
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.
SLC: Heterogeneous-commodity example, dispatch guide, and integration regression
Adds the end-to-end example, documentation, and regression tests for heterogeneous-commodity system-level control (SLC). This is the last PR of the stack and closes out #741.
examples/35_system_level_control/heterogeneous_commodity/models wind and solar feeding a generation combiner, a battery, and an electricity splitter that serves both an electrolyzer and a Haber-Bosch loop (with a nitrogen feedstock), all following an ammonia demand throughDemandFollowingControl. The runner script plots a week of electricity, hydrogen, ammonia, and battery dispatch and reports the measured upstream requirements (about 10.9 kWh electricity and 0.20 kg hydrogen per kg ammonia).scale_control_variables: true(Add opt-inscale_control_variablessolver option for system-level control #957), aggregate conversion ratios with plain Gauss-Seidel (max_iter: 150,rtol: 1e-8), anderr_on_non_converge: true.rtol: 1e-10does not converge within 150 iterations and disabling Aitken stalls, so neither is used.slc_heterogeneous_commodity.md, walks through the dispatch and measured ratios with plots.slc_demand_following.mdandsystem_level_control_base.mdlink to it and include its convergence results.test_slc_heterogeneous_commodityruns the full 8760-hour example with strict convergence, checks ammonia demand limits and the Haber-Bosch hydrogen balance hourly, pins annual physical and economic anchors (1% tolerance), and re-runs after a technology rename and a connection reorder to confirm hourly set-point profiles match (0.1% tolerance).test_slc_grid_backs_haber_bosch_onlycovers a grid wired only to Haber-Bosch.This is part 6 of 6 (#962) in a stack that splits up #844 (topology-aware heterogeneous-commodity SLC dispatch). It depends on all of the earlier PRs. Once the stack has merged, #844 can be closed.
slc_hetero_Aslc_hetero_Bslc_hetero_Cslc_hetero_Dslc_hetero_Eslc_hetero_F(this PR)Type of Contribution
General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.mdRelated Issues
Resolves #741: commodity-path supplier tracing, converter detection, and aggregated conversion ratios to the demand technology, including the grid-to-ammonia, fuel-cell, and splitter cases listed in the issue (with #959 to #961). Related: #747. Supersedes #816.
Impacted Areas of the Software
New Files
examples/35_system_level_control/heterogeneous_commodity/heterogeneous_commodity.yaml,plant_config.yaml,tech_config.yaml,driver_config.yaml: wind, solar, battery, combiners, electricity splitter, electrolyzer, Haber-Bosch, nitrogen feedstock, and ammonia demand underDemandFollowingControl.run_heterogeneous.py: runs the example, prints the measured conversion ratios, and plots the dispatch.Modified Files
h2integrate/control/control_strategies/system_level/test/test_slc_examples.pytest_slc_heterogeneous_commodityandtest_slc_grid_backs_haber_bosch_only;test_slc_upstream_demandcompares the wind set point to rated production with a tight tolerance (rtol=atol=1e-8) instead of exact equality.Additional Supporting Information
test_all_examples.pybecause the dedicated SLC test already runs the same model.Test Issues
pytest . -m "unit or regression or integration"): 972 passed, 2 skipped, 2 xfailed, 5 xpassed, and 1 failure,test/test_docs_consistency.py::test_yaml_model_references_are_registered. That test passes when run on its own (3 passed); it fails only in the full run, where an earlier test (windIO, imported by the Ard example) registers a global YAML!includeconstructor. It is unrelated to this stack.test_slc_examples.pyandtest_docs_consistency.py(all markers): 13 passed.docs/build_book.sh, warnings as errors): succeeded.