![](https://csdnimg.cn/release/download_crawler_static/11526794/bg4.jpg)
54 S. Mirjalili, A. Lewis / Advances in Engineering Software 95 (2016) 51–67
X*-X
Y
*
-Y
(X,Y)
(X*,Y*)
(X*,Y)
(X,Y*)
(X,Y*-Y)
(X*-X,Y)
(X*,Y*-Y)
(X*-X,Y*-Y)
(X*-X,Y*)
(X,Y,Z)
(X*,Y*,Z*)
(X,Y*-Y,Z*-Z)
(X*-X,Y,Z*-Z)
(X*,Y*-Y,Z*-Z)(X*-X,Y*-Y,Z-Z*)
(X*-X,Y*,Z*-Z)
(X,Y*,Z)
(X,Y*-Y,Z)
(X,Y*,Z*)
(X,Y,Z*)
(X*,Y*,Z*-Z) (X,Y*,Z*-Z)
(X*,Y,Z*-Z) (X,Y,Z*-Z)
(X*-X,Y,Z*)
(X*-X,Y,Z) (X*,Y,Z)
(X,Y,Z*)
(X*,Y,Z*)
ab
Fig. 3. 2D and 3D position vectors and their possible next locations ( X
∗
is the best solution obtained so far).
Fig. 4. Bubble-net search mechanism implemented in WOA ( X
∗
is the best solution obtained so far): (a) shrinking encircling mechanism and (b) spiral updating position.
random value in the interval [ −a , a ] where a is decreased from
2 to 0 over the course of iterations. Setting random values for
A in [ −1,1], the new position of a search agent can be defined
anywhere in between the original position of the agent and the
position of the current best agent. Fig. 4 (a) shows the possi-
ble positions from ( X , Y ) towards ( X
∗
, Y
∗
) that can be achieved
by 0 ≤A ≤1 in a 2D space.
2 Spiral updating position: As can be seen in Fig. 4 (b), this ap-
proach first calculates the distance between the whale located
at ( X , Y ) and prey located at ( X
∗
, Y
∗
). A spiral equation is then
created between the position of whale and prey to mimic the
helix-shaped movement of humpback whales as follows:
X
(
t + 1
)
=
−→
D
· e
bl
· cos
(
2 π l
)
+
−→
X
∗
(
t
)
(2.5)
where
−→
D
= |
−→
X
∗
(t) −
X (t ) | and indicates the distance of the i th
whale to the prey (best solution obtained so far), b is a constant
for defining the shape of the logarithmic spiral, l is a random
number in [ −1,1], and . is an element-by-element multiplica-
tion.
Note that humpback whales swim around the prey within a
shrinking circle and along a spiral-shaped path simultaneously. To
model this simultaneous behavior, we assume that there is a prob-
ability of 50% to choose between either the shrinking encircling
mechanism or the spiral model to update the position of whales
during optimization. The mathematical model is as follows:
X ( t + 1 ) =
−→
X
∗
(
t
)
−
A ·
D if p < 0 . 5
−→
D
· e
bl
· cos
(
2 π l
)
+
−→
X
∗
(
t
)
if p ≥ 0 . 5
(2.6)
where p is a random number in [0,1].
In addition to the bubble-net method, the humpback whales
search for prey randomly. The mathematical model of the search
is as follows.
2.2.3. Search for prey (exploration phase)
The same approach based on the variation of the
A vector
can be utilized to search for prey (exploration). In fact, humpback
whales search randomly according to the position of each other.
Therefore, we use
A with the random values greater than 1 or less
than −1 to force search agent to move far away from a reference
whale. In contrast to the exploitation phase, we update the posi-
tion of a search agent in the exploration phase according to a ran-
domly chosen search agent instead of the best search agent found
so far. This mechanism and |
A | > 1 emphasize exploration and al-
low the WOA algorithm to perform a global search. The mathemat-
ical model is as follows:
D = |
C ·
−−→
X
rand
−
X | (2.7)
X
(
t + 1
)
=
−−→
X
rand
−
A .
D (2.8)