# Energy and Environment-Aware Path Planning in Wireless Sensor Networks with Mobile Sink
## 4 Formulation for Optimal Solution
### Optimal Path Planning Problem

Table 3: \(Cont.\)To calculate the environmental effect of a single factor f on zone i at time t, apply the following equation:  
\[EI_{i}^{f}(t)=\left\{ \begin{array}{ll}1&\text{if }ZED_{L}^{f}\leq ZED_{i}^{f} \leq ZED_{H}^{f}\\ \frac{ZED_{H}^{f}-ZED_{H}^{f}}{ZED_{\text{max}}^{f}-ZED_{H}^{f}}+1&\text{if }ZED_{i}^{f}>ZED_{H}^{f}\\ \frac{ZED_{i}^{f}-ZED_{i}^{f}}{ZED_{i}^{f}-ZED_{\text{min}}^{f}}+1&\text{if }ZED_{i}^{f}<ZED_{L}^{f}\\ \end{array} \right.. \tag{1}\]  
Inspired by [14], Equation (1) shows the following scenario:  
Look at the environmental data value of any zone \(i\) for such environmental factor \(f\), and check the normal operating range \((ED_{L}^{f},ED_{H}^{f})\); if it is achieved, it means that the sensor nodes performance in that zone would not be influenced by environmental factor f. Then define the environmental effect metric \(EI_{i}^{f}(t)\) to 1. Suppose zone \(i\)'s environmental data are beyond the typical range. In that case, environmental factor \(f\) will detrimentally affect the sensor nodes in that zone, causing them to deteriorate and increasing the risk of malfunctions. Therefore, \(EI_{i}^{f}(t)\) is decreased. The trend of the given function in Equation (1) which represents the environment single factor impact metric is shown in Figure 1.  
Many environmental factors influence the performance of WSNs. So, the environmental impact metric should be determined for multiple environmental factors as follows [13]:  
\[MEI_{i}(t)=\textbf{min}\Big{\{}EI_{i}^{f_{1}}(t),EI_{i}^{f_{2}}(t)\Big{\}} \tag{2}\]  
where are the single environmental impact metrics of zone \(i\) at time \(t\) with respect to the environmental factors \(f_{1}\) and \(f_{2}\), respectively. Indeed, suppose the sensor nodes performance in a certain zone would be severely affected by one of multiple environmental factors. In that case, the sink node should be prevented from crossing that zone. Moreover, its sensor nodes should be prevented from being selected as a next-hop through the routing process of the urgent messages. Therefore, among the environmental metrics values of different factors, the multiple environmental impact metric is represented by the minimum value [13]. On the other hand, if such a wildfire occurs in a particular zone, it is expected to spread rapidly to neighboring zones; neighboring zones are still considered hazard zones even though this incident did not spread to them. To keep the mobile sink path and routing paths of urgent data away from environmental risks as early as possible, it is important to  
Figure 1: The curve of the single environmental impact metric function. link each zone's environmental effect metric with its neighbors. A zone's environmental impact on zone \(j\) is defined as follows: [13]:  
\[NEI_{ij}(t)=K_{ij}MEI_{j}(t). \tag{3}\]  
The attenuation coefficient \(K_{ij}\) was calculated as follows:  
\[K_{ij}=1+\frac{ED_{ij}-ED_{ij\text{min}}}{ED_{ij\text{max}}-ED_{ij\text{min}}} \tag{4}\]  
where \(ED_{ij\text{min}}\) and \(ED_{ij\text{max}}\) represent the minimum and maximum distance between the center of zone \(i\) and \(j\). For a square/circular zone with side length/diameter \(a\), \(ED_{ij\text{min}}\) and \(ED_{ij\text{max}}\) could be calculated as follows:  
\[ED_{ij\text{min}}=a \tag{5}\]  
\[ED_{ij\text{max}}=2\sqrt{2}a. \tag{6}\]  
For rectangular shaped zone with side length \(L\) and side width \(w\), \(ED_{ij\text{min}}\) and \(ED_{ij\text{max}}\) could be calculated as follows:  
\[ED_{ij\text{min}}=L \tag{7}\]  
\[ED_{ij\text{max}}=2\sqrt{L^{2}+w^{2}}. \tag{8}\]  
Equations (3) and (4) show that the attenuation coefficient is proportional to zone \(i\) and \(j\) distance. This is because each zone is more sensitive to environmental threats from its neighbors when they are closer. As numerous bordering zones surround each zone, each has its own neighboring environmental effect metric.