Skip to content

Commit 6c50f4b

Browse files
authored
Enable use of Pyomo Controllers in the Storage Autosizing Model (#621)
* updated autosizing storage model to be compatible with pyomo controllers * renamed fixures in heuristic controller tests * aggregated heuristic controller tests into one file * added simple test for storage autosizing and heuristic * renamed fixtures in optimized controller tests * aggregated optimized control tests into one file * updated test for heuristic controller with autosizing * updated so simple storage autosizing can run with optimal pyomo control
1 parent 59687f3 commit 6c50f4b

7 files changed

Lines changed: 951 additions & 489 deletions

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
- Bugfix input energy to OAE financial model [PR 617](https://github.com/NatLabRockies/H2Integrate/pull/617)
2626
- Remove `MarineCarbonCapture` base classes
2727
- Added base class (`StorageOpenLoopControlBase`) and base configuration class (`StorageOpenLoopControlBaseConfig`) for open-loop storage control strategies and updated the existing open-loop storage control strategies to inherit these [PR 619](https://github.com/NatLabRockies/H2Integrate/pull/619)
28+
- Updated the `StorageAutoSizingModel` model to be compatible with Pyomo control strategies [PR 621](https://github.com/NatLabRockies/H2Integrate/pull/621)
29+
2830
## 0.7.1 [March 13, 2026]
2931

3032
### Updates

h2integrate/control/control_strategies/optimized_pyomo_controller.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@ def initialize_parameters(self, inputs):
286286
"""
287287
# Where pyomo model communicates with the rest of the controller
288288
# self.hybrid_dispatch_model is the pyomo model, this is the thing in hybrid_rule
289+
if "max_charge_rate" in inputs:
290+
self.dispatch_inputs["max_charge_rate"] = inputs["max_charge_rate"][0]
291+
if "storage_capacity" in inputs:
292+
self.dispatch_inputs["max_capacity"] = inputs["storage_capacity"][0]
289293
self.hybrid_dispatch_model = self._create_dispatch_optimization_model()
290294
self.hybrid_dispatch_rule.create_min_operating_cost_expression()
291295
self.hybrid_dispatch_rule.create_arcs()

0 commit comments

Comments
 (0)