Begin |
Step 1: Initialization. Set the generation counter ; Initialize the population of NP bats |
randomly and each bat corresponding to a potential solution to the given |
problem; define loudness , pulse rate , pulse frequency and the initial |
velocities . |
Step 2: Generating rotation coordinate system. Transform the original coordinate system |
into new rotation coordinate whose horizontal axis is the connection line from |
starting point to target point according to (1); convert |
battlefield threat information to the rotation coordinate system and divide the axis |
into equal partitions. Each feasible solution, denoted by |
P , is an array indicated by the composition of coordinates |
which are the floating-point numbers |
Step 3: Evaluate the threat cost J for each bat in by (4) |
Step 4: while The halting criteria is not satisfied or MaxGeneration do |
Generate new solutions by adjusting frequency, and updating velocities |
and locations/solutions [(7)] |
if (rand ) then |
Select a solution among the best solutions; |
Generate a local solution around the selected best solution |
end if |
Generate a new solution by flying randomly |
if (rand < and ) then |
Accept the new solutions |
Increase and reduce |
end if |
Rank the bats and find the current best |
|
Step 5: end while |
Step 6: Inversely transform the coordinates in final optimal path into the original |
coordinate, and output |
End. |