Skip to main content
. 2018 Aug 22;18(9):2764. doi: 10.3390/s18092764
Algorithm 2. Population Initialization.
Input: population size NP , fitness function f(x)
Output: initial population P={x1,x2,xM}
1: For inti=1toNP;
2: For int j=1 to n
3: Generate a uniformly distributed random u in [0, 1];
4: If up
5: xi(j)=1;
6: Else xi(j)=0;
7: End for
8: Calculate xi through Formula (9);
9: End for
10: Compute fitness of all vectors in alternative population;
11: Select the formerNP vectors as initial population;
12: Compute the optional solution x and its fitness B=f(x) in initial population