cronian.DERs.storage

Model of a storage asset that can buffer an arbitrary energy carrier.

Functions

add_storage_asset_to_model(model, prosumer, ...)

Add a storage asset to the optimization model of the given prosumer.

add_simple_model_of_storage_asset(...)

Add a simple model of the storage asset to the optimization model.

add_complex_model_of_storage_asset(...)

Add a complex model of the storage asset to the optimization model.

add_storage_asset_minimum_state_of_charge_constraint(...)

Add minimum state-of-charge constraint for the storage asset.

add_storage_asset_availability_constraints(...)

Add availability constraints for the storage asset.

Module Contents

cronian.DERs.storage.add_storage_asset_to_model(model: pyomo.environ.AbstractModel, prosumer: dict, asset_name: str, timeseries_data: pandas.DataFrame, number_of_timesteps, storage_model: str)

Add a storage asset to the optimization model of the given prosumer.

Example of storage assets: battery, heat storage, hydrogen storage, etc.

Args:

model: Pyomo model to which the prosumer’s storage will be added. prosumer: Dictionary containing prosumer details. asset_name: Name of the storage asset, e.g., battery. timeseries_data: Timeseries data containing the availability factors for

VRE generators and EVs doing V2G, demand profiles for prosumers, …

number_of_timesteps: Number of timesteps to run the optimization for. storage_model: Type of storage model to use: simple or complex.

Returns:

Pyomo AbstractModel with the storage asset added to it.

Raises:

ValueError: If an invalid storage model is specified.

cronian.DERs.storage.add_simple_model_of_storage_asset(model: pyomo.environ.AbstractModel, prosumer: dict, asset_name: str, timeseries_data: pandas.DataFrame, number_of_timesteps) pyomo.environ.AbstractModel

Add a simple model of the storage asset to the optimization model.

NOTE: The simple_storage model does not strictly/explicitly restrict the simultaneous charge and discharge of the storage. Hence, under negative electricity prices and excess wind generation, storage may charge and discharge at the same time.

Args:

model: Pyomo model to which the prosumer’s storage will be added. prosumer: Dictionary containing prosumer details. asset_name: Name of the storage asset, e.g., battery. timeseries_data: Timeseries data containing the availability factors for

VRE generators and EVs doing V2G, demand profiles for prosumers, …

number_of_timesteps: Number of timesteps to run the optimization for.

Returns:

Pyomo AbstractModel with the storage asset added to it.

Raises:

KeyError: If a required asset parameter is missing

cronian.DERs.storage.add_complex_model_of_storage_asset(model: pyomo.environ.AbstractModel, prosumer: dict, asset_name: str, timeseries_data: pandas.DataFrame, number_of_timesteps) pyomo.environ.AbstractModel

Add a complex model of the storage asset to the optimization model.

NOTE: The complex_storage model strictly/explicitly restricts the simultaneous charge and discharge of the storage using binary variables.

Args:

model: Pyomo model to which the prosumer’s storage will be added. prosumer: Dictionary containing prosumer details. asset_name: Name of the storage asset, e.g., battery. timeseries_data: Timeseries data containing the availability factors for

VRE generators and EVs doing V2G, demand profiles for prosumers, …

number_of_timesteps: Number of timesteps to run the optimization for.

Returns:

Pyomo AbstractModel with the storage asset added to it.

cronian.DERs.storage.add_storage_asset_minimum_state_of_charge_constraint(model: pyomo.environ.AbstractModel, prosumer: dict, asset_name: str, timeseries_data: pandas.DataFrame, number_of_timesteps) pyomo.environ.AbstractModel

Add minimum state-of-charge constraint for the storage asset.

Args:

model: Pyomo model to which the prosumer’s storage will be added. prosumer: Dictionary containing prosumer details. asset_name: Name of the storage asset, e.g., battery. timeseries_data: Timeseries data containing the availability factors for

VRE generators and EVs doing V2G, demand profiles for prosumers, …

number_of_timesteps: Number of timesteps to run the optimization for.

Returns:

Pyomo AbstractModel with the storage asset’s min SOC constraints added.

cronian.DERs.storage.add_storage_asset_availability_constraints(model: pyomo.environ.AbstractModel, prosumer: dict, asset_name: str, timeseries_data: pandas.DataFrame, number_of_timesteps) pyomo.environ.AbstractModel

Add availability constraints for the storage asset.

Args:

model: Pyomo model to which the prosumer’s storage will be added. prosumer: Dictionary containing prosumer details. asset_name: Name of the storage asset, e.g., battery. timeseries_data: Timeseries data containing the availability factors for

VRE generators and EVs doing V2G, demand profiles for prosumers, …

number_of_timesteps: Number of timesteps to run the optimization for.

Returns:

Pyomo AbstractModel with the storage’s availability constraints added.