## 4 Improved Gray Wolf Optimization  
The GWO method involves an optimization algorithm that takes inspiration from the structure and hunting behavior of wolves in nature [12; 20; 21]. In this algorithm, packs of wolves represent solutions to an optimization problem. It mimics the roles of dominant wolves (alpha, beta, and delta) in guiding the hunt, while the remaining wolves play the role of omegas. As the iterations progress, these wolves adjust their positions based on the guidance provided by the others, eventually leading to near-optimal solutions. GWO is particularly effective in exploring problems ranging from engineering design to biology. Figure 8 illustrates the hunting strategy of gray wolves. This encircling action can be simulated using the following equations:  
\[\overset{\rightarrow}{X}(t+1)=\overset{\rightarrow}{X_{p}}(t)-\overset{ \rightarrow}{A}\cdot\left|\overset{\rightarrow}{C}\overset{\rightarrow}{X_{p} }(t)-\overset{\rightarrow}{X}\right| \tag{30}\]  
\[\overset{\rightarrow}{A}=2\overset{\rightarrow}{a}\times rand_{1}- \overset{\rightarrow}{a} \tag{31}\]  
\[\overset{\rightarrow}{C}=2\times rand_{2} \tag{32}\]  
Here, \(\overset{\rightarrow}{X}\) is the position vector of the prey, \(\overset{\rightarrow}{X_{p}}\) is the position vector of a gray wolf, \(\overset{\rightarrow}{A}\) and \(\overset{\rightarrow}{C}\) are coefficient vectors, and \(rand_{1},\ rand_{2}\) are random values in \([0,1]\). The variable \(\overset{\rightarrow}{a}\) linearly decreases as the algorithm progresses through iterations, as follows:  
\[\overset{\rightarrow}{a}=2-t/t_{\max} \tag{33}\]  
where \(t\) represents the current iteration and \(t_{\max}\) represents the maximum number of iterations. It is worth mentioning that every mega wolf needs to simultaneously adjust its position in relation to the alpha, beta, and delta wolves, as described below:  
\[\left\{ \begin{array}{l}\overset{\rightarrow}{D_{\alpha}}=\left|\overset{ \rightarrow}{C_{1}}\overset{\rightarrow}{X_{\alpha}}(t)-\overset{ \rightarrow}{X}\right|\\ \overset{\rightarrow}{D_{\beta}}=\left|\overset{\rightarrow}{C_{2}} \overset{\rightarrow}{X_{\beta}}(t)-\overset{\rightarrow}{X}\right|\\ \overset{\rightarrow}{D_{\beta}}=\left|\overset{\rightarrow}{C_{3}} \overset{\rightarrow}{X_{\delta}}(t)-\overset{\rightarrow}{X}\right|\\ \end{array} \right. \tag{34}\] \begin{table}
\begin{tabular}{c c c c c} \hline \multirow{2}{*}{**Scenario**} & \multicolumn{1}{c}{**Loading Level**} & \multicolumn{1}{c}{**Solar Irradiance**} & \multicolumn{1}{c}{**Wind Speed**} & \multicolumn{1}{c}{**Probability**} \\  & **(\%)** & **(W/m\({}^{2}\))** & **(m/s)** & **(\%)** & **\textless{}s** \\ \hline
1 & 93.310 & 18 & 5.8 & 0.044 \\
2 & 96.237 & 770 & 13.8 & 0.037 \\
3 & 101.527 & 366 & 6.9 & 0.034 \\
4 & 96.254 & 955 & 10.4 & 0.041 \\
5 & 101.270 & 190 & 11.5 & 0.040 \\
6 & 100.379 & 555 & 6.9 & 0.029 \\
7 & 85.263 & 1 & 6.9 & 0.258 \\
8 & 101.718 & 91 & 6.9 & 0.062 \\
9 & 101.425 & 859 & 10.4 & 0.044 \\
10 & 103.318 & 664 & 9.2 & 0.037 \\
11 & 103.181 & 460 & 10.4 & 0.037 \\
12 & 102.005 & 269 & 10.4 & 0.039 \\
13 & 93.310 & 18 & 5.8 & 0.044 \\
14 & 96.237 & 770 & 13.8 & 0.037 \\
15 & 101.527 & 366 & 6.9 & 0.034 \\ \hline \end{tabular}
\end{table} 
Table 1: Summary of reduced scenarios and probabilities. \[\left\{ \begin{array}{l}\overset{\rightarrow}{X}_{1}=\overset{ \rightarrow}{X}_{\alpha}-\overset{\rightarrow}{A}_{1}\cdot\left(\overset{ \rightarrow}{D}_{\alpha}\right)\\ \overset{\rightarrow}{X}_{2}=\overset{\rightarrow}{X}_{\beta}-\overset{ \rightarrow}{A}_{2}\cdot\left(\overset{\rightarrow}{D}_{\beta}\right)\\ \overset{\rightarrow}{X}_{3}=\overset{\rightarrow}{X}_{\delta}-\overset{ \rightarrow}{A}_{3}\cdot\left(\overset{\rightarrow}{D}_{\delta}\right)\\ \end{array} \right. \tag{35}\] \[\overset{\rightarrow}{X}(t+1)=\left(\overset{\rightarrow}{X}_{1}+ \overset{\rightarrow}{X}_{2}+\overset{\rightarrow}{X}_{3}\right)/3 \tag{36}\]  
It is noteworthy that both exploration and exploitation play vital roles in metaheuristic algorithms.