The upcoming section explains the cyclic (called C) and three seasonal storage models (called S).

### Cyclic storage model

The stored energy \(E_t\) is calculated from the charging \(P_{t}^{c}\) and discharging power \(P_{t}^{d}\). Charging and discharging losses are considered by the corresponding efficiencies \(\eta _{charge}\) and \(\eta _{discharge}\). Furthermore, a self-discharging rate \(\eta _{self}\) with the corresponding time step duration \(\delta t\) is considered.

$$\begin{aligned} E_t = E_{t-1} \cdot \left( 1 - \eta _{self} \cdot \delta t \right) + \left( P_{t}^{c} \cdot \eta _{charge} - \frac{P_{t}^{d} }{\eta _{discharge}}\right) \cdot \delta t. \end{aligned}$$

(1)

The stored energy \((E_t)\) has to stay between zero and maximal capacity \(E_{max}\).

$$\begin{aligned} 0 \le E_t \le E_{max}. \end{aligned}$$

(2)

The storage must have the same state of charge at the period‘s start and end \((E_{t=0} = E_{t=N})\). Additionally, this state of charge has to be the same for all periods.

### Seasonal storage model of Gabrielli et al. (2018)

Seasonal storage model of Gabrielli et al. (2018) (called S-G) creates a storage variable for the entire year with its yearly time step \((E_h)\). Besides, it links the charging \(\left( {P_{t}^{c}}_{=f({h})}\right)\) and discharging power \(\left( {P_{t}^{d}}_{={f}({h})}\right)\) of the period’s time step to that yearly time step. The function *f* gets the time step of the year *h* as an input and is returning the corresponding period with its period’s time step.

$$\begin{aligned} E_h= E_{h-1} \cdot \left( 1 - \eta _{self} \cdot \delta t \right) + \left( {P_{t}^{c}}_{={f}({h})} \cdot \eta _{charge} - \frac{{P_{t}^{d}}_{={f}({h})} }{\eta _{discharge}}\right) \cdot \delta t. \end{aligned}$$

(3)

The cyclic boundary condition is used to connect the last and first storage variable of the total simulation interval (\(E_{h=1} = E_{h=end+1}\)).

### Seasonal storage model of Kotzur et al. (2018)

The seasonal storage model of Kotzur et al. (2018) (called S-K) contains three types of constraints. The first constraint links the typical day’s state of charge with the state of charge within these typical periods. The second constraint is limiting the state of charge within the typical days, which aims to avoid negative states of charge or overcharging. The last constraint considers the actual charging, discharging, and losses within the period. This equation applies to both models (S-K and the new one).

This charging and discharging constraint is formulated as follows:

$$\begin{aligned} \Delta E_t= \Delta E_{t-1} \cdot \left( 1 - \eta _{self} \cdot \delta t \right) + \left( P_{t}^{c} \cdot \eta _{charge} - \frac{P_{t}^{d}}{\eta _{discharge}}\right) \cdot \delta t, \end{aligned}$$

(4)

where \(\Delta E_t\) is the stored or in case of negative values the extracted energy since the beginning of the period at the time step t. The charging \(P_{t}^{c}\) and discharging power \(P_{t}^{d}\) have a charging \(\eta _{charge}\) and discharging efficiency \(\eta _{discharge}\).

The stored energy at the end of each period (\(E_p\)) is implemented as follows:

$$\begin{aligned} E_p = E_{p-1} \cdot \left( 1-\eta _{self} \cdot \delta t \right) ^{N} + \Delta E_{t=N}, \end{aligned}$$

(5)

*N* is the number of time steps in the period. The cyclic boundary condition is used to connect the last and first amount of stored energy of the total simulation interval (\(E_{p=1} = E_{p=end+1}\)).

The boundaries during the period are implemented as follows:

$$\begin{aligned} 0 \le E_{p-1} \cdot \left( 1-\eta _{self} \cdot \delta t \right) ^{N} + \Delta E_t \le E_{max}. \end{aligned}$$

(6)

