Algorithm 2: The minimum inter-cluster interference strategy based on improved virtual force and motion. | |
Input: and NAP, , FTH Output: APPositon_new |
|
1 | Initialization: Max_interation; C; |
2 | While (h < Max_interation) |
3 | if |
4 | for j = 1; j ≤ |AP|; j++ do |
5 | Calculate the virtual force of apj according to Equations (15)–(18); |
6 | if > 0 |
7 | Calculate the maximum move distance dp according to Equation (20); |
8 | if dp > dmove_step // Ensure that the cluster head covers its target points |
9 | din ← dmove_step |
10 | else |
11 | din ← dp |
12 | end if |
13 | Update the new position of according to Equation (22) |
14 | if apposition_new ∈ A // Evaluate whether the new position is in A |
15 | apposition_new ← chposition_new |
16 | else |
17 | apposition_old ← the corresponding boundary value of A |
18 | end if |
19 | Move the cluster head to the new position |
20 | apposition_new ← chposition_new |
21 | end if |
22 | Compute the total virtual force of the entire network |
23 | end for |
24 | end if |
25 | end while |
26 | Return APPosition_new // Return the new position of the cluster heads |