NatLabRockies / NatLabRockies/H2Integrate

Unify simplistic dispatch logic between open-loop control and demand components

Open
#382 0 comments 0 reactions 1 assignee View on GitHub

@jaredthomas68 is already working on this.

Since Dec 2, 2025.

code cleanup
Dominant language
Python
Stars
26
Forks
44
Avg merge
3d 22h
Merged PRs (30d)
16

Description

The code in h2integrate/control/control_strategies/demand_openloop_controller.py, h2integrate/control/control_strategies/converters/flexible_demand_openloop_controller.py, and h2integrate/control/control_strategies/openloop_controllers.py#L307 have very similar uses and could possibly be generalized to be a single method or function.

I think that combining them, and simplifying as appropriate, would be a valuable contribution to avoid maintaining very similar sets of logic implemented in very different ways in different places within the same package. I think the simplest implementation is h2integrate/control/control_strategies/demand_openloop_controller.py, which could maybe serve as the basis for a shared method.

It would likely be useful to still allow each component that uses the shared method or function to keep use-specific naming conventions rather than imposing potentially over-generalized names on users.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.