## 2 Microgrid Optimization Scheduling Model
### Grey Wolf Optimization Algorithm Based on Oppositional Gradient
As per the formulation given above,\(\lambda^{i}\) is updated using Equation (11) as given herewith  
\[\lambda^{i}(t)=\frac{0.1\big{[}Ub^{i}-Lb^{i}\big{]}}{\max\Big{(}\Big{|}\frac{ \partial f^{\text{data}}}{\partial X^{i}}\Big{|},\Big{|}\frac{\partial f^{ \text{data}}}{\partial X^{i}}\Big{|}\Big{)}} \tag{11}\]  
where \(L_{b}\) represents the lower bound and \(U_{b}\) represents the upper bound of the problem. This results in the following equation straightforwardly:  
\[\bigg{|}\lambda^{i}(t)\frac{\partial f}{\partial X^{i}_{w}}(t)\bigg{|}\geq 1 0\Big{(}Ub^{i}-Lb^{i}\Big{)} \tag{12}\]  
The gradient of the problem in few optimization problems may remain unknown. This is attributed to the non-differentiability of objective function or discrete features possessed by decision variables. In order to overcome these issues, the following equation is presented:  
\[\frac{\partial f}{\partial x}=\frac{[f(t)-f(t-1)]}{[X(t)-X(t-1)]} \tag{13}\]  
Step 8: The fitness value is updated based on the modified position of grey wolves. Step 9: Alpha, Beta, and Delta values are updated. Step 10: The position of Omega wolves is updated using Equations (14) and (15) that employ Gaussian walk and Levy flight  
\[ \begin{array}{ll}X^{i}_{W,new}=&X^{i}_{W}+KGaussian(|\theta_{i}|,\sigma)- \big{(}\xi\times\theta_{i}-\xi^{\prime}\times X^{i}_{W}\big{)},\\ &for\ i=1,\cdots,m\ and\ w=1,\cdots,n\end{array}  \tag{14}\]  
\[ \begin{array}{ll}X^{i}_{W,new}=X^{i}_{W}+X^{i}_{W}Levy(\eta),\\ &for\ i=1,\cdots,m\ and\ w=1,\cdots,n\end{array}  \tag{15}\]  
In the formula, the best solution is denoted by \(\theta_{i}\) whereas \(|\sigma|\) corresponds to the standard deviation of Gaussian distribution. The Gaussian parameter is changed by OGGWO as \(\sigma=|K\times(x_{i}-BP)|\), while it also reduces the length of steps at the time of iterations by fixing = \(\frac{\log(l)}{l}\). Here, \(l\) corresponds to the number of iterations. Further, \(X^{i}_{W,new}\), now corresponds to the new position of the wolves, whereas \(X^{i}_{W}\) denotes the current position. In addition to these, \(\xi^{\prime}\) and \(\xi\) denote random numbers in \((0,1]\). Equation (16) denotes the calculation for Levy flight  
\[Levy(x)=\frac{[0.01\times\sigma\times r_{1}]}{|r_{2}|^{\frac{1}{\beta}}} \tag{16}\]  
where the random numbers are denoted by \(r_{1}\) and \(r_{2}\) between \((0,1]\); and \(\beta\) corresponds to constant, which is equal to \(1.5\). In Equation (14), \(\sigma\) is computed with the help of the following equation:  
\[\sigma=\bigg{[}\Gamma(1+\beta)\sin\left(\frac{\pi\beta}{2}\right)/\left(\frac {\Gamma(1+\beta)}{2}\beta\bigg{[}2^{\frac{(\beta-1)}{2}}\bigg{]}\right)\bigg{]} ^{1/\beta} \tag{17}\]  
Step 11: The opposite population is created out of the current population using the jumping rate. Step 12: The nP number of the fittest solution is selected after integrating the current and the opposite populations. Step 13: Steps 3-7 are repeated until the maximum number of iterations is achieved. Step 14: The best solution is achieved as the output. As per the steps discussed above, the leading framework remains the same in both GGWO and OGGWO. However, significant changes are made in the latter. For example, OGGWO leverages a mix of original and gradient-based operators to update the position of wolves more than the conventional GWO operators. Further, a new function is also added in OGGWO to determine the gradient's objective function at every point in the solution space [21]. In addition to the above, Gaussian walk and Levy flight have been incorporated in OGGWO to increase randomness during the closure of every iteration. This phenomenon significantly increases both the exploration and exploitation capability, as long steps and short steps shift the particles in the solution space.