The stall generation option is only used to ensure a minimum of 'X' generations are computed regardless of the convergence criteria. For instance, the fitness function of some highly constrained problems do not change much or at all from a generation to another and using Stall Generation will avoid the GA stopping after a couple of iteration due to the fact that the best fitness value is not changing.
As always with meta-heuristic algorithms the ideal values of options are problem dependent and I cannot tell you what is the best value in your case or even if you need to use this option. Do you have a good reason to enforce a minimum number of generation being computed? If so you can also try varying the stall generation value to see how the GA reacts to your problem.
Basically you must be sure that your GA has had enough iterations to converge. If you repeat your optimisation multiple times while increasing the population size and/or the number of generations you can find out if your GA has properly converged or not.
Earlier I was facing with the problem of my program taking long time (approx. 2hrs) for running 10 iterations. But i realized that there were some operations which slowed down my program. Now after modification, my program is running fast and converges in few seconds even for more generations.
The current problem I am facing is the optimization is not proper that is the obtained design at the end is not matching properly with the desired performance. For this i have suggested to modify my merit function and I am trying to do that. Kindly suggest me any other solutions or suggest how to decide merit function.
Sir, by desired performance not matching, i mean the output performance curve or (transmittance values) is not matching with the desired curve . Merit function value is less although.
should I manually calculate the merit function for each transmittance taking one solution i.e. set of thickness values (I have 28 variables i.e. 28 thicknesses) and transmittance range e.g. is 400-700 nm. Please suggest.
Merit function is the output of the program which is calculated as difference of desired and obtained transmittance. desired I am taking the desired transmittance values whereas obtained transmittance is calculated in the program using some equations. the input to the program is thickness whose range I am giving in the GA optimtool of matlab.
Yes right but I am not providing the 28 thickness values, I am just providing the lower and upper limit of the thickness and getting transmittance values which I am comparing with the desired values.