Skip to content

Inter-cluster storage math

Inbuilt custom math to apply inter-cluster storage math on top of the base mathematical formulation. This math is only applied if referenced in the config.init.custom_math list as storage_inter_cluster.

Download the inter-cluster storage math formulation as a YAML file

Subject to

storage_max

REMOVED

balance_supply_with_storage

UPDATED Fix the outflow of a supply technology to its consumption of the available source, with a storage buffer to temporally offset the outflow from source consumption.

\[ \begin{array}{r} \forall{} \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ carrier }\negthickspace \in \negthickspace\text{ carriers, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ \text{if } (\exists (\textbf{storage}_\text{node,tech,timestep}) \land \textit{base\_tech}_\text{tech}\mathord{=}\text{supply}) \end{array} \begin{cases} \textbf{storage}_\text{node,tech,timestep} = \textit{storage\_initial}_\text{tech} \times \textbf{storage\_cap}_\text{node,tech} + (\textbf{source\_use}_\text{node,tech,timestep} \times \textit{source\_eff}_\text{tech}) - \textbf{flow\_out\_inc\_eff}_\text{node,tech,carrier,timestep}&\quad \text{if } (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\textit{cyclic\_storage}\mathord{=}\text{true})) \\ \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage\_loss}_\text{tech})^{\textit{timestep\_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} + (\textbf{source\_use}_\text{node,tech,timestep} \times \textit{source\_eff}_\text{tech}) - \textbf{flow\_out\_inc\_eff}_\text{node,tech,carrier,timestep}&\quad \text{if } (((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \textit{cyclic\_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\exists (\textit{lookup\_cluster\_last\_timestep}_\text{timestep}))) \\ \textbf{storage}_\text{node,tech,timestep} = (\textbf{source\_use}_\text{node,tech,timestep} \times \textit{source\_eff}_\text{tech}) - \textbf{flow\_out\_inc\_eff}_\text{node,tech,carrier,timestep}&\quad \text{if } (\exists (\textit{lookup\_cluster\_last\_timestep}_\text{timestep}) \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\textit{cyclic\_storage}\mathord{=}\text{true}))) \\ \end{cases} \]

balance_storage

UPDATED Fix the quantity of carrier stored in a storage technology at the end of each timestep based on the net flow of carrier charged and discharged and the quantity of carrier stored at the start of the timestep.

\[ \begin{array}{r} \forall{} \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ \text{if } ((\textit{include\_storage}_\text{tech}\mathord{=}\text{true} \lor \textit{base\_tech}_\text{tech}\mathord{=}\text{storage}) \land \neg (\textit{base\_tech}_\text{tech}\mathord{=}\text{supply} \lor \textit{base\_tech}_\text{tech}\mathord{=}\text{demand})) \end{array} \begin{cases} \textbf{storage}_\text{node,tech,timestep} = \textit{storage\_initial}_\text{tech} \times \textbf{storage\_cap}_\text{node,tech} - \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{flow\_out\_inc\_eff}_\text{node,tech,carrier,timestep}) + \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{flow\_in\_inc\_eff}_\text{node,tech,carrier,timestep})&\quad \text{if } (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\textit{cyclic\_storage}\mathord{=}\text{true})) \\ \textbf{storage}_\text{node,tech,timestep} = ((1 - \textit{storage\_loss}_\text{tech})^{\textit{timestep\_resolution}_\text{timestep-1}}) \times \textbf{storage}_\text{node,tech,timestep-1} - \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{flow\_out\_inc\_eff}_\text{node,tech,carrier,timestep}) + \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{flow\_in\_inc\_eff}_\text{node,tech,carrier,timestep})&\quad \text{if } (((\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \textit{cyclic\_storage}\mathord{=}\text{true}) \lor \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]})) \land \neg (\exists (\textit{lookup\_cluster\_last\_timestep}_\text{timestep}))) \\ \textbf{storage}_\text{node,tech,timestep} = \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{flow\_out\_inc\_eff}_\text{node,tech,carrier,timestep}) + \sum\limits_{\text{carrier} \in \text{carriers}} (\textbf{flow\_in\_inc\_eff}_\text{node,tech,carrier,timestep})&\quad \text{if } (\exists (\textit{lookup\_cluster\_last\_timestep}_\text{timestep}) \land \neg (\textit{timesteps}_\text{timestep}\mathord{=}\text{timesteps[0]} \land \neg (\textit{cyclic\_storage}\mathord{=}\text{true}))) \\ \end{cases} \]

set_storage_initial

