# Two Hop Adaptive Vector Based Quality Forwarding for Void Hole Avoidance in Underwater WSNs
## 4 Linear Programming-Based Mathematical Formulation
### Energy Tax Minimization Using Linear Programming  
High energy consumption drastically affects network performance due to the confined power resource in UWSNs. Many routing protocols have addressed this problem. For the sake of energy tax minimization, an objective function with multiple linear constraints is formulated. In QF-AHH-VBF, the energy tax of sensor nodes mainly depends on packet transmission and packet reception between a source node and the sink. Thus, keeping this in mind, we have formulated an objective function for energy tax minimization in Equation (11). \[Min\sum_{i=1}^{N}E_{Tax}(i)\quad\forall\;\mathrm{i}\;\in\;\mathrm{N} \tag{11}\]  
where \(E_{Tax}\) is energy tax calculated for all nodes. \[E_{consumed}(ij)=\sum_{i=1}^{N}(E_{TX}\times D_{(ij)}+E_{RX}\times N_{n})\quad \forall\;\mathrm{i}\mathrm{j}\;\in\mathrm{N} \tag{12}\]  
where \(Nn\geq 0\) and \(Dij\geq 0\). In Equation (12), \(E_{consumed}\) mainly depends on the transmission energy of the sender node \(E_{TX}\) consumed over the distance \((D_{(ij)})\) between the sender node and the receiver node. The receiving energy \((E_{RX})\) is consumed due to number of neighbor nodes \((N_{n})\) of the sender node receiving the packet. \[E_{TX}^{max}=P_{TX}\times(HS+PL)/DR \tag{13}\] \[E_{RX}^{max}=P_{RX}\times(HS+PL)/DR, \tag{14}\]Equations (13) and (14) give the maximum values of \(E_{TX}\) and \(E_{RX}\). These values depend on the transmission power required for the data packet size (HS + PL) as per the data rate (DR). \[E_{total}=E_{initial}\times N \tag{15}\]  
\(E_{total}\) is the total energy provided to all of the nodes in the network as initial energy (\(E_{initial}\)) in Equation (15). Energy tax is basically the amount of energy consumed in all of the simulation rounds, which is stated in Equation (16) as:  
\[E_{Tax}=\sum_{r=1}^{r_{max}}(E_{consumed}(r)) \tag{16}\]  
Subject to:  
All of the linear constraints of the objective function are given in Equations (17)-(20). \[E_{(TX,RX)}\leq E_{i}{}^{initial}\quad\forall\;\mathrm{i}\;\in\;\mathrm{N} \tag{17}\]  
\(E_{(TX,RX)}\) is the energy required for the transmission and reception collectively, which should be less than the initial energy provided to a node. Meanwhile, Equation (18) states that \(E_{(TX,RX)}\) should be greater than or equal to the residual energy of a node. \[E_{(TX,RX)}\geq E_{i}{}^{r}\quad\forall\;\mathrm{i}\;\in\;\mathrm{N} \tag{18}\]  
In Equation (19), the distance between a sender node and a receiving node should always be less than or equal to the transmission range of the sender node \(R_{TX}^{max}\). Similarly, this distance must not be equal to zero, which is shown as \(R_{TX}^{min}\) in Equation (20),  
\[D_{i}^{j}\leq R_{TX}^{max}\quad\forall\;\mathrm{i}\mathrm{j}\;\in\;\mathrm{N} \tag{19}\]  
\[D_{i}^{j}\geq R_{TX}^{min}\quad\forall\;\mathrm{i}\mathrm{j}\;\in\;\mathrm{N}. \tag{20}\]  
\[E_{consumed}(ij)=\sum_{i=1}^{N}(E_{TX}\times D_{(ij)}+E_{RX}\times N_{n})\quad \forall\;\mathrm{i}\mathrm{j}\;\in\mathrm{N} \tag{12}\]0  
\[E_{consumed}(ij)=\sum_{i=1}^{N}(E_{TX}\times D_{(ij)}+E_{RX}\times N_{n})\quad \forall\;\mathrm{i}\mathrm{j}\;\in\mathrm{N} \tag{12}\]1  
Graphical analysis: Assume a scenario in which the transmission range is 2000 m, which is divided into \(L\) levels, i.e., \(L\) = 1, 2, 3, 4 and 5. Dividing the transmission range into levels is intended to observe the energy consumption according to these levels as written in Equations (25) and (26), where HS + PL = 888 bits, DR = 16 kbps, N = 500, \(P_{TX}\) = 50 W and \(P_{RX}\) = 0.158 W, respectively. From these parameters, \(E_{TX}\) is 4.995 J calculated from Equation (25) at \(L\) = 1 and 0.999 J from Equation (25) at \(L\) = 5. By Equation (26), \(E_{RX}\) is 0.555 J calculated at \(L\) = 1 and 0.111 J calculated at \(L\) = 5, respectively.