Skip to main content
. 2022 Jul 22;22(15):5475. doi: 10.3390/s22155475
Algorithm 5 Selection
Input Population, crossover population
Output the better solution
1 Initial Ps←null
2 Calculate the fitness of all individuals in the population
3 if f(Uig) < f(Pig) then
4    Psig ← Uig
5 else
6    Psig ← Pig
7 end if
8 return the better solution