Algorithm 4 Crowding_distance function. |
Require:P {Population} Require:
P {Population} Require:
I {Individual} Require:
l {Number of objectives}
-
1:
for to l
do
-
2:
-
3:
-
4:
value of the jth objective for the individual higher adjacent in the jth objective to the individual I
-
5:
value of the jth objective for the individual lower adjacent in the jth objective to the individual I
-
6:
end for
-
7:
for to l
do
-
8:
if
or
then
-
9:
return ∞
-
10:
end if
-
11:
end for
-
12:
-
13:
for to l
do
-
14:
-
15:
end for
-
16:
return
|