cronian.DERs.storage ==================== .. py:module:: cronian.DERs.storage .. autoapi-nested-parse:: Model of a storage asset that can buffer an arbitrary energy carrier. Functions --------- .. autoapisummary:: cronian.DERs.storage.add_storage_asset_to_model cronian.DERs.storage.add_simple_model_of_storage_asset cronian.DERs.storage.add_complex_model_of_storage_asset cronian.DERs.storage.add_storage_asset_minimum_state_of_charge_constraint cronian.DERs.storage.add_storage_asset_availability_constraints Module Contents --------------- .. py:function:: 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. .. py:function:: 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 .. py:function:: 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. .. py:function:: 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. .. py:function:: 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.