|
Algorithm 3 Evolution Algorithm |
-
Input:
Population size , parent solutions , crossover probability , and mutation probability .
-
Output:
Offspring solutions: .
-
1:
Randomly divide into two populations: and ;
-
2:
;
-
3:
Sort the solutions in an ascending order based on their ;
-
4:
Compose of the first 50% of the populations and the last 50% of the populations ;
-
5:
for each pair of solutions do
-
6:
if A randomly generated value then
-
7:
Each pair of genes in and is randomly assigned a value of 0 or 1, thus constituting the sequence M;
-
8:
for each in do
-
9:
if corresponds to a value of 1 in the sequence M then
-
10:
Replace the values of and to obtain a new and ;
-
11:
end if
-
12:
end for
-
13:
end if
-
14:
end for
-
15:
Set ;
-
16:
for each solution in do
-
17:
for each weight parameter y in do
-
18:
if A randomly generated value then
-
19:
Update y value to a value N(−1,1),get ;
-
20:
end if
-
21:
end for
-
22:
end for
-
23:
;
-
24:
The populations from with the highest are selected as ;
|