1. First Stage

1.1. Sets

Name

Dimension

Sub index

Description

\(T\)

1

time

\(H\)

1

Hydro powerplants

\(B\)

1

Water basins

\(S_H\)

2

\(H\)

State of each hydro powerplants

\(S_B\)

2

\(B\)

State of each basins

\(S_{BH}\)

4

\(\{ H; ~B; ~S_H \;~S_B \}\)

Index to make the correspondence between the states, basins and hydro powerplants

The sets \(T\), \(S_H\) and \(S_B\) are arranged in a specific order such that indexing a variable with the first or last element of a set (i.e \(t^{0}\) and \(t^{\text{END}} \in T\)) corresponds respectively to the lowest/first or highest/final element of that variable.

\(S_H\) and \(S_B\) include subset to specify the corresponding hydro powerplants and basins that the state is associated with, respectively. The sets are constructed as demonstrated in the following example. To collect all states associated with a basin \(b\) we can use the notation \(S_B\{b\}\)

\(S_B =\begin{cases} 1: \left[1, 2, 3\right] \\ 2: \left[4, 5\right] \\ 3: \left[6\right] \end{cases}\)

In a Pyomo model, it is not possible to directly index variables and parameters using sets that contain subsets, such as \(S\_B\). To handle this limitation, we need to create new sets (i.e. \(BS\)) which will explicitly represent the deployment of these subsets. These new sets will be structured to map the relationships required for indexing variables and parameters in the model effectively.

\(SB \in \{b, s_b\}=\{(1,~1),~(1,~2),~(2,~3),~(2,~4),~(2,~5),~(3,~6)\}\)

The set \(S\_BH\) defines the connections between each basin, its corresponding state, and the hydro powerplants. This link is established solely between a hydro powerplant and its associated upstream basin. It is assumed that the water level in downstream basins does not affect the behavior of turbined or pumped energy.

\(S_{BH} \in \{b, h\, s_b, s_h\}=\{(1, ~1, ~1, ~1),~(1, ~1, ~2, ~2),~(1, ~1, ~3, ~3)\}\)

1.2. Variables

Name

Description

Type

Units

\(V_\text{BAS}^{t,~b}\)

Basins actual water volume

\(\mathbb{R}^{+}\)

\(\mathrm{m}^{3}\)

\(V_\text{SPIL}^{t,~b}\)

Spilled water volumes when basins are full

\(\mathbb{R}^{+}\)

\(\mathrm{m}^{3}\)

\(S_\text{BAS}^{t,~b,~s_b}\)

The state of a basin derived from its volume: \(S_\text{BAS}^{t, b, s_b} = \begin{cases} 1 \text{ if } V_\text{BAS}^{t, b} \in \left[ V_\text{BAS, MIN}^{b,~s_b} ;V_\text{BAS, MAX}^{b,~s_b} \right] \\ 0 \text{ otherwise} \end{cases}\)

\(\mathbb{B}\)

\(P_\text{TUR}^{t,~h}\)

Electrical power produced by a turbine

\(\mathbb{R}^{+}\)

\(\mathrm{MW}\)

\(Q_\text{TUR}^{t,~h}\)

Amount of water that flows through a turbine

\(\mathbb{R}^{+}\)

\(\mathrm{m}^{3}/\mathrm{s}\)

\(P_\text{PUM}^{t,~h}\)

Electrical power produced by a pump

\(\mathbb{R}^{+}\)

\(\mathrm{MW}\)

\(Q_\text{PUM}^{t,~h}\)

Amount of water that flows through a pump

\(\mathbb{R}^{+}\)

\(\mathrm{m}^{3}/\mathrm{s}\)

\(Q_\text{TUR, S}^{t,~h,~s_h}\)

Amount of water that flows through a turbine for each hydro powerplant state

\(\mathbb{R}^{+}\)

\(\mathrm{m}^{3}/\mathrm{s}\)

\(Q_\text{PUM, S}^{t,~h,~s_h}\)

Amount of water that flows through a pump for each hydro powerplant state

\(\mathbb{R}^{+}\)

\(\mathrm{m}^{3}/\mathrm{s}\)

1.3. Parameters

Name

Description

Type

Default

Units

\(c_\text{DA}^{t}\)

Day-ahead energy market price

\(\mathbb{R}\)

\(\mathrm{EUR}/\mathrm{MW}\)

\(nb_\text{SEC}\)

Number of seconds in one hour

\(\mathbb{R}^{+}\)

3600

\(nb_\text{HOUR}^{t}\)

Number of hours for each time-step

\(\mathbb{R}^{+}\)

\(V_\text{BAS, START}^{b}\)

Basins stating water volume

\(\mathbb{R}^{+}\)

0

\(\mathrm{m}^{3}\)

\(V_\text{BAS, MAX}^{b,~s_b}\)

Basins water volume upper boundary for each state

\(\mathbb{R}^{+}\)

0

\(\mathrm{m}^{3}\)

\(V_\text{BAS, MIN}^{b,~s_b}\)

Basins water volume lower boundary for each state

\(\mathbb{R}^{+}\)

0

\(\mathrm{m}^{3}\)

\(V_\text{BAS, DIS}^{t,~b}\)

Water volume entering a basin due to runoff and snowmelt

\(\mathbb{R}^{+}\)

0

\(\mathrm{m}^{3}\)

\(F_\text{TUR}^{b,~h}\)

Factor to specify whether the turbined water of a plant is added into a basin or removed

\(\{-1; ~0; ~1\}\)

0

\(F_\text{PUM}^{b,~h}\)

Factor to specify whether the pumped water of a plant is added into a basin or removed

\(\{-1; ~0; ~1\}\)

