h2integrate.control.control_strategies.pyomo_storage_controller_baseclass

Contents

h2integrate.control.control_strategies.pyomo_storage_controller_baseclass#

Classes

PyomoStorageControllerBaseClass(**kwargs)

PyomoStorageControllerBaseConfig(*, ...[, ...])

Configuration data container for Pyomo-based storage / dispatch controllers.

SolverOptions(solver_spec_options[, ...])

Class for housing solver options

class h2integrate.control.control_strategies.pyomo_storage_controller_baseclass.PyomoStorageControllerBaseConfig(*, max_capacity, max_soc_fraction, min_soc_fraction, init_soc_fraction, n_control_window, commodity, commodity_rate_units, tech_name, system_commodity_interface_limit, round_digits=4)#

Configuration data container for Pyomo-based storage / dispatch controllers.

This class groups the fundamental parameters needed by derived controller implementations. Values are typically populated from the technology tech_config.yaml (merged under the “control” section).

Parameters:
  • max_capacity (float)

  • max_soc_fraction (float)

  • min_soc_fraction (float)

  • init_soc_fraction (float)

  • n_control_window (int)

  • commodity (str)

  • commodity_rate_units (str)

  • tech_name (str)

  • system_commodity_interface_limit (float | int | str | list[float])

  • round_digits (int)

max_capacity#

Physical maximum stored commodity capacity (inventory, not a rate). Units correspond to the base commodity units (e.g., kg, MWh).

Type:

float

max_soc_fraction#

Upper bound on state of charge expressed as a fraction in [0, 1]. 1.0 means the controller may fill to max_capacity.

Type:

float

min_soc_fraction#

Lower bound on state of charge expressed as a fraction in [0, 1]. 0.0 allows full depletion; >0 reserves minimum inventory.

Type:

float

init_soc_fraction#

Initial state of charge at simulation start as a fraction in [0, 1].

Type:

float

n_control_window#

Number of consecutive timesteps processed per control action (rolling control / dispatch window length).

Type:

int

commodity#

Base name of the controlled commodity (e.g., “hydrogen”, “electricity”). Used to construct input/output variable names (e.g., f”{commodity}_in”).

Type:

str

commodity_rate_units#

Units string for stored commodity rates (e.g., “kg/h”, “MW”). Used for unit annotations when creating model variables.

Type:

str

tech_name#

Technology identifier used to namespace Pyomo blocks / variables within the broader OpenMDAO model (e.g., “battery”, “h2_storage”).

Type:

str

system_commodity_interface_limit#

Max interface (e.g. grid interface) flow used to bound dispatch (scalar or per-timestep list of length n_control_window).

Type:

float | int | str |list[float]

round_digits#

The number of digits to round to in the Pyomo model for numerical stability. The default of this parameter is 4.

Type:

int

max_capacity: float#
max_soc_fraction: float#
min_soc_fraction: float#
init_soc_fraction: float#
n_control_window: int#
commodity: str#
commodity_rate_units: str#
tech_name: str#
system_commodity_interface_limit: float | int | str | list[float]#
round_digits: int#
class h2integrate.control.control_strategies.pyomo_storage_controller_baseclass.PyomoStorageControllerBaseClass(**kwargs)#
_time_step_bounds = (3600, 3600)#
initialize()#

Declare options for the component. See “Attributes” section in class doc strings for details.

dummy_method(in1, in2)#

Dummy method used for setting OpenMDAO input/output defaults but otherwise unused.

Parameters:
  • in1 (any) – dummy input 1

  • in2 (any) – dummy input 2

Returns:

None – empty output

setup()#

Register per-technology dispatch rule inputs and expose the solver callable.

Adds discrete output ‘pyomo_dispatch_solver’ that will hold the assembled callable after compute().

compute(inputs, outputs, discrete_inputs, discrete_outputs)#

Build Pyomo model blocks and assign the dispatch solver.

pyomo_setup(discrete_inputs)#

Create the Pyomo model and return dispatch solver.

Returns:

callable

Function(performance_model, performance_model_kwargs, inputs, commodity)

executing rolling-window dispatch and returning: (total_out, storage_out, unmet_demand, unused_commodity, soc)

static dispatch_block_rule(block, t)#
initialize_parameters()#
update_time_series_parameters(start_time)#
Parameters:

start_time (int)

static _check_efficiency_value(efficiency)#

Checks efficiency is between 0 and 1. Returns fractional value

property blocks: Block#
class h2integrate.control.control_strategies.pyomo_storage_controller_baseclass.SolverOptions(solver_spec_options, log_name='', user_solver_options=None, solver_spec_log_key='logfile')#

Class for housing solver options

Parameters:
  • solver_spec_options (dict)

  • log_name (str)

  • user_solver_options (dict | None)

  • solver_spec_log_key (str)