how can i make ga code to set a specific values to a parameter
5 ビュー (過去 30 日間)
古いコメントを表示
hallo, i am making optimization by genetic algorithm (ga)...i know that when you run the code, random values for each parameter are assumed..my question: if there is a parameter i want the code to assume a specific values to it at each iter?
0 件のコメント
回答 (2 件)
Star Strider
2018 年 11 月 25 日
I am not certain what you are asking.
If you have a parameter you want not to vary (you already know the optimum value), fix it in your fitness function, and optimise the other parameters you want to estimate. This is likely more efficient than fixing it with the ‘lb’ and ‘ub’ arguments, alghtough if you want it to vary only within a narrow range, you can use those arguments to constrain it.
2 件のコメント
Star Strider
2018 年 11 月 27 日
My pleasure.
Set ‘x(1)’, and whatever other parameters you want not to vary, to constant values in your fitness function, and do not include them in the parameters you want to optimise.
Alan Weiss
2018 年 11 月 27 日
It sounds to me as if you have a discrete set of values to choose from. Use the technique of Mixed Integer Optimization, as shown in the example Solving a Mixed Integer Engineering Design Problem Using the Genetic Algorithm.
Alan Weiss
MATLAB mathematical toolbox documentation
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Genetic Algorithm についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!