# W-GUN: Whale Optimization for Energy and Delay-Centric Green Underwater Networks
## 3 Green Underwater Sensor Network Framework using Adapted Whale and Wolf Optimization
### Underwater Relay Node Optimization Model
#### 3.1.2 Adapted Grey Wolf Optimization for Underwater Networks  
Towards effectively balancing the exploitation and exploration phases for better convergence in next-hop searching, wolf optimization is used to enable the proposed framework W-GUN [36]. It is also a swarm intelligence technique. In traditional GWO, tracking is directed by the alpha, beta and delta wolves as follows:  
* The alpha wolves (\(\alpha\)): the most important wolves. They encompass a responsibility to make a decision. Using this setting, we focus on the energy-centric nodes for optimization;
* The beta wolves (\(\beta\)): they comprise the second tier of wolves, subsequent to the alphas. The standard responsibility of beta wolves is to aid and encourage alpha selection. Using this setting, we focus on delay-centric nodes for optimization;
* The delta wolves (\(\delta\)): they comprise the third tier of wolves. Using this setting, both energy and delay are considered as the overall optimization goal.  
In W-GUN, the most important aspiration is to encircle a prey by guidance through \(\alpha\), \(\beta\) and \(\delta\), which can be systematically established as given in Equation (12):  
\[M(k+1)=M(k)-C\cdot P \tag{12}\]  
\[P=|V\cdot M_{l}(k)-M(k)| \tag{13}\]where \(P\) is the search accelerator parameter, \(M\) represents the grey wolf position, \(M_{l}\) is the prey position, \(C\), \(V\) are the coefficient vectors, and the number of iterations is defined by '\(K\)'. The coefficient vectors \(C\) and \(V\) can be obtained by the equation below:  
\[C=2c\cdot w_{1}-c \tag{14}\]  
\[V=2\cdot w_{2} \tag{15}\]  
where '\(c\)' will be linearly decreased from 2 to 0 and \(w_{1}\) and \(w_{2}\) are the random vectors from [0, 1]. The parameter '\(c\)' is updated in every iteration within the range from 2 to 0, according to the below Equation (16):  
\[c=2-k\left(\frac{2}{K}\right) \tag{16}\]  
where '\(K\)' denotes the total number of iterations allowed. It is assumed that the large number of possible locations of prey can be discovered through the alpha, beta, and delta solutions; the updated procedure of the whales positions, based on the first three best solutions, can be obtained as shown below:  
\[M_{1}=M_{\alpha}(k)-C_{1}\cdot P_{\alpha} \tag{17}\]  
\[M_{2}=M_{\beta}(k)-C_{2}\cdot P_{\beta} \tag{18}\]  
\[M_{3}=M_{\delta}(k)-C_{3}\cdot P_{\delta} \tag{19}\]  
where the component values \(P_{\alpha}\), \(P_{\beta}\) and \(P_{\delta}\) are calculated as follows:  
\[P_{\alpha}=|V_{1}\cdot M_{\alpha}-M| \tag{20}\]  
\[P_{\beta}=|V_{2}\cdot M_{\beta}-M| \tag{21}\]  
\[P_{\delta}=|V_{3}\cdot M_{\delta}-M|. \tag{22}\]  
Based on the above Equations (17)-(19), the solution for the next iteration will be obtained as follows:  
\[M(k+1)=\frac{(M_{1}+M_{2}+M_{3})}{3} \tag{23}\]  
The process of updating the whales positions takes place continuously until the maximum iteration is achieved. A complete procedure of the proposed framework W-GUN, is presented below as an algorithm and flowchart in Figure 1.