Research Article

Efficient Multitask Scheduling for Completion Time Minimization in UAV-Assisted Mobile Edge Computing

Algorithm 1

PSO algorithm to obtain the optimal hovering position of the UAV.
(1)For each particle do:
(a) Initialize the particle’s position with a uniformly distributed random vector , where is the uniform distribution function, and and are the lower and upper boundaries of the search-space.
(b) Initialize the th particle’s best known position to its initial position: . If , update the swarm’s best known position: .
(c) Initialize the particle’s velocity: , where is the speed adjustment parameter of the particles.
(2)Until a termination criterion is met (e.g., number of iterations performed or adequate fitness reached), repeat: (1) For each particle do:
(a) Pick random numbers:
(b) Update the particle’s velocity:
, where is the particle inertia weight, and and are the learning factors.
(c) Update the particle’s position:
(d) If , update the particle’s best known position: . And, if , update the swarm’s best known position: .
(3)Now holds the best found solution.