Research Article
GIS-Based Niche Hybrid Bat Algorithm for Solving Optimal Spatial Search
Algorithm 1
The pseudocode of the original BA.
| Objective function F(x), x = (x1,x2,...,xd)T | | Initialize the bat population xi (i = 1,2, …, n) and | | Define the pulse frequency fi at xi | | Initialize the pulse rates ri and the loudness Ai | | While (t < Imax) (where Imax is the max number of iterations) | | Generate new solutions by adjusting the frequency, and updating velocities and locations using equations (1)–(3) | | If (rand1 > ri) | | Select a solution among the best solutions | | Generate a local solution around the selected best solution using equation (4) | | End if | | Generate a new solution by flying randomly | | If (rand2 < Ai and f(xi) < f(xgbest)) | | Accept the new solutions | | Increase ri and reduce Ai using equations (5) and (6) | | End if | | Rank the bats and find the current best xgbest | | End while |
|