This equation should avoid overcharging. Due to the calculated self-discharging rate for the entire period (*N*) this is not ensured. This equation does not hold for filled storage at the period’s beginning and a charging rate as high as the self-discharge loss of the period (\(\Delta E_t = (1 - \left( 1-\eta _{self} \cdot \delta t \right) ^{N}) \cdot E_{max}\)). Equations (7) and (8) show this connection.

$$\begin{aligned}&E_{max} \cdot \left( 1-\eta _{self} \cdot \delta t \right) ^{N} + \left( 1-\left( 1-\eta _{self} \cdot \delta t \right) ^{N}\right) \cdot E_{max} = E_{max} \le E_{max}. \end{aligned}$$

(7)

$$\begin{aligned}&E_{max} \cdot \left( 1-\eta _{self} \cdot \delta t \right) ^{1} + \left( 1-\left( 1-\eta _{self} \cdot \delta t \right) ^{N}\right) \cdot E_{max} \nonumber \\&\quad =(1 + \left( 1-\eta _{self} \cdot \delta t \right) ^{1} - \left( 1-\eta _{self} \cdot \delta t \right) ^{N})\cdot E_{max} \not \le E_{max} \nonumber \\&\qquad \qquad \forall {\textbf { }}\eta _{self}> 0 \text { and } N > 1. \end{aligned}$$

(8)

Using the current time step within the period (t) instead of the total number of time steps within a period (*N*) as an exponent for the self-discharging rate avoids this overcharging. The resulting equation is:

$$\begin{aligned} 0 \le E_{p-1} \cdot \left( 1-\eta _{self} \cdot \delta t \right) ^{{t}} + \Delta E_t \le E_{max}. \end{aligned}$$

(9)

### New seasonal storage model

The new model (called S-N) checks for periods of the same type during the year in a row (\(M>1\)). If those periods occur, Eq. ( 5) which links the stored energy from the period to the inter period one, reformulates to:

$$\begin{aligned} \begin{aligned} E_p&= E_{p-1} \cdot \left( 1-\eta _{self} \cdot \delta t\right) ^{N\cdot M} + \Delta E_{t=N} \cdot \sum _{i=0}^{M-1} \left( \left( 1-\eta _{self} \cdot \delta t\right) ^{N}\right) ^{i}. \end{aligned} \end{aligned}$$

(10)

The summation over the self discharging rate can be simplified to (*F*):

$$\begin{aligned} F = \sum _{i=0}^{M-1} \left( \left( 1-\eta _{self} \cdot \delta t\right) ^{N}\right) ^{i} = \frac{1 - \left( 1-\eta _{self} \cdot \delta t\right) ^{N \cdot M}}{1-\left( 1-\eta _{self} \cdot \delta t\right) ^{N}}. \end{aligned}$$

(11)

This simplification leads to:

$$\begin{aligned} \begin{aligned} E_p = E_{p-1} \cdot \left( 1-\eta _{self} \cdot \delta t\right) ^{N \cdot M} + \Delta E_{t=N} \cdot F. \end{aligned} \end{aligned}$$

(12)

.

The new model summarizes the periods of the same type within a row. Ensuring no overcharging or negative state of charges needs two new boundaries within the period. The first one ensures the current states for the first summarized period and the second one for the last. Equation (9) is accomplishing this for the first one. The second one needs the storage state at the beginning of the last summarized period. Equation (5) determines this state. The combination of this equation with Eq. (10) leads to the following equation:

$$\begin{aligned} \begin{aligned} 0&\le E_{p-1} \cdot \frac{\left( 1-\eta _{self} \cdot \delta t\right) ^{N \cdot M} }{\left( 1-\eta _{self} \cdot \delta t\right) ^{N} \cdot F} \cdot \left( 1-\eta _{self} \cdot \delta t\right) ^{{t}} \\&\quad + \frac{E_p \cdot \left( 1 - \frac{1}{F}\right) }{\left( 1-\eta _{self} \cdot \delta t\right) ^{N}} \cdot \left( 1-\eta _{self} \cdot \delta t\right) ^{{t}} + \Delta E_t \le E_{max}. \end{aligned} \end{aligned}$$

(13)