Genetic Algorithm and Local Optimization Options

5 ビュー (過去 30 日間)
Marco Marchese
Marco Marchese 2018 年 5 月 7 日
コメント済み: Marco Marchese 2018 年 5 月 10 日
Hi Everybody,
I have an issue with optimization procedure. I got a function which requires the optimization of 19 free variables to fit a wide range of experimental data. As it is, I am running first a global optimization based on the genetic algorithm application to avoid local minima, followed by a local optimization of such nvars (and using the output of the g.a. as initial guess of my fmincon local optimization).
I would like to check the evolution of my 19 variables within the optimization, separately one from the other. As it is built in MatLab I can only acces the final value of my Objective Function on a plot, but non for specific nvar. I could somehow do this with previous Matlab requests/answers, but as it is these methods created 1 excel file every iteration for every variable. In my case this means 19variables*(>)10000iteration=non feasible solution.
Can you please help me solve this problem?
Thank you very much

採用された回答

Alan Weiss
Alan Weiss 2018 年 5 月 7 日
I'm not sure exactly what would satisfy you. Do you want 19 plot functions to run, one for each variable? Or maybe you'd like 19 text files of values? Whatever you want, you can get it using a custom plot function or custom output function for the ga portion of your procedure. For the fmincon portion, you'll need custom plot or output functions in a different syntax.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
  5 件のコメント
Alan Weiss
Alan Weiss 2018 年 5 月 8 日
Oh, you just want the best member of the population at each iteration, not the entire population at each iteration? Then I think that you need to choose the row in the population matrix that has largest score. Something like
[~,thebest] = max(state.Score);
thepop = state.Population(thebest,:);
history = [history;thepop];
If I have it wrong (because I am typing fast) then use min instead of max.
Alan Weiss
MATLAB mathematical toolbox documentation
Marco Marchese
Marco Marchese 2018 年 5 月 10 日
Thank you a lot!
It is now working perfectly!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by