Information Technology Reference
In-Depth Information
3.4.1.2 Back Mutation
Back mutation is the opposite of front mutation, and indexes the repairment from the
rear of the replicated array as given in Fig 3.5.
Array Solution , ViolateVal , MissingVal ;
for (int i = sizeo f ViolateVal ; i > 0; i ++)
Solution [ ViolateVal [ i ]] = Random [ MissingVal ] ;
}
Fig. 3.5. Pseudocode for back mutation
Illustration :
In order to understand back mutation assume the same in-feasible solution as in the
previous example: x =
.
The first step is to isolate all repetitive values in the solution. These are highlighted
in the following array: x =
{
3 , 4 , 2 , 1 , 3 , 5 , 6 , 7 , 10 , 5
}
{
3 , 4 , 2 , 1 , 3 , 5 , 6 , 7 , 10 , 5
}
. As shown the values 3 and 5 are
repeated in the solution.
All last occurring values are now set as default: x =
{
3 , 4 , 2 , 1 , 3 , 5 , 6 , 7 , 10 , 5
}
.So
now only two positions are replicated, index 1 and 6 as given: x =
{ 1 , 4 , 2 , 1 , 3 , 6 , 6 ,
7 , 10 , 5
.
An array of missing values is now generated as MV =
}
{
8 , 9
}
, since values 8 and 9
are missing from the solution.
An insertion array is now randomly generated, which specifies the position of the
insertion of each value: IA =
. Since only two values were missing so only two
random numbers are generated. In this respect, the first value 1 in IA , outlines that
the value pointed by index 1 in MV which is 8 is to be placed in the first indexed in-
feasible solution and likewise for the other missing value given as: x =
{
2 , 1
}
{ 1 , 4 , 2 , 1 , 3 , 2 ,
6 , 7 , 10 , 5
}
.
3.4.1.3 Random Mutation
The most complex repairment schema is the random mutation routine. Each value is
selected randomly from the replicated array and replaced randomly from the missing
value array as given in Fig 3.6.
Array Solution , ViolateVal , MissingVal ;
for (int i = sizeo f ViolateVal ; i > 0; i ++)
Solution ViolateVal Random [ i ] = MissingVal Random [ i ] ;
ViolateVal delete
ViolateVal Random [ i ] ;
MissingVal delete
MissingVal Random [ i ] ;
}
Fig. 3.6. Pseudocode for random mutation
Search WWH ::




Custom Search