Skip to main content
. 2021 Nov 11;21(22):7499. doi: 10.3390/s21227499
Algorithm 1 SRPSMTO.
Input:
    n (population size)
    k (number of tasks)
    w,c1,c2 (PSO parameters)
Output:
   {x1*,x2*,,xk*} (the best solution achieved on each of the k component tasks)
1:    Randomly generate a population pop of size n.
2:   Evenly separate pop into k subgroups and evaluate each subgroup on one corresponding task.
3:   Update the pbesti,i=1,,n and gbestj,j=1,,k, and the ability vector ϕi={ϕi,j}j=1k of individual pi in pop.
4:   while (stopping conditions are not satisfied) do
5:     Update positions (see Equation (2)).
6:     Update velocities (see Algorithm 2 and 3).
7:     Evaluate all individuals and Update the pbesti,i=1,,n and gbestj,j=1,,k (see Algorithm 4).
8:      Update the ability vector of every individual.
9:  end while