Restricting GA to consider only integer values for the output

4 views (last 30 days)
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.

Answers (1)

Alan Weiss
Alan Weiss on 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 Comments
Tim Kühlthau
Tim Kühlthau on 17 Oct 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
John D'Errico on 17 Oct 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.

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!