## 5 The Hybrid White Shark Optimizer and Whale Optimization Algorithm (WSO-WOA)
### Whale Optimization Algorithm (WOA)  
The WOA was introduced by [PERSON] et al. [35], drawing inspiration from the unique hunting behavior of humpback whales, particularly their bubble net feeding technique. This technique involves creating a series of bubbles in a circular or spiral pattern, resembling the shape of a \"9\", to trap prey. This behavior is distinct from that of humpback whales and serves as the foundation for the mathematical model of WOA. Like other meta-heuristic algorithms, WOA begins with the initialization phase, then updates decision variables and constraint checks, and concludes with the evaluation process. The operational mechanism of WOA can be outlined in the following steps:  
1. First, initialize the population of whales \(X_{i}\) (where \(i=1,2\ldots,n\)).
2. Calculate the fitness of each search agent to identify the best search agent, denoted as \(X_{gbest}^{t}\).
3. Begin the iterative process with the specified maximum number of iterations. For each iteration:  
* Update the parameters \(a\), \(A\), \(C\), \(l\), and \(p\) for every search agent. The parameter \(a\) gradually decreases from 2 to 0 throughout the iterations, affecting both the exploration and exploitation phases. Value \(b\) remains constant and determines the shape of the logarithmic spiral. The parameter \(l\) is a random value within the range of [\(-1\), \(1\)], while p is a random value between 0 and 1.  
Search vector A enables the WOA algorithm to seamlessly shift between exploration and exploitation, as defined in (43). As A decreases, the algorithm allocates certain iterations to exploration when \(|A|\) is greater than or equal to 1 while dedicating the remaining iterations to exploitation when \(|\)A\(|\) is less than 1. Vector \(C\) is calculated using (44). \(r\) is a vector randomly generated in the range 0 and 1.  
\[A=2a\cdot r-a \tag{43}\]  
\[C=2\cdot r \tag{44}\]* The shrinking encircling mechanism and the spiral model are applied to update whales' positions. If the probability \(p\) is less than 0.5 and the magnitude of A is less than 1, update the position of the current search agent according to (45). \[X_{i}^{t+1}=X_{gbest}^{t}-A\cdot D_{1},\ if|A|<1\ and\ p<0.5\] (45) If \(p\) is less than 0.5 but the magnitude of A is greater than or equal to 1, select a random search agent and update the position of the current search agent by: \[X_{i}^{t+1}=X_{rand}^{t}-A\cdot D_{2},\ if|A|\geq 1\ and\ p<0.5\] (46) If p is greater than or equal to 0.5, update the position of the current search agent by: \[X_{i}^{t+1}=\hat{D}\cdot e^{bl}\cdot cos(2\pi l)+X_{gbest}^{t},\ if\ p\geq 0.5\] (47) \(D_{1}\) and \(D_{2}\) represent the distance between the \(i\)th whale and the prey (the best solution found so far) and are determined using (48) and (49), respectively. \(\hat{D}\) is calculated using (50). \[D_{1}=\left|\text{C}\cdot X_{gbest}^{t}-X_{i}^{t}\right|\] (48) \[D_{2}=\left|\text{C}\cdot X_{rand}^{t}-X_{i}^{t}\right|\] (49) \[\hat{D}=\left|X_{gbest}^{t}-X_{i}^{t}\right|\] (50)
* After updating the positions, check if any search agent has moved beyond the defined search space and make the necessary adjustments to bring it back within bounds.
* Recalculate the fitness of each search agent and update \(X_{gbest}^{t}\) if a better solution is found.
* Increment the iteration count t and continue the process until the maximum number of iterations is reached.
* Finally, return \(X_{gbest}^{t}\) as the best solution obtained.