1) If my function has no constraints, do I have to state something like NIL for constraints or need not write anything about constraints?
2) To run GA, is it compulsory to use “InitialPopulation” command to generate the initial population?
3) What is the meaning of the following lines?
a) rand(20, 2); –> is to randomly generate a 20 by 2 matrix
b) 10*rand(20, 2) means what?
c) repmat([10, 30] , 20, 1); –> means what?
Can I have more simple examples of the usage of repmat? (besides those in the documentation, because I can’t understand those examples).
d) what does the combination of rand and repmap mean in the following line?
initpop = 10*rand(20, 2) + repmap ([10, 30], 20, 1);
4) Rastrigin’s function did not set bounds. How does GA know the range of x and y values during crossover and mutation?
5) When we run Rastrigin's function with GA, is it possible to produce the output exactly as 0 since it is the minimum value? I tried to run it a few times, each time the output is only approximately 0 (e.g. 0.00123, 0.0456 etc) why is it so?
6) If I know the minimum value of my function, what adjustment I need to do in order to produce the exact minimum value? Besides tuning those parameters in the options, do I just keep running GA repeatedly until I get the minimum value? What conclusion can I draw once I achieved the actual known minimum value?
That say, if I don't the minimum value, how do I know I have achieved the minimum?
Best Answer