StorageExtBETA class

The extended storage class provides the option to formulate:

  • fixed or maximum operation rates of the state of charge of a storage component as well as
  • time dependent cost factors for the charging operation..

StorageExtBETA class description:

class storageExt.StorageExtBETA(esM, name, commodity, stateOfChargeOpRateMax=None, stateOfChargeOpRateFix=None, opexPerChargeOpTimeSeries=None, stateOfChargeTsaWeight=1, opexChargeOpTsaWeight=1, **kwargs)[source]

A StorageExt component shows the behavior of a Storage component but it is additionally possible to set a state of charge time series. The StorageExt class inherits from the Storage class.

__init__(esM, name, commodity, stateOfChargeOpRateMax=None, stateOfChargeOpRateFix=None, opexPerChargeOpTimeSeries=None, stateOfChargeTsaWeight=1, opexChargeOpTsaWeight=1, **kwargs)[source]

Constructor for creating an StorageExt class instance. The StorageExt component specific input arguments are described below. The Storage component specific input arguments are described in the Storage class and the general component input arguments are described in the Component class.

Default arguments:

Parameters:
  • stateOfChargeOpRateMax (None or Pandas DataFrame with positive (>= 0) entries. The row indices have to match the in the energy system model specified time steps. The column indices have to match the in the energy system model specified locations.) – if specified, indicates a maximum state of charge for each location and each time step by a positive float. If hasCapacityVariable is set to True, the values are given relative to the installed capacities (i.e. a value of 1 indicates a utilization of 100% of the capacity). If hasCapacityVariable is set to False, the values are given as absolute values in form of the commodityUnit, referring to the commodity stored in the component at the beginning of one time step.
    * the default value is None
  • stateOfChargeOpRateFix (None or Pandas DataFrame with positive (>= 0) entries. The row indices have to match the in the energy system model specified time steps. The column indices have to match the in the energy system model specified locations.) – if specified, indicates a fixed state of charge for each location and each time step by a positive float. If hasCapacityVariable is set to True, the values are given relative to the installed capacities (i.e. a value of 1 indicates a utilization of 100% of the capacity). If hasCapacityVariable is set to False, the values are given as absolute values in form of the commodityUnit, referring to the commodity stored in the component at the beginning of one time step.
    * the default value is None
  • stateOfChargeTsaWeight (positive (>= 0) float) – weight with which the stateOfChargeOpRate (max/fix) time series of the component should be considered when applying time series aggregation.
    * the default value is 1
addToEnergySystemModel(esM)[source]

Function for adding a StorageExt component to the given energy system model.

Parameters:esM (EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
setTimeSeriesData(hasTSA)[source]

Function for setting the maximum operation rate and fixed operation rate for the state of charge, charging and discharging depending on whether a time series analysis is requested or not.

Parameters:hasTSA (boolean) – states whether a time series aggregation is requested (True) or not (False).
getDataForTimeSeriesAggregation()[source]

Function for getting the required data if a time series aggregation is requested.

setAggregatedTimeSeriesData(data)[source]

Function for determining the aggregated maximum and fixed state of charge/ discharge rate/ charge rate.

Parameters:data (Pandas DataFrame) – Pandas DataFrame with the clustered time series data of the source component

Inheritance diagram:

Inheritance diagram of StorageExtBETA

StorageExtModel class description:

class storageExt.StorageExtModel[source]

A StorageExtModel class instance will be instantly created if a StorageExt class instance is initialized. It is used for the declaration of the sets, variables and constraints which are valid for the StorageExt class instance. These declarations are necessary for the modeling and optimization of the energy system model. The StorageExtModel class inherits from the StorageModel class.

declareSets(esM, pyM)[source]

Declare sets and dictionaries.

Parameters:
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
operationModeSOCwithTSA1(pyM, esM)[source]

Declare the constraint that the state of charge [commodityUnit*h] is limited by the installed capacity [commodityUnit*h] and the relative maximum state of charge [-].

Parameters:
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
operationModeSOCwithTSA2(pyM, esM)[source]

Declare the constraint that the state of charge [commodityUnit*h] is equal to the installed capacity [commodityUnit*h] multiplied by state of charge time series [-].

Parameters:
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
operationModeSOCwithTSA3(pyM, esM)[source]

Declare the constraint that the state of charge [commodityUnit*h] is limited by the installed capacity [commodityUnit*h] multiplied by state of charge time series [-].

Parameters:
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
operationModeSOCwithTSA4(pyM, esM)[source]

Declare the constraint that the operation [commodityUnit*h] is equal to the operation time series [commodityUnit*h].

Parameters:
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
operationModeSOCwithTSA5(pyM, esM)[source]

Declare the constraint that the operation [commodityUnit*h] is limited by the operation time series [commodityUnit*h].

Parameters:
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
declareComponentConstraints(esM, pyM)[source]

Declare time independent and dependent constraints.

Parameters:
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
getSharedPotentialContribution(pyM, key, loc)[source]

Get contributions to shared location potential.

hasOpVariablesForLocationCommodity(esM, loc, commod)[source]

Check if the storage of a commodity is eligible in a certain location.

Parameters:
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
  • loc (string) – Name of the regarded location (locations are defined in the EnergySystemModel instance)
  • commod – Name of the regarded commodity (commodities are defined in the EnergySystemModel instance)
  • commod – string
getCommodityBalanceContribution(pyM, commod, loc, p, t)[source]

Get contribution to a commodity balance.

getObjectiveFunctionContribution(esM, pyM)[source]

Get contribution to the objective function.

Parameters:
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
setOptimalValues(esM, pyM)[source]

Set the optimal values of the components.

Parameters:
  • esM (esM - EnergySystemModel class instance) – EnergySystemModel instance representing the energy system in which the component should be modeled.
  • pyM (pyomo ConcreteModel) – pyomo ConcreteModel which stores the mathematical formulation of the model.
getOptimalValues(name='all')[source]

Return optimal values of the components.

Parameters:name – name of the variables of which the optimal values should be returned:
  • ‘capacityVariables’,
  • ‘isBuiltVariables’,
  • ‘chargeOperationVariablesOptimum’,
  • ‘dischargeOperationVariablesOptimum’,
  • ‘stateOfChargeOperationVariablesOptimum’,
  • ‘all’ or another input: all variables are returned.


* the default value is ‘all’ :type name: string

Returns:a dictionary with the optimal values of the components
Return type:dict

Inheritance diagram:

Inheritance diagram of StorageExtModel