Call the threat model; |
Initialize parameters: |
1. While NC - 1<NCmax (The largest iteration number) |
2. For i=1:m (The number of ants) |
3. Put m ants on red missiles randomly; |
4. End |
5. For k=1:count (The total number of ants’ movements) |
6.For j=1:m |
7. For i=1:Kb (Number of attackable blue fighters) |
8. Generate a random number q; |
9.Select path with pseudorandom probability using formula ((14), (15)); |
10.Add the target to selected set; |
11.Assignable target number minus 1; |
12.The number of remaining missiles in red fighters minus 1; |
13.allowedk minus the assigned target; |
14.End |
15.End |
16.For j=1:m |
17.For i=1:Nrl (The remaining amount of red missiles) |
18.Generate a random number q; |
19.Select path with pseudorandom probability using formula ((14), (15)); |
20.Add the target to selected set; |
21.allowedk minus the assigned target; |
22.End |
23.End |
24.Determine the path of the maximum threat in this cycle using WTA model; |
25.Global update of pheromone using formula ((22), (23)); |
26.Update the pheromone interval on the paths using formula (26); |
27.NC=NC+1; |
28.End |
29.End |
30.Get the optimal WTA solution. |