Simple Battery Dispatch

class hopp.simulation.technologies.dispatch.power_storage.simple_battery_dispatch.SimpleBatteryDispatch(pyomo_model: ConcreteModel, index_set: Set, system_model: BatteryStateful, financial_model: Singleowner | CustomFinancialModel, block_set_name: str, dispatch_options)

Bases: PowerStorageDispatch

A dispatch class for simple battery operations.

__init__(pyomo_model: ConcreteModel, index_set: Set, system_model: BatteryStateful, financial_model: Singleowner | CustomFinancialModel, block_set_name: str, dispatch_options)

Initializes SimpleBatteryDispatch.

Parameters:
  • pyomo_model (pyomo.ConcreteModel) – The Pyomo model instance.

  • index_set (pyomo.Set) – The Pyomo index set.

  • system_model (BatteryModel.BatteryStateful) – The battery stateful model.

  • financial_model (FinancialModelType) – The financial model type.

  • block_set_name (str) – Name of the block set.

  • dispatch_options – Dispatch options.

initialize_parameters()

Initializes parameters.

_set_control_mode()

Sets control mode.

_set_model_specific_parameters(round_trip_efficiency=88.0)

Sets model-specific parameters.

Parameters:

round_trip_efficiency (float, optional) – The round-trip efficiency including converter efficiency. Defaults to 88.0, which includes converter efficiency.

update_time_series_parameters(start_time: int)

Updates time series parameters.

Parameters:

start_time (int) – The start time.

update_dispatch_initial_soc(initial_soc: float | None = None)

Updates dispatch initial state of charge (SOC).

Parameters:

initial_soc (float, optional) – Initial state of charge. Defaults to None.

static _check_efficiency_value(efficiency)

Checks efficiency is between 0 and 1 or 0 and 100. Returns fractional value

_check_initial_soc(initial_soc)

Checks initial state-of-charge.

Parameters:

initial_soc – Initial state-of-charge value.

Returns:

Checked initial state-of-charge.

Return type:

float

_create_capacity_parameter(storage)

Creates storage capacity parameter.

Parameters:

storage – Storage instance.

_create_efficiency_parameters(storage)

Creates storage efficiency parameters.

Parameters:

storage – Storage instance.

_create_lifecycle_count_constraint()

Creates lifecycle count constraint.

_create_lifecycle_model()

Creates lifecycle model.

_create_port(hybrid)

Creates storage port.

Parameters:

hybrid – Hybrid instance.

Returns:

Storage port.

Return type:

Port

_create_soc_inventory_constraint(storage)

Creates state-of-charge inventory constraint for storage.

Parameters:

storage – Storage instance.

_create_soc_linking_constraint()

Creates state-of-charge linking constraint.

_create_storage_constraints(storage)
_create_storage_parameters(storage)

Creates storage parameters.

Parameters:

storage – Storage instance.

static _create_storage_port(storage)

Creates storage port.

Parameters:

storage – Storage instance.

_create_storage_variables(storage)

Creates storage variables.

Parameters:

storage – Storage instance.

_create_variables(hybrid)

Creates storage variables.

Parameters:

hybrid – Hybrid instance.

Returns:

Tuple containing battery discharge and charge variables.

Return type:

Tuple

_lifecycle_count_rule(m, i)

Calculates lifecycle count rule.

Parameters:
  • m – Model instance.

  • i – Index.

Returns:

Lifecycle count.

Return type:

float

property blocks: Block
property capacity: float

Capacity.

property charge_efficiency: float

Charge efficiency.

property charge_power: list

Charge power.

property cost_per_charge: float

Cost per charge.

property cost_per_discharge: float

Cost per discharge.

property current: list

Current.

property discharge_efficiency: float

Discharge efficiency.

property discharge_power: list

Discharge power.

dispatch_block_rule(storage)
Initializes storage parameters, variables, and constraints.

Called during Dispatch’s __init__.

Parameters:

storage – Storage instance.

property generation: list

Generation.

property initial_soc: float

Initial state-of-charge.

property is_charging: list

Storage is charging.

property is_discharging: list

Storage is discharging.

property lifecycle_cost: float

Lifecycle cost.

property lifecycle_cost_per_kWh_cycle: float

Lifecycle cost per kWh cycle.

property lifecycles: float

Lifecycles.

max_gross_profit_objective(hybrid_blocks)

Sets the max gross profit objective for the dispatch.

Parameters:

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

property maximum_power: float

Maximum power.

property maximum_soc: float

Maximum state-of-charge.

min_operating_cost_objective(hybrid_blocks)

Sets the min operating cost objective for the dispatch.

Parameters:

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

property minimum_power: float

Minimum power.

property minimum_soc: float

Minimum state-of-charge.

property model: ConcreteModel
property power: list

Power.

property round_trip_efficiency: float

Round trip efficiency.

property soc: list

State-of-charge.

property time_duration: list

Time duration.