**4. Quasi opposition based learning**

Opposition Based Learning considers both the current and its opposite population simultaneously for getting the best candidate solution. The quasi-opposite population *QOP xq*<sup>0</sup> <sup>1</sup> , *x q*0 <sup>2</sup> , *::* … … *<sup>x</sup><sup>q</sup>*<sup>0</sup> *<sup>i</sup>* , *::* … *x q*0 *d* in D dimensional region differs from the opposite population as it is the population between the Centre*c* of the search region and the opposite point *x*<sup>0</sup> *<sup>i</sup>* , expressed as in (18).

$$\mathbf{x}\_{i}^{g0} = rand(\frac{a\_{i} + b\_{i}}{2}, a\_{i} + b\_{i} - \mathbf{x}\_{i}) = rand(c\_{i}, \mathbf{x}\_{i}^{0}); i = 1, 2, \dots, d \tag{17}$$

Where, *x q*0 *<sup>i</sup>* is an arbitrary number between *ci* and *x*<sup>0</sup> *i* .

#### **4.1 QOGWO algorithm for hydrothermal scheduling**

The flowchart of the QOGWO to clarify the HTS problem is given in **Figure 2** and the steps are described as follows:

*Step 1:* Specify the system parameters, the highest and lowest limits of each variable such as *Pop* max , *q* min , *q* max , *Ns*, *Nh*, *Z*, B-coefficient matrix, *PD*, *PT* min , *PT* max , *PH* min , *PH* max , *V* min , *V* max , *j <sup>r</sup>*, Cost coefficients and *iter* max . *Step-2:* Initialize randomly the search agents (Gray wolves) among the population and those agents are possible solutions who satisfy the specified constraints. *Step-3:* Compute the trial vector (current search agents) *Qi*,*j*,*<sup>k</sup>* ¼ ½ � *P*<sup>1</sup> *P*2*::* … *PPOP* max of the population. The random search agent matrix (*Pk*) is as in (19).

$$P\_k = \begin{bmatrix} q\_{11} & q\_{12} & \dots & \dots & q\_{1,Nh} \\ q\_{21} & q\_{22} & \dots & \dots & q\_{2,Nh} \\ \dots & \dots & \dots & \dots & \ddots \\ \dots & \dots & q\_{ij} & \dots & q\_{i,Nh} \\ q\_{Z,1} & \dots & q\_{x,j} & \dots & q\_{Z,Nh} \end{bmatrix} \tag{18}$$

*Step 4*: The discharge rate *qi*,*<sup>d</sup>* of all the reservoirs for all the slots is taken at random within the bounds and repeatedly adjusted after the check to satisfy the first and last reservoir storage volume which is calculated using (20).

$$q\_{i,d} = V\_{i,1} - V\_{i,25} - \sum\_{j=1 \atop j \neq d}^{Z} q\_{i,j} + \sum\_{j=1}^{Z} r\_{i,j} + \sum\_{u=1}^{R\_u} \sum\_{j=1}^{Z} q\_{u(j-\mathfrak{r})} \tag{19}$$

*Step 5*: The volume of each reservoir is calculated by the Eq. (9), and then the hydro generation is scheduled over 24 slots by the Eq. (10).

*Step 6*: Calculate the thermal power at *j th* slot using load balance Eq. (4). To satisfy the equation *PT d*ð Þ , *j* is taken at random and adjusted using Eq. (21) until it does not defy the limits.

$$\begin{aligned} &B\_{dd}PT^2(d,j) + \left(2\sum\_{i=1}^{Nh+N-1} B\_{d,i}.PT(i,j) - 1\right) PT(d,j) \\ &+ \left(P\_D(j) + \sum\_{i=1}^{Nh+N-1} \sum\_{k=1}^{Nh+N-1} PT(i,j)B\_{i,k}PT(k,j) - \sum\_{i=1}^{Nh} PH(i,j) - \sum\_{i=1}^{Nh} PT(i,j)\right) = 0 \end{aligned} \tag{20}$$

#### **Figure 2.**

*Flow chart of QOGWO method.*

*Step 7:* The fitness of the solution is evaluated by Eq. (3).

*Step 8:* Remember the best three search agents *Xα*, *X<sup>β</sup>* and *X<sup>δ</sup>* (gray wolves) from the population.

*Step 9*: Revise the values of *a*, *A* and *C* as per Eqs. (13) and (14). *Step 10*: According to the positions of best three search agent *Xα*, *X<sup>β</sup>* and *X<sup>δ</sup>* (gray wolves) all search agents updated their current position by Eq. (17). The violation of constraint is formulated as a penalty added in the fitness function. *Step 11*: If the water discharge, the volume of the reservoir and power generations limits are lower than the lowest limit it is assigned the lowest value and if their value exceeds the highest limit, it is assigned the highest value.

*Step 12*: Select a fresh parameter "jumping rate" ( *Jr*) within the range [0, 1]. *If rand* <*Jr*, Quasi Opposite set of agents (wolves) can be shaped as below.

$$\begin{aligned} \text{If } \operatorname{rand} &< f\_r \\ \text{for } k &= \mathbf{1}: \operatorname{Pop}\_{\max} \\ \text{for } i &= \mathbf{1}: Z \\ \text{for } j &= \mathbf{1}: Nh \\ \mathbf{QOS(:, \ :, k)} &= q(i, j) = \operatorname{rand}(c(j), \mathbf{x}\_0(j)); \\ \text{end} \\ \operatorname{end} \\ \operatorname{end} \end{aligned} \tag{21}$$

*Step 13*: Go to Step 2 until the predefined highest iteration number is reached.
