Skip to main content
. 2022 Sep 6;22(18):6719. doi: 10.3390/s22186719
Algorithm 3: GA for the Placement Scheme
Input: M, N
Output: O, Fpro
na0, Gngene×n= Gngene×n=
While ngene<Np
Initial Gngene
Gngene×nGngene×nGngene
ngenengene+1
End
While t<Nr
Sort Gngene×n(t) by Fpro(t)
While parents <NrPc do
Select parents Gn0(t) &Gn1(t) by pr
Apply crossing to get offspring Gn0(t+1) &Gn1(t+1)
Apply mutation to Gn0(t+1) &Gn1(t+1)
Gngene×n(t+1)Gngene×n(t+1)Gn0(t+1)Gn1(t+1)
parentsparents+2
End
Sort Gngene×n(t) for finding GNr(1Pc)(t)
Gngene×n(t+1)Gngene×n(t+1)GNr(1Pc)(t)
Gngene×nGngene×n(t+1)
tt+1
End
Find Oij by Gngene×n
Calculate Fpro