cronian.prosumers

Function to build a prosumer’s optimization model from a yaml configuration.

Functions

add_built_prosumers_to_optimization_model(...)

Add all built prosumers to the optimization model.

build_prosumer_model(→ pyomo.environ.AbstractModel)

Build prosumer's optim. model from prosumer dict and timeseries data.

Module Contents

cronian.prosumers.add_built_prosumers_to_optimization_model(model: pyomo.environ.AbstractModel, prosumers: dict[str, dict], timeseries_data: pandas.DataFrame, number_of_timesteps: int, storage_model: str) pyomo.environ.AbstractModel

Add all built prosumers to the optimization model.

Args:

model: The Pyomo model to add components to. prosumers: Dictionary containing all prosumers (excludes explicitly

modeled prosumers).

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 all built prosumers added.

cronian.prosumers.build_prosumer_model(model: pyomo.environ.AbstractModel, prosumer: dict, timeseries_data: pandas.DataFrame, number_of_timesteps: int, storage_model: str, init_store_levels: dict[str, float] = None) pyomo.environ.AbstractModel

Build prosumer’s optim. model from prosumer dict and timeseries data.

Args:

model: The Pyomo model to add components to. prosumer: Dictionary containing prosumer details. 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. init_store_levels: Amount of energy to initialize each end_use_demand

store with from previously satisfied flexible demand.

Returns:

Pyomo AbstractModel of the given prosumer with all components added.

Raises:

ValueError: If an invalid storage model is provided. Must be ‘simple’ or ‘complex’.