I'm to optimizing a problem, however I find it difficult to understand my result and improve it. May you give me some tips, please?
This is the code generated from the pro
function [x,fval,exitflag,output,population,score] = ottimizzazione_con_ga(nvars,lb,ub,TolFun_Data,TolCon_Data)
% This is an auto generated M-file from Optimization Tool.
% Start with the default options
options = gaoptimset;
% Modify options setting
options = gaoptimset(options,'TolFun', TolFun_Data);
options = gaoptimset(options,'TolCon', TolCon_Data);
options = gaoptimset(options,'Display', 'off');
options = gaoptimset(options,'PlotFcns', { @gaplotbestf @gaplotdistance @gaplotrange @gaplotscorediversity @gaplotselection @gaplotstopping });
options = gaoptimset(options,'OutputFcns', { [] });
options = gaoptimset(options,'Vectorized', 'off');
options = gaoptimset(options,'UseParallel', 'never');
[x,fval,exitflag,output,population,score] = ...
ga(@myfun,nvars,[],[],[],[],lb,ub,@confun,options);
And this the plot result:
http://img696.imageshack.us/f/optimization.jpg/
What must I check from these plots? Any suggestions are appreciated.
Thanks
Pietro
While the Optimization Toolbox documentation doesn't specifically
address looking at results of GA, it might help you understand your
results. Results:
http://www.mathworks.com/help/toolbox/optim/ug/br5u_qf.html
Suggestions for next steps:
http://www.mathworks.com/help/toolbox/optim/ug/br44i2r.html
You might also want to check results as described in
http://www.mathworks.com/help/toolbox/gads/bsc5_cj.html
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
Hi Alan,
I have just read the global optimization toolbox documentation, but I find some difficulties to apply it in my case. For example in your opinion the diviersity is high enough in the beginning?
Moreover I saw on the documentation a lot of example in which the graph of best fitness value and the mean fittness values respect the generations are quite different but in my calculation they are the same. Why I have this behaviour? Do you see something strange from the other graph?
Hopeful to have properly explained my doubt
Thanks
Pietro
Hi Pietro,
From a brief look at the plots, it looks like GA has a converged to *a* solution in your case. In fact, inspecting the diversity plot suggests that the entire population converged to the solution (as the diversity is zero).
At first glance this doesn't seem strange to me, but I don't know about your problem. Now, do you think that there may be a solution with a lower objectve function value for your problem? That is, do you think GA has converged too quickly. If so, here are a few suggestions that you could try
1) Run GA several times. Remember that GA is a stochastic algorithm and does not necessarily take the same "path" to the solution every time.
2) Increase the level of mutation when GA is called. This encourages GA to explore more of the search domain. For more information on how to do this, see the following sections in the Global Optimization Toolbox documentation:
Mutation and Crossover:
<<http://www.mathworks.com/help/toolbox/gads/f6691.html#f13721>>
Setting the Amount of Mutation:
<<http://www.mathworks.com/help/toolbox/gads/f6691.html#f8092>>
Setting the Crossover Fraction:
<<http://www.mathworks.com/help/toolbox/gads/f6691.html#f14372>>
3) Use another solver to investigate your problem. There are several ideas for how to do this in the final documentation link that Alan posted
<<http://www.mathworks.com/help/toolbox/gads/bsc5_cj.html>>
Hope this helps!
Best regards,
Paul