where variable dir is set either to +1 or 1 depending on the diversity
of swarm. In the attraction phase (dir = +1) the swarm is attracting
and thus the diversity decreases. Once the diversity drops below
a lower bound, dlow, ARPSO switches to the repulsion phase
(dir = 1) and the swarm expands. Again, ARPSO switches back to
the attraction phase when a diversity of dhigh is reached. Note that
a set of different random numbers u1, u2 uniformly distributed in
[0.0, 2.0] for each component of the velocity were employed in the
original ARPSO. Nevertheless, it is identical to the proposed velocity
updating Eq. (3) since c1 = c2 = 2 is utilized in this study.