# Capacity-Operation Collaborative Optimization for Wind-Solar-Hydrogen Multi-Energy Supply System
## 3 Bi-Level Capacity-Operation Collaborative Optimization Method  
This study outlines a dual-layered optimization model that collaboratively works on both capacity and operation within the WSH-MES system, as shown in Figure 3. The model's higher level tackles a complex optimization issue, weighing both economic considerations and carbon emission factors in determining capacity distribution. Conversely, the model's lower level is dedicated to enhancing renewable energy usage by fine-tuning the scheduling of operational activities.  
The general expression of the model is as follows:  
\[\begin{array}{ll}\underset{R_{\text{i}}}{\min}\{F_{\text{I}}(R_{\text{i}},f ),F_{\text{2}}(R_{\text{i}},f)\}&(1\text{a})\\ \underset{H_{\text{i}}^{\text{t}}}{\max}f\big{(}R_{\text{i}},H_{\text{i}}^{ \text{t}}\big{)}&(1\text{b})\\ \text{s.t.}&g_{0}\big{(}R_{\text{i}},H_{\text{i}}^{\text{t}}\big{)}\leq 0&(1 \text{c})\end{array} \tag{1}\]  
Equation (1) shows the two-level model consisting of capacity allocation optimization in the upper layer (Equation (1a)) and operation scheduling optimization in the lower layer (Equation (1b,c)). The upper-level optimization problem has two objective functions, \(F_{\text{I}}\) and \(F_{\text{2}}\), and the lower-level optimization problem has \(H_{\text{i}}\) as decision variables, which includes annual hourly energy generation for WP, PV, CSP, EH, TES charging/discharging, PEME, HST charging/discharging, and PEMFC. The lower-level optimization problem  
\begin{table}
\begin{tabular}{l l l l l l l l l} \hline \hline \multicolumn{1}{c}{**Subsystem**} & \multicolumn{3}{c}{**Main Equations**} & \multicolumn{3}{c}{**Auxiliary Notes**} \\ \hline \multirow{4}{*}{HST} & \(E_{\text{HST}}(t)=E_{\text{HST}}(t-1)+\) & \multirow{4}{*}{Where \(P_{\text{HT-FC}}\) is the transferred power from the hydrogen tank to the FC. \(\eta_{\text{storage}}\) is the storage efficiency, and this efficiency is assumed to be 95\% due to the loss incurred in transportation or storage.} \\  & \(m_{\text{HST}}(t)=\frac{Q_{\text{HST}}(t)}{HHV_{\text{H}_{\text{2}}}}\) & & Where the Higher Heating Value (HHV) of hydrogen \(HHV_{\text{H}_{\text{2}}}\) is equal to 39.7 kWh/kg. \\ \hline \multirow{4}{*}{PEMFC} & \multicolumn{4}{c}{Where \(V_{\text{nernst}}\) is the Nernst voltage, \(V_{\text{ohm}}\) is the ohmic} \\  & \(H_{\text{2}}+\frac{1}{2}O_{\text{2}}\to H_{\text{2}}O+electricity\) & & overvoltage, \(V_{\text{act}}\) is the activation overvoltage, & \\  & \(V=V_{\text{nernst}}-V_{\text{ohm}}-V_{\text{act}}-V_{\text{con}}\) & & and \(V_{\text{con}}\) is the concentration overvoltage. \\ \cline{1-1}  & & & More detailed data can be found in [33]. \\ \hline \hline \end{tabular}
\end{table}
Table 2: _Cont._  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multicolumn{1}{c}{**Test**} & \multirow{2}{*}{**DNI**} & \multirow{2}{*}{**Wind**} & \multirow{2}{*}{**Ambient**} & \multirow{2}{*}{**Flow**} & \multirow{2}{*}{**Inlet Oil**} & \multicolumn{2}{c}{**Experimentally**} & \multirow{2}{*}{**Calculation**} & \multirow{2}{*}{**Error**} \\
**Conditions** & & & & & & & & & \\  
\(g_{0}\) has constraints on system output and power balance, and the objective function is \(f\) to maximize annual operation revenue.  
To optimize the operation scheduling, a linearized full working condition model is constructed due to the huge scale of decision variables and the hourly basis (8760 h) for the system power output and charging/discharging power of heat and hydrogen storage systems. The linear programming method is used for the operation scheduling optimization. This section describes the objective function, lower-level constraints, and solution methods of the bi-level optimization model. The relevant technical parameters, computational time, and performance are shown in Table 1 in Appendix A.