遗传算法GUI中的变量范围设置问题。
10 ビュー (過去 30 日間)
古いコメントを表示
实际运算中常常需要限定我们所求的变量范围。比如有两个变量x1,x2, 0<x1<100, 10<x2<20;
这时如何在遗传算法GUI中进行设置?
我试了几种方法:
第一种: LOWER[0;100] UPPER[10;20]
第二种:LOWER[0 100] UPPER[10 20],分号变空格。都不行,都还有负值出现。
求大神指导下
问题已经解决,把经验分享给大家。
首先:LOWER[0;100] UPPER[10;20] 中用分号隔开,注意输入法用英文的。
第二:populion style 选择 Double vector第三:mutation函数选择: 默认的那个,不要选择GUASSION
0 件のコメント
採用された回答
N/A
2022 年 11 月 16 日
根据Help中的的说明
Note: ga does not enforce bounds to be satisfied when the PopulationType option is 'bitString' or 'custom'.
估计你就是这个问题。
把 population type 设置成默认的 Double vector吧。
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!