Particle S warm Simulation 159
x
i
, to renew its memory and forget the old one. If a food source c annot
be improved upon within a predetermined number of iterations, defined as
Limit, this food source is abandoned. The bee that was exploiting t his food
site b e c omes a scout and associates itself with a new food site that is chosen
via some principle. In canonical ABC [65], the scout looks for a new food site
by random initialization.
The details of the ABC algorithm are described below. The pseudocode of
the algorithm is shown in Algorithm 1.
Step 0: Preparation The total number of search points (N ), to tal number of
trips (T
max
), and a scout control par ameter (Limit) are initialized. The
numbers of employed bees and onlooker bees are set to be the same
as the total number of search points (N). The value of the objective
function f is taken to be non-neg ative, with larger values being better.
Step 1: Initialization 1 The trip counter k is set to 1, and the number of
search point updates s
i
is set to 0. The initial position vector for each
search point x
i
= (x
i1
, x
i2
, x
i3
, ··· , x
id
)
T
is assigned random values.
Here, the subscript i (i = 1, ··· , N) is the index of the search point,
and d is the number of dimensions in the sea rch spac e .
Step 2: Initialization 2 Determine the initial best solution best.
i
g
= a rgmax
i
f(x
i
) (6.10)
best = x
i
g
(6.11)
Step 3: Employed be e search The following equation is used to calculate
a new position vector v
ij
from the current position vector x
ij
.
v
ij
= x
ij
+ φ · (x
ij
− x
kj
) (6.12)
Here, j is a randomly chosen dimensional number, k is the index for
some randomly chosen search point other than i, and φ is a uniform
random number in the range [−1, 1]. The position vector x
i
and the
number of search point updates s
i
are determined according to the
following equation:
I = {i | f (x
i
) < f(v
i
)} (6.13)
x
i
=
v
i
i ∈ I
x
i
i /∈ I
(6.14)
s
i
=
0 i ∈ I
s
i
+ 1 i /∈ I
(6.15)
Step 4: Onlooker bee search The following two steps are performed.