|
Algorithm 6 FA |
Input: the parameters M, N,, , and
Begin
S1: initialize M individuals randomly,, iterative times t = 1;
S2: compute , if t > 1 and the new position is better than the old one, update and ; if it satisfies (t > N or precision), then go to step S4; otherwise, go to step S3;
S3: for the ith firefly , FA searches another firefly (suppose the jth firefly , and ) in the population that has the luminance calculated with Equation (14). If the luminance of is larger than that of , moves toward by Equation (17), iterative times t = t + 1; go to step S2;
S4: output the optimized results.
End
|