GEATbx: | Main page Tutorial Algorithms M-functions Parameter/Options Example functions www.geatbx.com |
One important step in deciding which evolutionary algorithm is to use is a close look to the format/representation of your variables. A second step is the direct decision on which format the evolutionary algorithm should work. The representation determines the overall algorithm, that means, the used evolutionary operators.
In the GEATbx different representations are directly supported:
When working with different representations, the toolbox provides functions for conversion between these representations:
Let's give an example: The variables of the objective function are in real value representation. Now it could be chosen between binary and real value representation for the evolutionary algorithm. Recommended is the real value representation (tbx3real). It works much quicker than the binary one. However, if the decision comes to use the binary values inside the evolutionary algorithm, the population is initialized as if the variables would be binary (initbp), the evolutionary operators (mutbin and, for instance, recsp) are applied, and before the evaluation of the objective function the binary values are converted to real values (bin2real). The toolbox function tbx3sga defines all these options.
One more example. In this case the variables are in integer representation. The evolutionary algorithm can work on integer values (mutint and recdis) or with binary values and convert them to integer (bin2int) before evaluation of the objective function.
The use of a representation and necessary conversion is controlled by the parameter VariableRepresentation.
Tab. 4-1: Combinations of variable representation and conversion
EA works on |
variable representation |
conversion | |
0 |
real |
real |
- |
1 |
integer |
integer |
- |
2 |
binary |
real |
bin2real |
3 |
binary |
integer |
bin2int |
4 |
binary |
binary |
- |
In the end it can be stated:
Matlab Examples:
Real --- Real:
geamain2('objfun1')
Binary --- Binary:
objfun = 'objone1'; GeaOpt = tbx3bin; VLUB = geaobjpara(objfun, 1); geamain2(objfun, GeaOpt, VLUB)
GEATbx: | Main page Tutorial Algorithms M-functions Parameter/Options Example functions www.geatbx.com |