0

\(Q_\text{TUR, MAX}^{h,~s_h}\)

Max water flows that can be turbined for each state

\(\mathbb{R}^{+}\)

0

\(\mathrm{m}^{3}/\mathrm{s}\)

\(Q_\text{PUM, MAX}^{h,~s_h}\)

Max water flows that can be pumped for each state

\(\mathbb{R}^{+}\)

0

\(\mathrm{m}^{3}/\mathrm{s}\)

\(\alpha_\text{TUR, AVG}^{h,~s_h}\)

Average factor for converting turbined water flow into generated electrical power for each state.

\(\mathbb{R}^{+}\)

0

\(\mathrm{MW} \cdot \mathrm{s}/ \mathrm{m}^{3}\)

\(\alpha_\text{PUM, AVG}^{h,~s_h}\)

Average factor for converting pumped water flow into consumed electrical power for each state.

\(\mathbb{R}^{+}\)

0

\(\mathrm{MW} \cdot \mathrm{s}/\mathrm{m}^{3}\)

1.4. Objective

\begin{align} \max \sum_{t \in T} c_\text{DA}^{t} \cdot nb_\text{HOUR}^{t} \cdot \sum_{h \in H} \left( P_\text{TUR}^{t,~h} - P_\text{PUM}^{t,~h} \right) \end{align}

1.5. Constraints

1.5.1. Water basin volume evolution

\begin{align} V_\text{BAS}^{t,~b} = \begin{cases} V_\text{BAS, START}^{b} & \text{if } t = t_0 \\ V_\text{BAS}^{t - 1,~b} + V_\text{DIS}^{t - 1,~b} - V_\text{SPIL}^{t - 1,~b} + nb_\text{SEC} \cdot nb_\text{HOUR}^{t-1} \cdot \sum_{h \in H} \left( F_\text{TUR}^{b,~h} \cdot Q_\text{TUR}^{t-1,~h} + F_\text{PUM}^{b,~h} \cdot Q_\text{PUM}^{t-1,~h} \right) \quad & \text{if } t \neq t_0 \end{cases} \qquad \forall \{t\in T, b \in B \} \end{align}
\begin{align} V_\text{BAS, START}^{b} = V_\text{BAS}^{t_{end},~b} + V_\text{DIS}^{t_{end},~b} - V_\text{SPIL}^{t_{end},~b} + nb_\text{SEC} \cdot nb_\text{HOUR}^{t_{end}} \cdot \sum_{h \in H} \left( F_\text{TUR}^{b,~h} \cdot Q_\text{TUR}^{t_{end},~h} + F_\text{PUM}^{b,~h} \cdot Q_\text{PUM}^{t_{end},~h} \right) \qquad \forall \{b \in B \} \end{align}

1.5.2. Water basin state

\begin{align} V_\text{BAS}^{t,~b} \leq V_\text{BAS, MAX}^{b,~s_b} + V_\text{BAS, MAX}^{b,~S_B^\text{END}\{b\}} \cdot \left(1 -S_\text{BAS}^{t,~b,~s_b} \right) \qquad \forall \{t\in T~\vert~b \in B~\vert~ s_b \in S_B\{b\} \} \end{align}
\begin{align} V_\text{BAS}^{t,~b} \geq V_\text{BAS, MIN}^{b,~s_b} \cdot S_\text{BAS}^{t,~b,~s_b} \qquad \forall \{t\in T~\vert~b \in B \} \end{align}
\begin{align} \sum_{s \in S_B\{b\}} S_\text{BAS}^{t,~b,~s} = 1 \qquad \forall \{t\in T~\vert~b \in B \} \end{align}

1.5.3. Water turbined

\begin{align} Q_\text{TUR, S}^{t,~h,~s_h} \leq Q_\text{TUR, MAX}^{h,~s_h} \cdot S_\text{BAS}^{t,~b,~s_b} \qquad \forall \{t\in T~\vert~b,~h,~s_h ~s_h \in S_{BH} \} \end{align}
\begin{align} Q_\text{TUR}^{t,~h} = \sum_{s \in S_H\{h\}} Q_\text{TUR, S}^{t,~h,~s} \qquad \forall \{t\in T~\vert~h \in H~\} \end{align}
\begin{align} P_\text{TUR}^{t,~h} = \sum_{s \in S_H\{h\}} \alpha_\text{TUR, AVG}^{h,~s} \cdot Q_\text{TUR, S}^{t,~h,~s} \qquad \forall \{t\in T~\vert~h \in H\} \end{align}

The constraint (7) takes the set \(S\_BH\) as argument, enabling the connection between the basin set \(B\) and the hydro powerplant set \(H\).

1.5.4. Water pumped

\begin{align} Q_\text{PUM, S}^{t,~h,~s_h} \leq Q_\text{PUM, MAX}^{h,~s_h} \cdot S_\text{BAS}^{t,~b,~s_b} \qquad \forall \{t\in T~\vert~b,~h,~s_h ~s_h \in S_{BH} \} \end{align}
\begin{align} Q_\text{PUM}^{t,~h} = \sum_{s \in S_H\{h\}} Q_\text{PUM, S}^{t,~h,~s} \qquad \forall \{t\in T~\vert~h \in H~\} \end{align}
\begin{align} P_\text{PUM}^{t,~h} = \sum_{s \in S_H\{h\}} \alpha_\text{PUM, AVG}^{h,~s} \cdot Q_\text{PUM, S}^{t,~h,~s} \qquad \forall \{t\in T~\vert~h \in H\} \end{align}

The constraint (10) takes the set \(S\_BH\) as argument, enabling the connection between the basin set \(B\) and the hydro powerplant set \(H\).