遗传算法GUI中的变量范围设置问题。
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
实际运算中常常需要限定我们所求的变量范围。比如有两个变量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 Kommentare
Akzeptierte Antwort
N/A
am 16 Nov. 2022
根据Help中的的说明
Note: ga does not enforce bounds to be satisfied when the PopulationType option is 'bitString' or 'custom'.
估计你就是这个问题。
把 population type 设置成默认的 Double vector吧。
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!