Restricting GA to consider only integer values for the output
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi all,
I have MATLAB Optimization Toolbox R2009b and I know by using "IntCon" I can restrict the GA solver to give me the only integer values for the outputs.
However, "IntCon" does not work in older version of MATLAB and at currently it is not possible for me to upgrade it to a advanced version.
I have tried using e.g floor () inside my fitness function however the outputs are same after running GA.
I would like to know if anybody came across such a problem??
regs, M.
0 Kommentare
Antworten (1)
Alan Weiss
am 9 Jul. 2012
To attempt integer programming in GA using versions of MATLAB prior to R2011b, take a look at this technical solution.
Alan Weiss
MATLAB mathematical toolbox documentation
2 Kommentare
Tim Kühlthau
am 17 Okt. 2022
Hi Alan,
it seems that this link is not working anymore. (Which could be expected after 10 years.)
Do you still know what could be a solution to the problem in this post?
I do have the same problem. One of my variables in the GA has to be an integer in Matlab 2009.
Best regards
Tim
John D'Errico
am 17 Okt. 2022
Simple. Just run it multiple times, using every possible integer value for that variable, where each solve has now only n-1 variables. Choose the best solution overall, thus giving you the optimal integer solution, as well as the other parameters.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!