UPDATED Fix the relationship between carrier stored in a storage technology at the start and end of the whole model period.

\[ \begin{array}{r} \forall{} \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs } \\ \text{if } (\exists (\textbf{storage}_\text{node,tech,timestep}) \land \exists (\textit{storage\_initial}_\text{tech}) \land \textit{cyclic\_storage}\mathord{=}\text{true}) \end{array} \begin{cases} \textbf{storage\_inter\_cluster}_\text{node,tech,datestep=datesteps[-1]} \times ((1 - \textit{storage\_loss}_\text{tech})^{24}) = \textit{storage\_initial}_\text{tech} \times \textbf{storage\_cap}_\text{node,tech}&\quad \\ \end{cases} \]

balance_storage_inter

NEW Fix the relationship between one day and the next of a storage technology's available stored carrier, according to the previous day's representative storage fluctuations and the excess stored carrier available from all days up to this day.

\[ \begin{array}{r} \forall{} \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ datestep }\negthickspace \in \negthickspace\text{ datesteps } \\ \text{if } (\textit{include\_storage}_\text{tech}\mathord{=}\text{true} \lor \textit{base\_tech}_\text{tech}\mathord{=}\text{storage}) \end{array} \begin{cases} \textbf{storage\_inter\_cluster}_\text{node,tech,datestep} = \textit{storage\_initial}_\text{tech}&\quad \text{if } (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\textit{cyclic\_storage}\mathord{=}\text{true}))\land{}(\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\textit{cyclic\_storage}\mathord{=}\text{true})) \\ \textbf{storage\_inter\_cluster}_\text{node,tech,datestep} = ((1 - \textit{storage\_loss}_\text{tech})^{24}) \times \textbf{storage\_inter\_cluster}_\text{node,tech,datestep-1}&\quad \text{if } (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\textit{cyclic\_storage}\mathord{=}\text{true}))\land{}((\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \textit{cyclic\_storage}\mathord{=}\text{true}) \lor \neg (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]})) \\ \textbf{storage\_inter\_cluster}_\text{node,tech,datestep} = \textit{storage\_initial}_\text{tech} + \textbf{storage}_\text{node,tech,timestep=\(\textit{lookup\_datestep\_last\_cluster\_timestep}_\text{datestep-1}\)}&\quad \text{if } (\neg (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\textit{cyclic\_storage}\mathord{=}\text{true})))\land{}(\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\textit{cyclic\_storage}\mathord{=}\text{true})) \\ \textbf{storage\_inter\_cluster}_\text{node,tech,datestep} = ((1 - \textit{storage\_loss}_\text{tech})^{24}) \times \textbf{storage\_inter\_cluster}_\text{node,tech,datestep-1} + \textbf{storage}_\text{node,tech,timestep=\(\textit{lookup\_datestep\_last\_cluster\_timestep}_\text{datestep-1}\)}&\quad \text{if } (\neg (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \neg (\textit{cyclic\_storage}\mathord{=}\text{true})))\land{}((\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]} \land \textit{cyclic\_storage}\mathord{=}\text{true}) \lor \neg (\textit{datesteps}_\text{datestep}\mathord{=}\text{datesteps[0]})) \\ \end{cases} \]

storage_inter_max

NEW Set the upper bound of a storage technology's stored carrier across all days in the timeseries.

\[ \begin{array}{r} \forall{} \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ datestep }\negthickspace \in \negthickspace\text{ datesteps } \\ \text{if } (\textit{include\_storage}_\text{tech}\mathord{=}\text{true} \lor \textit{base\_tech}_\text{tech}\mathord{=}\text{storage}) \end{array} \begin{cases} \textbf{storage\_inter\_cluster}_\text{node,tech,datestep} + \textbf{storage\_intra\_cluster\_max}_\text{node,tech,cluster=\(\textit{lookup\_datestep\_cluster}_\text{datestep}\)} \leq \textbf{storage\_cap}_\text{node,tech}&\quad \\ \end{cases} \]

storage_inter_min

NEW Set the lower bound of a storage technology's stored carrier across all days in the timeseries.

\[ \begin{array}{r} \forall{} \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ datestep }\negthickspace \in \negthickspace\text{ datesteps } \\ \text{if } (\textit{include\_storage}_\text{tech}\mathord{=}\text{true} \lor \textit{base\_tech}_\text{tech}\mathord{=}\text{storage}) \end{array} \begin{cases} (\textbf{storage\_inter\_cluster}_\text{node,tech,datestep} \times ((1 - \textit{storage\_loss}_\text{tech})^{24})) + \textbf{storage\_intra\_cluster\_min}_\text{node,tech,cluster=\(\textit{lookup\_datestep\_cluster}_\text{datestep}\)} \geq 0&\quad \\ \end{cases} \]

