I'm using NSGA2 for solving a multi-objective optimization and I have noticed the code breaks when using an odd value for the population size. Tracking the error, it seems the issue is in the "reproduction" function, line 255 in NSGA2.jl, where the for loop in line 261 populates the Q variable with step 2. However, when doing this while using an odd population size, in the last iteration line 274 throws a bound error. Is it anywhere specified the population size must be even value? (I also must specify I'm fairly new to the evolutionary algorithm field, so I might be wrong in this). If not, I'd suggest add a check to the initial population size input and round it to the next value.
I'm using NSGA2 for solving a multi-objective optimization and I have noticed the code breaks when using an odd value for the population size. Tracking the error, it seems the issue is in the "reproduction" function, line 255 in NSGA2.jl, where the for loop in line 261 populates the Q variable with step 2. However, when doing this while using an odd population size, in the last iteration line 274 throws a bound error. Is it anywhere specified the population size must be even value? (I also must specify I'm fairly new to the evolutionary algorithm field, so I might be wrong in this). If not, I'd suggest add a check to the initial population size input and round it to the next value.