Information Technology Reference
In-Depth Information
In[30]:= TRVIndex MapIndexed SelectOther 2 1 &, Population
7, 9, 8 , 5, 1, 7 , 6, 2, 10 , 10,7,6 ,
10,6,4 , 8, 7, 5 , 1, 2, 4 , 1, 7, 9 , 5, 3, 2 , 2, 9, 8
Out[30]=
Fig. 7.16. TVR Index of pointers
In[31]:= TRV Population 1 & TRVIndex
106.047, 317.752, 402.607 , 464.407, 507.525, 502.251 ,
157.266, 119.503, 163.852 , 41.6243, 236.027, 128.204 ,
534.695, 442.422, 188.47 , 106.047, 317.752, 402.607 ,
161.461, 335.943, 355.91 , 191.21, 194.845, 437.931 ,
62.8734, 160.401, 149.99 , 62.8734, 160.401, 149.99 ,
106.047, 317.752, 402.607 , 161.461, 335.943, 355.91 ,
62.8734, 160.401, 149.99 , 161.461, 335.943, 355.91 ,
208.07, 214.324, 244.138 , 157.266, 119.503, 163.852 ,
106.047, 317.752, 402.607 , 41.6243, 236.027, 128.204 ,
534.695, 442.422, 188.47 , 191.21, 194.845, 437.931 ,
208.07, 214.324, 244.138 , 534.695, 442.422, 188.47 ,
106.047, 317.752, 402.607 , 464.407, 507.525, 502.251 ,
41.6243, 236.027, 128.204 , 70.135, 127.976, 99.3825 ,
191.21, 194.845, 437.931 , 191.21, 194.845, 437.931 ,
464.407, 507.525, 502.251 , 157.266, 119.503, 163.852
Out[31]=
Fig. 7.17. TVR Index of pointers for entire population
triplets) is created. Fig 7.16 shows the varible TRVIndex (trial vector index) created
from the MapIndexed function.
To unfold the code, the operator / @ (function Map ) is used, which takes all the
arguments of pointers shown in Fig 7.16 and creates an entire array of pointers for the
population, given in Fig 7.17.
The result of Fig 7.17 is a list of physically selected individuals (three for each parent).
Application of mutation principle and all DE arithmetic operations on TRV list is straight
forward. It is accomplished by the means of the operator / @ which in this case applies
the arithmetic operation from the left to the elements of the TRV list. Entity #1[[X , 2]]
in the arithmetic formula F
#1[[2 , 2]]) +#1[[3 , 2]] represents X th individual
from the selected triplets in TRV. The Noisy vector is thus calculated like in Fig 7.18.
(#1[[1 , 2]]
Noisy F 1 1, 2 1 2, 2 1 3, 2 & TRV
779.725, 560.034 , 152.636, 354.393 , 273.28, 485.082 ,
718.466, 558.003 , 73.8901, 160.582 , 77.4278, 324.963 ,
295.49, 443.706 , 407.789, 673.56 , 108.404, 620. , 369.647, 588.294
Fig. 7.18. Noisy Vector
The output of Fig 7.18 is a set of Noisy vectors (cardinality of NP), which is con-
sequently used to generate trial vectors
individuals. Parameter selection from the
parent or noisy vector is done by the condition If[Cr < Random[] ... ]. Flatten is only
a cosmetic command which removes redundant brackets, generated by the command
Table . In the standard programming approach the command Fo r would be used. To
Search WWH ::




Custom Search