I am doing optimization using genetic algorithm. In a nutshell, the fitness function consists of 3 terms, A and B are normal function terms whereas C is an additional penalty term.
function XYZ = Ackley(x)
XYZ = A + B + C
After applying GA parameters. The final code is below.. Where nit = number of iterations (I am running 30 iterations minimum)
[x,fval,exitflag,output,population,score] = GAcode(nvars,lb,ub,InitialPopulationRange_Data,PopulationSize_Data,EliteCount_Data,CrossoverFraction_Data,MaxGenerations_Data,FunctionTolerance_Data,ConstraintTolerance_Data);
The code works perfectly fine for getting final function value 'fval' (XYZ) and unknowns 'x' after each iteration... Is it possible to get individual values of A,B and C as well after each iteration.?
Thanks for your help.