# Energy and Environment-Aware Path Planning in Wireless Sensor Networks with Mobile Sink
## 5 Swarm Based Solution
### Path Planning Problem
#### 5.1.2 The Heuristic Information Calculation  
In the majority of application scenarios, the mobile sink's battery acts as its only source of power, and the battery cannot be recharged [11]. As a result, the mobile sink has an energy limit [11]. In fact, the mobile sink movement is the main source of consumed energy and costs. More energy is needed to move when the target cluster head location is near to the movement's beginning point. Therefore, the closer a mobile sink is to the target location, the more energy efficiently it operates. The remaining energy after the movement is consequently taken into consideration as the following heuristic information to provide minimum movement energy and so improve mobile sink lifespan:  
\[\eta_{ux}^{1}(t)=\frac{\Big{(}RE_{MS}(t)-ME_{(u,x)}(t)\Big{)}}{\sum\limits_{l \in FCH^{l}}\Big{(}RE_{MS}(t)-ME_{(u,l)}(t)\Big{)}}. \tag{88}\]  
Because the candidate cluster head position has a larger value of \(\eta_{ux}^{1}(t)\), the mobile sink will have more residual energy if it is relocated from the cluster head's location \(u\) to \(x\). Thus, cluster head x has more opportunities to be the next location.  
As mobile sink travel may be time-consuming, particularly in large sensor fields, some packets may be missed due to low buffer space. To decrease packet loss and increase network lifetime, a delay-aware method is needed [18]. Hence, the movement delay is considered in the heuristic information as follows:  
\[\lambda_{ux}^{1}(t)=\frac{\frac{1}{D_{ux}(t)}}{\sum\limits_{l\in FCH^{l}}\frac {1}{D_{ul}(t)}} \tag{89}\]  
where  
\[D_{ux}(t)=\frac{ED_{ux}(t)}{speed_{MS}}. \tag{90}\]  
The candidate cluster head location with a greater value of \(\lambda_{ux}^{1}(t)\) has more opportunity to be the next location as it requires less time in the movement than other candidates.  
To ensure in-time urgent data delivery and avoid excessive routing, the mobile sink should move first to the cluster heads in the high priority zones. As a result, while choosingthe next deployment point, the zone priority metric of cluster heads is used as heuristic information, as demonstrated by:  
\[\beta_{ux}^{1}(t)=\frac{\zeta+ZPM_{x}^{i}(t)}{\sum\limits_{l\in FCH^{t}}\left( \zeta+ZPM_{l}^{i}(t)\right)} \tag{91}\]  
where \(\zeta<1\) is constant. The candidate cluster head location with a higher value of \(\beta_{ux}^{1}(t)\), meaning that the zone of that cluster head has a higher priority, has a better chance of being the next new location.  
It is necessary to reduce the distance between the sink node and urgent cluster heads to increase real-time performance. This reduces the required latency, so important messages arrive on time. The heuristic information considers the average distance between urgent cluster heads as follows:  
\[\gamma_{ux}^{1}(t)=\frac{\sfrac{1}{A_{d_{x}}}}{\sum\limits_{l\in FCH^{t}}\sfrac {1}{A_{d_{l}}}}. \tag{92}\]  
The cluster head location with a higher value of \(\gamma_{ux}^{1}(t)\) means that this location will have a lower average distance, and it has more chance of being the next new location of the mobile sink.