# Energy Storage¶

Storages can optionally be set in urbs. They introduce additional variables and constraints, contribute to the cost function but do not increase the index depth of all variables and parameters. For this and all the further features all variables will be written in the full index depth, i.e. for intertemporal models with multiple vertices. For storages the capacity and the charging/discharging power are expanded independently. For each storage one commodity is specified which is stored. It is thus not necessary to specify the commodity as an extra index in the variables and parameters. With added storages the variable vector then reads:

Here, the new storage variables \(\kappa^{\text{c,p}}_{yvs}\) and \(\widehat{\kappa}^{\text{c,p}}_{yvs}\) stand for the total and new capacities of storage capacity and power of storage unit \(s\), in modeled year \(y\) at vertex \(v\), respectively, the variables \(\epsilon^{\text{in,out}}_{yvst}\) represent the input and output to storage \(s\) in year \(y\) at vertex \(v\) at time \(t\) and \(\epsilon^{\text{con}}_{yvst}\) the storage state.

## Costs¶

The costs are changed in a straightforward way. The invest, fix and variable costs are now summed over the storage capacities, powers and the total amount of charged and discharged commodity in addition to the process indices. As in the case of transmissions there are no qualitative changes to the costs.

## Storage Expansion Constraints¶

Storages are expanded in their capacity and charging and discharging power separately. The respective constraints read:

where \(\kappa^{\text{c,p}}_{yvs}\) are the total installed capacity and power, repectively, in year \(y\) at site \(v\) of storage \(s\) and \(\widehat{\kappa}^{\text{c,p}}_{yvs}\) the corresponding newly installed storage capacities and powers. Both quantities are then also given an upper and a lower bound via:

## Commodity Dispatch Constraints¶

The commodity unit utilization constraints are expanded by the use of storages.

### Amendments to the Vertex Rule¶

The vertex rule is changed, since additional commodity flows into and out of the storages can occur. The commodity balance function is thus changed to:

Here, the new tuple sets \(C^{\text{in,out}}_{y,v,s,c}\) represent all inputs and outputs in year \(y\) at vertex \(v\) of commodity \(c\) into storage \(s\). The variables \(\epsilon^{\text{in,out}}_{yvst}\) are then the inputs and outputs of commodities to and from storages.

## Storage Dispatch Constraints¶

In a storage the energy content \(\epsilon^{\text{con}}_{yvst}\) has to be calculated. This is achieved by simply adding all inputs to and subtracting all outputs from the storage content at the previous time step \(\epsilon^{\text{con}}_{yvs(t-1)}\):

Here, \(e^{\text{in,out}}_{yvs}\) are the efficiencies for charging and discharging, respectively, and \(d_{yvs}\) is the hourly self discharge rate.

### Basic Storage Dispatch Rules¶

Similar to processes and transmission lines, inputs and outputs are limited by the power capacity of the storage:

Additionally, the storage content is limited by the total storage energy capacity:

### Initial and Final State¶

In order to avoid windfall profits for the optimization by, e.g., emptying a storage over the model horizon, the initial and final storage content are linked via:

where \(t_{1,N}\) are the initial and final modeled timesteps, respectively. The inequality simplifies the model solving by relaying an otherwise unnecessarily strict constraint. A small disadvantage arises when the system can gain costs or save CO2 by filling a storage. This case is, however, not too common. It is additionally possible for the user to fix the initial storage content via:

where \(I_{yvs}\) is the fraction of the total storage capacity that is filled at the beginning of the modeling period.

### Fixed Energy/Power Ratio¶

It is sometimes desirable to fix the ratio between energy capacity and charging/discharging power for a given storage. This is modeled by the possibility to set a linear dependence between the capacities through a user-defined “energy to power ratio” \(k_{yvs}^\text{E/P}\). Note that this constraint is only active for the storages with a positive value under the column “ep-ratio” in the input file, and when this value is not given, the power and energy capacities can be sized independently

This concludes the storage feature.