## 2 Methods
### Model Construction  
According to the above, the model is established as follows:  
1. Objective function Objective 1: Minimum risk of flood control downstream of the two-stage reservoir. \[f(1)=min\sum_{t=1}^{T}{(R_{t1}^{b}+R_{t2}^{b})}=min\sum_{t=1}^{T}{(\int_{\sigma} ^{+\infty}h(\theta_{2}^{b})d\theta_{2}^{b})}\] (19) where T is the total scheduling period and \(R_{t1}^{b}\) is the flood control risk rate in the decision-making stage. According to the analysis, \(R_{t1}^{b}=0\), \(R_{t2}^{b}\) is the flood control risk rate in the residual stage. Objective 2: The difference between the two stages of reservoir profits and benefits is at a minimum. \[f(2)=min\sum_{t=1}^{T}{(B_{t1}^{-}+B_{t2}^{-})}=min\sum_{t=1}^{T}{(1-\frac{W_{ 1}}{W_{N}})}^{m}\] (20) where T is the total scheduling period; \(B_{t1}^{-}\) is the benefit difference of pre-storage water in the decision-making stage; \(B_{t2}^{-}\) is the increment of water storage efficiency in the residual stage; and the analysis shows that \(B_{t2}^{-}\)= 0. Objective 3: Minimum volatility of combined output. \[f(3)=min\{max(P_{Z})-min(P_{Z})\}\] (21) where \(P_{z}\) is the combined total electricity generation of hydropower and photovoltaic (kW/h), that is, \(P_{z}(i)=P_{ud}(i)+P_{sd}(i)\). Here, \(P_{ud}(i)\) is hydropower generation in the \(i\) period (kW/h) and \(P_{sd}(i)\) is the photovoltaic power generation in the \(i\) period, (kW/h). (2) Constraints The mathematical model considering the fluctuation of joint output involves many constraints, mainly including power balance, reservoir water balance, upper limit of pre-storage water, hydropower station output, photovoltaic power station output, and so on. (1) Hydropower output constraint \[N_{Wd}^{\min}\leq N_{Wd}^{t}=kQ^{t}H^{t}\leq N_{Wd}^{\max}\] (22)  
Figure 8: The best solution for hydropower photovoltaic power generation when \(f_{1}=f_{2}\). where \(N_{Wd}^{t}\) is the output of hydropower station during \(t\) period (\(kW\)); \(N_{Wd}^{\max}\) and \(N_{Wd}^{\min}\) are guaranteed output and installed capacity, respectively, of the hydropower station within this period (\(kW\)); \(Q^{t}\) is the flow rate of hydropower station during the period (\(m^{3}/s\)); \(H^{t}\) is the average head of power generation in time period t of the hydropower station (m); and k is the comprehensive output coefficient of the hydropower station. The output of the hydropower station shall not exceed the maximum generating capacity of the hydropower station. (2) Photovoltaic output constraint  
\[N_{Sd}^{\min}\leq N_{Sd}^{t}\leq N_{Sd}^{\max} \tag{23}\]  
where \(N_{Sd}^{t}\) is the output of photovoltaic power station within the time period (\(kW\)); \(N_{Sd}^{\min}\) is the lower limit of photovoltaic output within this period (\(kW\)); and \(N_{Sd}^{\max}\) is the upper limit of PV output (\(kW\)), that is, the PV output cannot exceed the maximum generating capacity of the PV power station. (3) Constraints on the power generation of the combined system  
\[\sum_{t=1}^{T}N_{Z,t}\Delta t=\sum_{t=1}^{T}N_{W,t}\Delta t+\sum_{t=1}^{T}N_{S,t}\Delta t \tag{24}\]  
where \(N_{Z,t}\) is the joint output of hydropower and photovoltaic at time period \(t\) (\(kW\)) and \(\Delta t\) is the interval length. (4) Reservoir capacity constraint  
\[V_{\min}\leq V_{t}\leq V_{\max} \tag{25}\]  
where \(V_{\min}\) is the minimum reservoir capacity (\(m^{3}\)) and \(V_{\max}\) is the maximum reservoir capacity (\(m^{3}\)). (5) Water balance constraint  
\[ \begin{array}{c}W_{0t}+Q_{1t}^{4}-D_{1t}=W_{1t}\\ W_{1t}+\overline{Q_{2t}^{2}}-\overline{D}_{2t}=W_{2t}=0\end{array}