DemandSideManagementBETA class¶
A DemandSideManagementBETA component initializes one source and several storage components.
DemandSideManagementBETA class description:
Last edited: January 21 2020
@author: FINE Developer Team (FZJ IEK3)
Basic idea inspired by:
Zerrahn, Alexander, and WolfPeter Schill. “On the representation of demandside management in
power system models.” Energy 84 (2015): 840845.
Approach adapted to be compatible with time series aggregation (idea: use virtual storages).

class
DSM.
DemandSideManagementBETA
(esM, name, commodity, hasCapacityVariable, tFwd, tBwd, operationRateFix, opexShift=1e06, shiftUpMax=None, shiftDownMax=None, socOffsetDown=1, socOffsetUp=1, **kwargs)[source]¶ A DemandSideManagement component. Allows to shift demands (of Sink components) forwards and backwards in time. Initializes a Sink component and multiple Storage components which are aggregated after optimization.

__init__
(esM, name, commodity, hasCapacityVariable, tFwd, tBwd, operationRateFix, opexShift=1e06, shiftUpMax=None, shiftDownMax=None, socOffsetDown=1, socOffsetUp=1, **kwargs)[source]¶ Constructor for creating an DemandSideManagement class instance. Note: the DemandSideManagement class inherits from the Sink class; kwargs provide input arguments to the Sink component.
Required arguments:
Parameters:  esM (EnergySystemModel instance from the FINE package) – energy system model to which the DemandSideManagement component should be added. Used for unit checks.
 name (string) – name of the component. Has to be unique (i.e. no other components with that name can already exist in the EnergySystemModel instance to which the component is added).
 hasCapacityVariable (boolean) –
specifies if the underlying Sink component should be modeled with a capacity or not. Examples:
 An electrolyzer has a capacity given in GW_electric > hasCapacityVariable is True.
 In the energy system, biogas can, from a model perspective, be converted into methane (and then used in conventional power plants which emit CO2) by getting CO2 from the environment. Thus, using biogas in conventional power plants is, from a balance perspective, CO2 free. This conversion is purely theoretical and does not require a capacity > hasCapacityVariable is False.
 A electricity cable has a capacity given in GW_electric > hasCapacityVariable is True.
 If the transmission capacity of a component is unlimited > hasCapacityVariable is False.
 A wind turbine has a capacity given in GW_electric > hasCapacityVariable is True.
 Emitting CO2 into the environment is not per se limited by a capacity > hasCapacityVariable is False.
 tFwd (integer (>0)) – the number of timesteps for backwards demand shifting.
 tBwd (integer (>= 0)) – the number of timesteps for forwards demand shifting.
 operationRateFix – specifies the original time series of the shiftable demand. 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 for each time step.
Default arguments:
Parameters:  opexShift (positive float (>0)) – operational cost for shifting the demand (given in costUnit/commodityUnit). Setting
this value also penalizes unreasonable, unnecessary shifting of demand.
* the default value is 1e6  shiftUpMax (positive float or None) – maximum amount of upwards shiftable commodity at one timestep. If None, the value
is set equal to the maximum demand of the respective location.
* the default value is None  shiftDownMax (positive float or None) – maximum amount of downwards shiftable commodity at one timestep. If None, the
value is set equal to the maximum demand of the respective location.
* the default value is Nonde  socOffsetDown (float) – determines whether the state of charge at the end of a period p has
to be equal to the one at the beginning of a period p+1 (socOffsetDown=1) or if
it can be smaller at the beginning of p+1 (socOffsetDown>=0). In the latter case,
the product of the parameter socOffsetDown and the actual soc offset is used as a penalty
factor in the objective function. (usefull when infeasibilities are encountered when using
DemandSideManagement and time series aggregation)
* the default value is 1  socOffsetUp (float) – determines whether the state of charge at the end of a period p has
to be equal to the one at the beginning of a period p+1 (socOffsetUp=1) or if
it can be larger at the beginning of p+1 (socOffsetUp>=0). In the latter case,
the product of the parameter socOffsetUp and the actual soc offset is used as a penalty
factor in the objective function. (usefull when infeasibilities are encountered when using
DemandSideManagement and time series aggregation)
* the default value is 1

Inheritance diagram:
DSMModel class description:

class
DSM.
DSMModel
[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.

limitUpDownShifts
(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.

shiftUpMax
(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.

shiftDownMax
(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.

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.

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.

Inheritance diagram: