|
Algorithm 1 Food Digestion Algorithm |
|
Output: Population size N; Dimension D; Maximum number of iterations ; Lower boundary ; Upper boundary ; |
|
Input: Global optimal position , Global optimal fitness value ; |
-
1:
Initialize populations and calculate their fitness values;
-
2:
Record the optimum global position ;
-
3:
Initialize the parameters ;
-
4:
while
do
-
5:
Backup the initialized populations and their fitness values;
-
6:
Calculate the values of , , and according to Equations ( 1), ( 9) and ( 14);
-
7:
Calculate the value of R according to Equation ( 8);
-
8:
Calculate the values of and ;
-
9:
for do
-
10:
Calculate the values of and S according to Equations ( 3) and ( 5);
-
11:
if then
-
12:
Calculate the values of and V according to Equations ( 2) and ( 4);
-
13:
Update the particle according to Equation ( 6);
-
14:
Calculate the fitness value of the particle;
-
15:
if then
-
16:
Find the minimum fitness value in the oral cavity ;
-
17:
Update the particle according to Equation ( 13);
-
18:
end if
-
19:
end if
-
20:
if and then
-
21:
Calculate the values of , V, and according to Equations ( 4), ( 10) and ( 12);
-
22:
Update the particle according to Equation ( 11);
-
23:
Calculate the fitness value of the particle;
-
24:
if then
-
25:
Find the minimum fitness value in the stomach ;
-
26:
Update the particle according to Equation ( 17);
-
27:
end if
-
28:
end if
-
29:
if then
-
30:
Calculate the values of and V according to Equations ( 15) and ( 4);
-
31:
Update the particle according to Equation ( 16);
-
32:
Calculate the fitness value of the particle;
-
33:
end if
-
34:
end for
-
35:
for do
-
36:
if The historical optimal fitness value of the particle < Updated particle optimal fitness value then
-
37:
Replace the updated particle position and fitness value with the particles’ optimal historical position and fitness value;
-
38:
end if
-
39:
end for
-
40:
Backup of the particle’s historical optimal position and its fitness value;
-
41:
Update optimal global position and optimal global value;
-
42:
;
-
43:
end while
|