h2integrate.control.control_rules.converters.generic_converter_min_operating_cost#

Classes

PyomoDispatchGenericConverterMinOperatingCosts(...)

Class defining Pyomo rules for the optimized dispatch for load following for generic commodity production components.

class h2integrate.control.control_rules.converters.generic_converter_min_operating_cost.PyomoDispatchGenericConverterMinOperatingCosts(commodity_info, pyomo_model, index_set, round_digits, time_duration, block_set_name='converter')#

Class defining Pyomo rules for the optimized dispatch for load following for generic commodity production components.

Parameters:
  • commodity_info (dict) – Dictionary of commodity information. This must contain the keys “commodity_name” and “commodity_storage_units”.

  • pyomo_model (pyo.ConcreteModel) – Externally defined Pyomo model that works as the base model that this class builds off of.

  • index_set (pyo.Set) – Externally defined Pyomo index set for time steps. This should be consistent with the forecast horizon of the optimization problem.

  • round_digits (int) – Number of digits to round to in the Pyomo model.

  • block_set_name (str, optional) – Name of the block set (model variables). Defaults to “converter”.

  • time_duration (float)

initialize_parameters(commodity_in, commodity_demand, dispatch_inputs)#

Initialize parameters for optimization model

Parameters:
  • commodity_in (list) – List of generated commodity in for this time slice.

  • commodity_demand (list) – The demanded commodity for this time slice.

  • dispatch_inputs (dict) – Dictionary of the dispatch input parameters from config

dispatch_block_rule_function(pyomo_model)#

Creates and initializes pyomo dispatch model components for a specific technology.

This method sets up all model elements (parameters, variables, constraints, and ports) associated with a technology block within the dispatch model. It is typically called in the setup_pyomo() method of the PyomoControllerBaseClass.

Parameters:
  • pyomo_model (pyo.ConcreteModel) – The Pyomo model to which the technology components will be added.

  • tech_name (str) – The name or key identifying the technology (e.g., “battery”, “electrolyzer”) for which model components are created.

_create_variables(pyomo_model)#

Create generic converter variables to add to Pyomo model instance.

Parameters:

pyomo_model (pyo.ConcreteModel) – pyomo_model the variables should be added to.

_create_ports(pyomo_model)#

Create generic converter ports to add to pyomo model instance.

Parameters:

pyomo_model (pyo.ConcreteModel) – pyomo_model the ports should be added to.

_create_parameters(pyomo_model)#

Create generic converter Pyomo parameters to add to the Pyomo model instance.

This method defines converter parameters such as available production and the cost per generation for the technology

Parameters:

pyomo_model (pyo.ConcreteModel) – pyomo_model that parameters are added to.

_create_constraints(pyomo_model)#

Create generic converter Pyomo constraints to add to the Pyomo model instance.

Method is currently empty but this serves as a placeholder to add constraints to the Pyomo model instance if this class is inherited.

Parameters:

pyomo_model (pyo.ConcreteModel) – pyomo_model that constraints are added to.

update_time_series_parameters(commodity_in, commodity_demand, updated_initial_soc)#

Updates the pyomo optimization problem with parameters that change with time

Parameters:
  • commodity_in (list) – List of generated commodity in for this time slice.

  • commodity_demand (list) – The demanded commodity for this time slice.

  • updated_initial_soc (float) – The updated initial state of charge for storage technologies for the current time slice.

min_operating_cost_objective(hybrid_blocks, tech_name)#

Generic converter instance of minimum operating cost objective.

Parameters:
  • hybrid_blocks (Pyomo.block) – A generalized container for defining hierarchical models by adding modeling components as attributes.

  • tech_name (str) – The name or key identifying the technology for which

  • created. (ports are)

_create_hybrid_port(hybrid_model, tech_name)#

Create generic converter ports to add to system-level pyomo model instance.

Parameters:
  • hybrid_model (pyo.ConcreteModel) – hybrid_model the ports should be added to.

  • tech_name (str) – The name or key identifying the technology for which

  • created. (ports are)

_create_hybrid_variables(hybrid_model, tech_name)#

Create generic converter variables to add to system-level pyomo model instance.

Parameters:
  • hybrid_model (pyo.ConcreteModel) – hybrid_model the variables should be added to.

  • tech_name (str) – The name or key identifying the technology for which

  • created. (variables are)

property available_production: list#

Available production.

Returns:

list – List of available production.

property cost_per_production: float#

Cost per generation [$/commodity_storage_units].

property time_duration: list#

Time duration.