Do i need to convert the real values of the variables into binary while using GA toolbox?

2 views (last 30 days)
I am using Matlab version 7.8.0.347 (R2009a). The standard procedure for Genetic algorithm is to convert the design variables into binary strings, but can i use the real values of the design variables while using GA toolbox.

Answers (1)

Walter Roberson
Walter Roberson on 22 Jan 2016
If you are using ga() from the Global Optimization Toolbox, then even in R2009a it did not require you to convert design variables into binary strings. Just do not use optimset() to set PopulationType to 'bitstring' or 'custom' and the design variables will be taken as continuous values. See http://www.mathworks.com/help/releases/R2009a/toolbox/gads/index.html?/help/releases/R2009a/toolbox/gads/ga.html

Community Treasure Hunt

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

Start Hunting!