Skip to main content
. 2021 Nov 11;21(22):7499. doi: 10.3390/s21227499
Algorithm 4 Population Evaluation.
  • 1:

    for individual pi,i=1 to n do

  • 2:

       Get the index jb of the biggest in ϕi={ϕi,j}j=1k.

  • 3:

       for task Tj,j=1 to k do

  • 4:

         if jjb or rand<ϕi,j then

  • 5:

            fitnessi,j=fj(positioni).

  • 6:

         else

  • 7:

            fitnessi,j=.

  • 8:

         end if

  • 9:

         if fitnessi,j is better than pbesti’s fitness on j then

  • 10:

            Update the pbesti.

  • 11:

            if fitnessi,j is better than fitness of gbestj then

  • 12:

              Update the gbestj.

  • 13:

            end if

  • 14:

         end if

  • 15:

       end for

  • 16:

    end for