Research Article

Edge Server Placement for Service Offloading in Internet of Things

Algorithm 3

Edge server layout strategy based on PSO.
Inputs: K chromosomes that have been iteratively optimized by GA, Number of iterations T, Variable t
Output: K chromosomes optimized by PSO
(1) for t = 0 to T do
(2)  if t == 0 then
(3)   Initialize the velocity of each particle of K chromosomes
(4)  else
(5)   Adjust the position of each particle according to formulas (23) and (24)
(6)  end if
(7) end for
(8)return K chromosomes