h2integrate.control.control_strategies.storage.demand_openloop_storage_controller#

Classes

DemandOpenLoopStorageController(**kwargs)

A controller that manages commodity flow based on demand and storage constraints.

DemandOpenLoopStorageControllerConfig(*, ...)

Configuration class for the DemandOpenLoopStorageController.

class h2integrate.control.control_strategies.storage.demand_openloop_storage_controller.DemandOpenLoopStorageControllerConfig(*, commodity, commodity_rate_units, demand_profile, commodity_amount_units=None, max_capacity=None, max_soc_fraction=None, min_soc_fraction=None, init_soc_fraction=None, max_charge_rate=None, charge_equals_discharge=True, max_discharge_rate=None, charge_efficiency=None, discharge_efficiency=None, round_trip_efficiency=None)#

Configuration class for the DemandOpenLoopStorageController.

This class defines the parameters required to configure the DemandOpenLoopStorageController.

Parameters:
  • commodity (str)

  • commodity_rate_units (str)

  • demand_profile (int | float | list | dict)

  • commodity_amount_units (str)

  • max_capacity (float | None)

  • max_soc_fraction (float | None)

  • min_soc_fraction (float | None)

  • init_soc_fraction (float | None)

  • max_charge_rate (float | None)

  • charge_equals_discharge (bool)

  • max_discharge_rate (float | None)

  • charge_efficiency (float | None)

  • discharge_efficiency (float | None)

  • round_trip_efficiency (float | None)

require_storage_parameters: ClassVar[bool] = True#
class h2integrate.control.control_strategies.storage.demand_openloop_storage_controller.DemandOpenLoopStorageController(**kwargs)#

A controller that manages commodity flow based on demand and storage constraints.

The DemandOpenLoopStorageController computes the dispatch commands for a commodity storage system. It uses a demand profile and storage parameters to determine how much of the commodity to charge, discharge, or curtail at each time step.

_time_step_bounds = (3600, 3600)#
setup()#

Declare inputs and outputs.

Available attributes:

name pathname comm options

compute(inputs, outputs)#

Compute storage state of charge (SOC), delivered output, curtailment, and unmet demand over the simulation horizon.

This method applies an open-loop storage control strategy to balance the commodity demand and input flow. When input exceeds demand, excess commodity is used to charge storage (subject to rate, efficiency, and SOC limits). When demand exceeds input, storage is discharged to meet the deficit (also subject to constraints). SOC is updated at each time step, ensuring it remains within allowable bounds.

Expected input keys:
  • <commodity>_in: Timeseries of commodity available at each time step.

  • <commodity>_set_point: Timeseries set-point profile.

  • max_charge_rate: Maximum charge rate permitted.

  • max_capacity: Maximum total storage capacity.

Outputs populated:
  • <commodity>_command_value: Dispatch command to storage,

    negative when charging, positive when discharging.

Control logic includes:
  • Enforcing SOC limits (min, max, and initial conditions).

  • Applying charge and discharge efficiencies.

  • Observing charge/discharge rate limits.

  • Tracking energy shortfalls and excesses at each time step.

Raises:
  • UserWarning -- If the set-point profile is entirely zero.

  • UserWarning -- If max_charge_rate or max_capacity is negative.

Returns:

None