Skip to main content
. 2024 Dec 16;24(24):8026. doi: 10.3390/s24248026
Algorithm 2 Initialization Algorithm
  • Input: 

    Initial population size: nI.

  • Output: 

    Initial solutions P.

  •  1:

    Set P={Pi(0)}nI,Pi(0)=(Wi1,Wi2),i=1,2,3,⋯,nI;

  •  2:

    for i=1,2,3,⋯,nI do

  •  3:

       for each element in Wi1,Wi2 do

  •  4:

         Randomly generate a value in the range of −1 to 1;

  •  5:

       end for

  •  6:

    end for