Skip to main content
. 2022 Jan 13;22(2):617. doi: 10.3390/s22020617
Algorithm 1 Pseudocode of ATOAcs
  • 1:

    Initialize X, N, t, T, min, max, α, μ, and ϵ.

  • 2:

    while t < T do

  • 3:

       Calculate the best(xj), MOA(t) and MOP(t).

  • 4:

       for i=1:size(X,1) do

  • 5:

         for j=1:size(X,2) do

  • 6:

            Generate r1[0,1]

  • 7:

            if r1≤ MOA then

  • 8:

              Generate r2[0,1].

  • 9:

              if r2≤ 0.5 then

  • 10:

                 Compute the xi,j(t+1) using the first case in (17).

  • 11:

              else

  • 12:

                 Compute the xi,j(t+1) using the second case in (17).

  • 13:

              end if

  • 14:

            else

  • 15:

              Generate r3[0,1].

  • 16:

              if r3≤ 0.5 then

  • 17:

                 Compute the xi,j(t+1) using the first case in (18).

  • 18:

              else

  • 19:

                 Compute the xi,j(t+1) using the second case in (18).

  • 20:

              end if

  • 21:

            end if

  • 22:

         end for

  • 23:

       end for

  • 24:

       t=t+1

  • 25:

    end while

  • 26:

    return  best(xj)