遗传算法GUI中的变量范围设置问题。

实际运算中常常需要限定我们所求的变量范围。比如有两个变量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

 채택된 답변

N/A
N/A 2022년 11월 16일

0 개 추천

根据Help中的的说明
Note:  ga does not enforce bounds to be satisfied when the PopulationType option is 'bitString' or 'custom'.
估计你就是这个问题。
把 population type 设置成默认的 Double vector吧。

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 启动和关闭에 대해 자세히 알아보기

태그

질문:

N/A
2022년 11월 16일

답변:

N/A
2022년 11월 16일

Community Treasure Hunt

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

Start Hunting!