Reference: Deb K, Pratap A, Agarwal S, et al. A fast and elitist multiobjective genetic algorithm: NSGA-II[J]. IEEE Transactions on Evolutionary Computation, 2002, 6(2): 182-197.
Nondominated sorting genetic algorithm II (NSGA-II) with simulated binary crossover (SBX) and polynomial mutation.
Variables | Meaning |
---|---|
npop | Population size |
iter | Iteration number |
lb | Lower bound |
ub | Upper bound |
pc | Crossover probability (default = 1) |
eta_c | The spread factor distribution index (default = 20) |
pm | Mutation probability (default = 0.1) |
eta_m | The perturbance factor distribution index (default = 20) |
dim | Dimension |
pop | Population |
objs | Objectives |
pfs | pfs[i] means the Pareto front which the i-th individual belongs to |
rank | The Pareto rank of all the individuals in the population |
cd | Crowding distance |
mating_pool | Mating pool |
pf | The obtained Pareto front |
if __name__ == '__main__':
main(100, 300, np.array([0] * 10), np.array([1] * 10))