storage_intra_max

NEW Set the upper bound of a storage technology's stored carrier within a clustered day

\[ \begin{array}{r} \forall{} \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ \text{if } (\textit{include\_storage}_\text{tech}\mathord{=}\text{true} \lor \textit{base\_tech}_\text{tech}\mathord{=}\text{storage}) \end{array} \begin{cases} \textbf{storage}_\text{node,tech,timestep} \leq \textbf{storage\_intra\_cluster\_max}_\text{node,tech,cluster=\(\textit{timestep\_cluster}_\text{timestep}\)}&\quad \\ \end{cases} \]

storage_intra_min

NEW Set the lower bound of a storage technology's stored carrier within a clustered day

\[ \begin{array}{r} \forall{} \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ \text{if } (\textit{include\_storage}_\text{tech}\mathord{=}\text{true} \lor \textit{base\_tech}_\text{tech}\mathord{=}\text{storage}) \end{array} \begin{cases} \textbf{storage}_\text{node,tech,timestep} \geq \textbf{storage\_intra\_cluster\_min}_\text{node,tech,cluster=\(\textit{timestep\_cluster}_\text{timestep}\)}&\quad \\ \end{cases} \]

Decision Variables

storage

UPDATED The virtual carrier stored by a supply_plus or storage technology in each timestep of a clustered day. Stored carrier can be negative so long as it does not go below the carrier stored in storage_inter_cluster. Only together with storage_inter_cluster does this variable's values gain physical significance.

\[ \begin{array}{r} \forall{} \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ timestep }\negthickspace \in \negthickspace\text{ timesteps } \\ \forall\mathbb{R}\; \text{if } (\textit{include\_storage}_\text{tech}\mathord{=}\text{true} \lor \textit{base\_tech}_\text{tech}\mathord{=}\text{storage}) \end{array} \begin{cases} -inf \leq \textbf{storage}_\text{node,tech,timestep}&\quad \\ \textbf{storage}_\text{node,tech,timestep} \leq inf&\quad \\ \end{cases} \]

storage_inter_cluster

NEW The virtual carrier stored by a supply_plus or storage technology between days of the entire timeseries. Only together with storage does this variable's values gain physical significance.

\[ \begin{array}{r} \forall{} \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ datestep }\negthickspace \in \negthickspace\text{ datesteps } \\ \forall\mathbb{R}\; \text{if } (\textit{include\_storage}_\text{tech}\mathord{=}\text{true} \lor \textit{base\_tech}_\text{tech}\mathord{=}\text{storage}) \end{array} \begin{cases} 0 \leq \textbf{storage\_inter\_cluster}_\text{node,tech,datestep}&\quad \\ \textbf{storage\_inter\_cluster}_\text{node,tech,datestep} \leq inf&\quad \\ \end{cases} \]

storage_intra_cluster_max

NEW Virtual variable to limit the maximum value of storage in a given representative day.

\[ \begin{array}{r} \forall{} \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ cluster }\negthickspace \in \negthickspace\text{ clusters } \\ \forall\mathbb{R}\; \text{if } (\textit{include\_storage}_\text{tech}\mathord{=}\text{true} \lor \textit{base\_tech}_\text{tech}\mathord{=}\text{storage}) \end{array} \begin{cases} -inf \leq \textbf{storage\_intra\_cluster\_max}_\text{node,tech,cluster}&\quad \\ \textbf{storage\_intra\_cluster\_max}_\text{node,tech,cluster} \leq inf&\quad \\ \end{cases} \]

storage_intra_cluster_min

NEW Virtual variable to limit the minimum value of storage in a given representative day.

\[ \begin{array}{r} \forall{} \text{ node }\negthickspace \in \negthickspace\text{ nodes, } \text{ tech }\negthickspace \in \negthickspace\text{ techs, } \text{ cluster }\negthickspace \in \negthickspace\text{ clusters } \\ \forall\mathbb{R}\; \text{if } (\textit{include\_storage}_\text{tech}\mathord{=}\text{true} \lor \textit{base\_tech}_\text{tech}\mathord{=}\text{storage}) \end{array} \begin{cases} -inf \leq \textbf{storage\_intra\_cluster\_min}_\text{node,tech,cluster}&\quad \\ \textbf{storage\_intra\_cluster\_min}_\text{node,tech,cluster} \leq inf&\quad \\ \end{cases} \]