both real and integer variables ga optimization
6 次查看(过去 30 天)
显示 更早的评论
How can i perform an optimization with the gamultiobj function using both real and integer variables ?
0 个评论
采纳的回答
Shashank Prasanna
2013-2-8
Andrea, integers are real, however I think you are referring to solving a mixed integer problem. Here is an example of how it can be done using GA:
4 个评论
Walter Roberson
2013-2-10
R2011a did not support constraining to integer.
I don't think you can (even with R2012b) constrain to arbitrary sets of values. However, you can (in versions that support it) constrain to integer values, with a range of 1 to the number of different values, and then in the function you provide, use that variable as an index into the table of actual values.
更多回答(1 个)
Alan Weiss
2013-2-11
As Benji said, you cannot perform mixed integer optimization automatically in GA unless you have MATLAB R2011b or later. However, you can write custom population functions for this purpose; see this explanation. You might also want to see this example on mapping integer variables to a finite set of choices.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
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!