## 3 Optimization Algorithms
### The GWO Algorithm  
Similarly to the particle swarm Optimization algorithm, one of the new algorithms, which are based on the metaheuristic principle is the Grey Wolf Optimization GWO algorithm. The researcher, [PERSON], was one of the first researchers who developed this algorithm and exposed its running principle in 2014 [32; 43]. To obtain the optimum solution of the problem to be optimized, the algorithm principle uses social authority, which is represented by the behaviour of the wolves when surrounding a victim. During the operation of hunting for the victim, this algorithm simulates the hierarchical supremacy of grey wolves until their movements end. It works in a similar way to population-based algorithms in which it simulates the natural behavior of grey wolves foraging for food in their social lives. Four types of grey wolf groups can be used to compose hierarchical commands. Figure 6 shows this hierarchy, with the following three levels:  
1. The first level represents the group's command. A wolf in this level is called (alpha) (\(\alpha\)). The alpha is responsible for deciding to hunt and orders the other wolves in the pack. Therefore, it can be considered as the correct solution. 2. The next level in the chain is called (\(\beta\)). Wolves in this level help the alpha to make decisions and monitor the actions of other groups. They can replace the alphas when they die or get older. 3. The lower level contains the delta and omega, which are the lowest ranks and who eat last after the wolves of the upper levels have finished. Figure 6: Hierarchical levels of grey wolves and their tasks. The hunting process of the wolf pack involves three main steps: chasing, surrounding the prey, and attacking the prey. The algorithm starts with a given number of grey wolves with their positions generated arbitrarily. The following equations determine the encircling behavior of each group of the pack:  
\[\overset{\rightarrow}{D}=\left|\overset{\rightarrow}{C}.\overset{\rightarrow}{ X}_{p}(t)-\overset{\rightarrow}{X}(t)\right| \tag{13}\]  
\[\overset{\rightarrow}{X}(t+1)=\left|\overset{\rightarrow}{X}_{p}(t)- \overset{\rightarrow}{A}.\overset{\rightarrow}{D}\right| \tag{14}\]  
where \(\overset{\rightarrow}{X}(t)\) is the vector position of the grey wolf, \(\overset{\rightarrow}{X}_{p}(t)\) is the vector prey position and \(\overset{\rightarrow}{A}\) and \(\overset{\rightarrow}{C}\) are the vectors gives by the following Equations:  
\[\left\{ \begin{array}{l}\overset{\rightarrow}{A}=2.\overset{\rightarrow}{ a}.\overset{\rightarrow}{r}_{1}-\overset{\rightarrow}{a}\\ \overset{\rightarrow}{C}=2.\overset{\rightarrow}{r}_{2}\end{array} \right. \tag{15}\]  
being \(t\) the current iteration, \(T_{max}\) the total number of iterations and \(r_{1}\) and \(r_{2}\) are random vectors chosen in the interval [0,1]. The prey position \(Xp\) (\(t+1\)) update is calculated by averaging the positions of grey wolves \(\alpha\), \(\beta\) and \(\Delta\) (three temporarily optimal solutions). The following average function is used for this purpose  
\[\overset{\rightarrow}{X}_{p}(t+1)=\frac{\overset{\rightarrow}{X}_{1}(t)+ \overset{\rightarrow}{X}_{2}(t)+\overset{\rightarrow}{X}_{3}(t)}{3} \tag{16}\]  
where:  
\[\left\{ \begin{array}{l}\overset{\rightarrow}{X}_{1}(t)=\overset{\rightarrow }{X}_{A}(t)-\overset{\rightarrow}{A}.\overset{\rightarrow}{D}_{\Delta}\\ \overset{\rightarrow}{X}_{2}(t)=\overset{\rightarrow}{X}_{\beta}(t)- \overset{\rightarrow}{A}.\overset{\rightarrow}{D}_{\beta}\\ \overset{\rightarrow}{X}_{3}(t)=\overset{\rightarrow}{X}_{\Delta}(t)- \overset{\rightarrow}{A}.\overset{\rightarrow}{D}_{\Delta}\end{array} \right.\]  
Equation (13) represents the distance from the current position, which should be minimized as much as possible so that the next position represented by Equation (14) gets closer and closer to the position of the prey. This will imply that the algorithm will get to the correct solution of the problem \(X_{p}(t)\).