Research Article
A Data Collection Method for Mobile Wireless Sensor Networks Based on Improved Dragonfly Algorithm
Algorithm 1
Pseudocode of path planning of mobile Sink with the IDA.
(1) | Step 1: Initialization of the data collection strategy, the randomly generated population size is the initial population. | (2) | Step 2: Calculate the fitness value f(i) of each dragonfly. | (3) | Step 3: Update the parameters, including the search radius. | (4) | Step 4: Calculate the step vector, and update the position of the dragonfly. | (5) | Step 5: Substitute the updated position of each dragonfly into the fitness function to obtain a new fitness value. | (6) | Step 6: perform the reverse learning operation, select the individual who enters the next generation. | (7) | Step 7: Compare the fitness value of the individual with the optimal value ffood and the worst value fenemy. | (8) | Step 8: Determine whether the conditions for terminating the iteration are met. If it is met, exit the loop, otherwise go to Step 3. | (9) | Step 9: Output the optimal planning path. |
|