GA 関数で整数計画問題を解くことはできますか?
5 views (last 30 days)
Show older comments
MathWorks Support Team
on 25 Jan 2013
Edited: MathWorks Support Team
on 30 Sep 2020
目的変数を整数として扱って最適化を行いたいのですが、GA 関数を使用して、整数計画問題や、混合整数計画問題を解く方法を教えてください。
Accepted Answer
MathWorks Support Team
on 30 Sep 2020
Edited: MathWorks Support Team
on 30 Sep 2020
Release 2011b (R2011b) にて、機能拡張されました。それ以前のリリースに関しては、以下の記述をご確認ください。
GA 関数を使用して、整数計画問題を解くには、母集団の初期化関数や、突然変異関数などを、出力が整数となるようにユーザ定義する必要があります。さらに、それらの関数を以下のように GAOPTIMSET 関数を使用して、オプション構造体として、GA関数の最適化ソルバに引き渡す必要があります。
options = gaoptimset('CreationFcn',@your_creationfcn,...
'MutationFcn',@your_mutationfcn);
[x,fval] = ga(fitnessFcn,nVars,options);
整数計画問題の例として、gainteger_demo.m がありますので、ご覧下さい。
また、Global Optimization Toolbox(旧Genetic and Algorithm and Direct Serach Toolbox)のデモにも関連するものがあります。
以下のコマンド、もしくは URL よりご覧いただけます。
>> web([docroot,'/gads/examples/custom-data-type-optimization-using-the-genetic-algorithm.html'])
0 Comments
More Answers (0)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!