Skip to main content
. 2022 Jan 15;12(2):201. doi: 10.3390/ani12020201
Algorithm 1 Initialization of individual
  •       1:

    Input: individual ai(t)=[], probability Pinitial

  •       2:

    for  i=1,2,,q  do

  •       3:

        if U(0,1)<Pinitial then

  •       4:

            ai(t)=[1,ai(t)]

  •       5:

        else

  •       6:

            ai(t)=[0,ai(t)]

  •       7:

        end if

  •       8:

    end for

  •       9:

    Output: individual ai(t)