Anyone knows whether is possible to perfome an optimization with Global Search using only integer inputs?
2 次查看(过去 30 天)
显示 更早的评论
I'd like to perform an optimization using Global Search in Matlab but I dont know how to restrict inputs as integer like Intcon in Genetic Algorithm.
[x,fval,exitflag] = ga(fitnessfcn,nvars,A,b,[],[],... lb,ub,nonlcon, IntCon,options)
The idea is to execute another optimization technique with Global Search but limiting inputs only to integer.
Thanks in advance
0 个评论
采纳的回答
Alan Weiss
2015-12-3
The answer is no. GlobalSearch uses fmincon as its local optimizer, and there is no way to restrict fmincon to integer values. Sorry.
Alan Weiss
MATLAB mathematical toolbox documentation
2 个评论
Anusha Lamichhane
2022-3-8
Is there any way to make the result variable x in either 0 or 1 in global search?
Torsten
2022-3-8
You can make two runs - one with x=0 and one with x=1 - and see which gives the better result.
更多回答(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!