Skip to main content
. 2021 Jun 17;26(12):3699. doi: 10.3390/molecules26123699
Algorithm 1 NSGA-II algorithm [35].
1: Procedure NSGA-II (N,g,fk Xk) N members evolved g generations to solve fk X
2:Initialize population 
3:Generate random populationsize N
4:Evaluateobjectivevalues
5:Assign rank (level) basedonParetodominance-sort
6:Generate child population
7:Binarytournament selection
8:Recombinationandmutation
9:Fori=1togdo
10:Foreachparentandchildinpopulationdo
11:Assignrank(level)basedonPareto-sort
12:GeneratsetsofnondominatedvectorsalongPFknown
13:Loop(inside)byaddingsolutionstonextgenerationstartingfromthefirstfrontNindividualsfound determinecrowdingdistancebetweenpointsonfront
14:Endfor
15:Selectpoints  (elitist)onlowerfront (lower rank)andareoutsideacrowdingdistance
16:Createnextgeneration
17:Binarytournamentselection
18:Recombinationand mutation
19:Endfor
20: Endprocedure