Research Article
Node Localization Algorithm Based on Modified Archimedes Optimization Algorithm in Wireless Sensor Networks
Algorithm 1
The pseudocode of MAOADV-Hop.
1: Procedure MAOADV-Hop; | 2: Initialization: total number of nodes , percentage of anchor nodes, communication radius ; | 3: Network deployment nodes to generate simulated | network topology; | 4: Calculate the hop-count value according to the shortest path algorithm; | 5: for to | 6: for to | 7: for to | 8: if short_path()+short_path()<short_path(); | 9: short_path()=short_path()+short_path(); | 10: end | 11: end | 12: end | 13: end | 14: Calculate the average distance Hop-size of each hop using Equation (18); | 15: Calculate the estimated distance from the anchor node to the unknown node using Equation (19); | 16: Initialize the parameters at the population level of MAOA algorithm using (12)─(14); | 17: for : Max_iter | 18: Calculate using Equation (3) and calculate density decline coefficient using Equation (4); | 19: for | 20: Update and using Equation (15); | 21: if | 22: Update using Equation (5) and calculate using Equation (8); | 23: else | 24: Update using Equation (6) and calculate using Equation (9); | 25: end | 26: Apply boundary constraints to and calculate the fitness of ; | 27: The optimal position of each object is selected and assigned to , and the corresponding fitness is assigned to; | 28: Select the best fitness minimum value, the corresponding position ; | 29: end | 30: The best individual is the location of the unknown node. | 31: end |
|