|
Algorithm 4 BA |
Input: the parameters M, N,,,, and
Begin
S1: initialize M individuals randomly,, iterative times t = 1;
S2: compute , update ; if it satisfies (t > N or precision), then go to step S4; otherwise, go to step S3;
S3: update , and by Equation (6), generate a random number , if , the bat with the global optimum generates a new solution by Equation (7). Bats generate new solutions randomly, and BA generates a random number; if and the new solution is better than the old one, BA updates the corresponding position by Equation (7), and updates and by Equations (8) and (9); iterative times t = t + 1, go to step S2;
S4: output the optimized results.
End
|