Skip to main content
. 2022 Jul 22;22(15):5475. doi: 10.3390/s22155475
Algorithm 2 Initialization of the population
Input k, population size: np, chromosome length: cl, Ca, λi
Output Initial population
1 Randomly generate k values in the range [0, cl−1] as controller_set
2 Initial P←null
3 for i < np do
4   for j < cl do
5     Pi,j←randomly choose a value from controller_set
6 end for
7   Calculate the load of each controller
7   if the load of each controller exceeds capacity constraints then
8     reproduce Pi,j
9   end if
10 end for
11 return Initial population and the set of controllers