Function optimization and engineering optimization application based on Artificial Ecosystem Optimization Algorithm

1, Theoretical basis

1. Artificial ecosystem optimization algorithm

Artificial ecosystem based optimization (AEO) algorithm is a new meta heuristic optimization algorithm proposed by Zhao in 2019 by simulating the energy flow in the earth ecosystem. The algorithm simulates the production, consumption and decomposition behavior in the ecosystem through production operator, consumption operator and decomposition operator to solve the optimization problem. The production operator aims to strengthen the balance between exploration and development of AEO algorithm; Consumption operator is used to improve the exploration ability of AEO algorithm; The decomposition operator aims to improve the development performance of AEO algorithm. Compared with the traditional swarm intelligence algorithm, AEO algorithm not only has simple implementation, does not need to adjust any other parameters except the population size and the maximum number of iterations, but also has better optimization accuracy and global search ability.
AEO algorithm follows the following three criteria:
① Ecosystem as a population includes three kinds of organisms: producer, consumer and decomposer, and only one individual in the population acts as producer and decomposer, and the other individuals act as consumers;
② Each individual has the same probability of being selected as a carnivore, herbivore or omnivore;
③ The energy level of each individual in the population is evaluated by the fitness value, which is sorted in descending order. The larger the fitness value, the higher the energy level of the minimization problem.
The mathematical description of AEO algorithm is as follows:

(1) Producer

In ecosystems, producers can use CO2, water and sunlight and nutrients provided by decomposers to produce food energy. In the AEO algorithm, the producer (the worst individual) in the population is updated by the upper and lower limits of the search space and the decomposer (the best individual). The updated individual will guide other individuals in the population to search different regions. The mathematical model for simulating producer behavior is as follows: x 1 ( t + 1 ) = ( 1 − a ) x n ( t ) + a x rand ( t ) (1) x_1(t+1)=(1-a)x_n(t)+ax_{\text{rand}}(t)\tag{1} x1​(t+1)=(1−a)xn​(t)+axrand​(t)(1) a = ( 1 − t / T ) r 1 (2) a=(1-t/T)r_1\tag{2} a=(1−t/T)r1​(2) x rand = r ( U − L ) + L (3) x_{\text{rand}}=\boldsymbol r(U-L)+L\tag{3} xrand = r(U − L)+L(3), where, n n n is the population size, T T T is the maximum number of iterations, L L L and U U U is the lower limit and upper limit of the search space respectively, r 1 r_1 r1 ﹐ yes [ 0 , 1 ] [0,1] Random number between [0,1], r \boldsymbol r r is [ 0 , 1 ] [0,1] Random vectors in the range of [0,1], a a A is a linear weight coefficient, x rand x_{\text{rand}} xrand , is the location of randomly generated individuals in the search space. In equation (1), the weight coefficient is used to linearly drift the individual from the randomly generated position to the position of the best individual with the increase of the number of iterations. As shown in equation (1), in the early iteration, x 1 ( t + 1 ) x_1(t+1) x1 (t+1) can guide other individuals to explore widely in the search space; In subsequent iterations, x 1 ( t + 1 ) x_1(t+1) x1 (t+1) can guide other individuals in x n x_n xn# development in nearby areas.

(2) Consumer

After the producer provides food energy, each consumer can randomly select consumers or producers with lower energy level or both to obtain food energy. If consumers are randomly selected as herbivores, they only feed on producers; If consumers are randomly selected as carnivores, they can only randomly select consumers with higher energy level as food; If consumers are randomly selected as omnivores, it can choose consumers and producers with high energy level at the same time. We propose a simple, parameterless random walk with Levy flight characteristics, which is called consumption factor. It is defined as follows: C = 1 2 v 1 ∣ v 2 ∣ (4) C=\frac12\frac{v_1}{|v_2|}\tag{4} C=21​∣v2​∣v1​​(4) v 1 ∼ N ( 0 , 1 ) , v 2 ∼ N ( 0 , 1 ) (5) v_1\sim N(0,1),\quad v_2\sim N(0,1)\tag{5} v1 ∼ N(0,1),v2 ∼ N(0,1)(5), where, N ( 0 , 1 ) N(0,1) N(0,1) is the standard normal distribution.
Herbivore: if the consumer is randomly selected as a herbivore, it only eats the producer. In order to mathematically model this consumption behavior of herbivores, the following equation is as follows: x i ( t + 1 ) = x i ( t ) + C ( x i ( t ) − x 1 ( t ) ) , i ∈ [ 2 , ⋯   , n ] (6) x_i(t+1)=x_i(t)+C(x_i(t)-x_1(t)),\quad i\in[2,\cdots,n]\tag{6} xi (t+1)=xi (t)+C(xi (t) − x1 (t)),i ∈ [2,..., n](6) carnivore: if a consumer is randomly selected as a carnivore, it can only randomly eat a consumer with a higher energy level. The mathematical model of carnivore consumption behavior is as follows: { x i ( t + 1 ) = x i ( t ) + C ⋅ ( x i ( t ) − x j ( t ) ) , i ∈ [ 3 , ⋯   , n ] j = randi ( [ 2     i − 1 ] ) (7) \begin{dcases}x_i(t+1)=x_i(t)+C\cdot(x_i(t)-x_j(t)),\quad i\in[3,\cdots,n]\\j=\text{randi}([2\,\,\,i-1])\end{dcases}\tag{7} {xi (t+1)=xi (t)+C ⋅ (xi (t) − xj (t)),i ∈ [3,..., n]j=randi([2i − 1]) (7) omnivore: if a consumer is randomly selected as an omnivore, it can randomly eat a consumer with higher energy level and a producer. The mathematical model of omnivore consumption behavior can be expressed as: { x i ( t + 1 ) = x i ( t ) + C ⋅ ( r 2 ⋅ ( x i ( t ) − x 1 ( t ) ) + ( 1 − r 2 ) ⋅ ( x i ( t ) − x j ( t ) ) ) , i ∈ [ 3 , ⋯   , n ] j = randi ( [ 2     i − 1 ] ) (8) \begin{dcases}x_i(t+1)=x_i(t)+C\cdot(r_2\cdot(x_i(t)-x_1(t))+(1-r_2)\cdot(x_i(t)-x_j(t))),\quad i\in[3,\cdots,n]\\j=\text{randi}([2\,\,\,i-1])\end{dcases}\tag{8} {xi (t+1)=xi (t)+C ⋅ (r2 ⋅ (xi (t) − x1 (t))+(1 − r2) ⋅ (xi (t) − xj (t))),i ∈ [3,..., n]j=randi([2i − 1]) (8) where, r 2 r_2 r2 is [ 0 , 1 ] [0,1] Random number between [0,1].

(3) Decomposer

In terms of ecosystem function, decomposition is a very important process, which provides necessary nutrients for producers. In order to improve the development performance of the algorithm, AEO algorithm allows the next position of each individual to spread around the best individual (decomposer) and adjust the decomposition factor D D D and weight coefficient e e e, h h h to update the second in the group i i The spatial location of i consumers. The mathematical model to simulate the decomposition behavior is: x i ( t + 1 ) = x n ( t ) + D ⋅ ( e ⋅ x n ( t ) − h ⋅ x i ( t ) ) , i = 1 , ⋯   , n (9) x_i(t+1)=x_n(t)+D\cdot(e\cdot x_n(t)-h\cdot x_i(t)),\quad i=1,\cdots,n\tag{9} xi​(t+1)=xn​(t)+D⋅(e⋅xn​(t)−h⋅xi​(t)),i=1,⋯,n(9) D = 3 u , u ∼ N ( 0 , 1 ) (10) D=3u,\quad u\sim N(0,1)\tag{10} D=3u,u∼N(0,1)(10) e = r 3 ⋅ randi ( [ 1    2 ] ) − 1 (11) e=r_3\cdot\text{randi}([1\,\,2])-1\tag{11} e=r3​⋅randi([12])−1(11) h = 2 ⋅ r 3 − 1 h=2\cdot r_3-1 h=2 ⋅ r3 − 1, where, r 3 r_3 r3 is [ 0 , 1 ] [0,1] Random number between [0,1].

2. AEO algorithm pseudo code

The AEO algorithm starts optimization by randomly generating a population. In each iteration, the first search individual updates its position according to equation (1). For other individuals, select equation (6), (7) or (8) with the same probability in the equation to update their position. If the new solution has a better fitness value, then accept it. Then, each individual updates its position according to equation (9) Update its location. If the individual exceeds the lower or upper limit during the update process, it will be randomly generated in the search space. All updates are performed interactively until the AEO algorithm meets the termination conditions. Finally, the solution of the best individual found so far is returned. The pseudo code of the AEO algorithm is shown in Figure 1.

Figure 1 pseudo code of AEO algorithm

2, Simulation experiment and analysis

1. Function test and numerical analysis

AEO is compared with PSO, DE, CS and GSA. Taking F1, F2 (unimodal function / 30 dimensional), F10, F11 (multimodal function / 30 dimensional), F18 and F19 (fixed dimensional multimodal function / 2-dimensional and 3-dimensional) in literature [1] as examples, the population size is set to 50, the maximum number of iterations is set to 1000, and each algorithm operates 30 times independently. The results are shown as follows:

Function: F1
PSO: Worst value: 1.6048e-10,optimal value:2.9637e-14,average value:1.0426e-11,standard deviation:2.884e-11,Rank sum test:1.2118e-12
DE: Worst value: 1.2606e-10,optimal value:5.8922e-12,average value:3.6305e-11,standard deviation:2.5936e-11,Rank sum test:1.2118e-12
CS: Worst value: 0.029463,optimal value:0.0036154,average value:0.0097377,standard deviation:0.0052154,Rank sum test:1.2118e-12
GSA: Worst value: 3.48e-17,optimal value:1.2564e-17,average value:2.1105e-17,standard deviation:5.8152e-18,Rank sum test:1.2118e-12
AEO: Worst value: 0,optimal value:0,average value:0,standard deviation:0,Rank sum test:NaN
 Function: F2
PSO: Worst value: 40,optimal value:5.7179e-07,average value:5.0001,standard deviation:9.3771,Rank sum test:3.0199e-11
DE: Worst value: 7.6598e-07,optimal value:2.555e-07,average value:4.5027e-07,standard deviation:1.3424e-07,Rank sum test:3.0199e-11
CS: Worst value: 2.3372,optimal value:0.56391,average value:1.3111,standard deviation:0.46189,Rank sum test:3.0199e-11
GSA: Worst value: 3.1909e-08,optimal value:1.7309e-08,average value:2.4202e-08,standard deviation:3.921e-09,Rank sum test:3.0199e-11
AEO: Worst value: 1.3049e-185,optimal value:1.2131e-201,average value:4.3595e-187,standard deviation:0,Rank sum test:1
 Function: F10
PSO: Worst value: 3.6728e-05,optimal value:1.1254e-07,average value:4.2455e-06,standard deviation:8.6619e-06,Rank sum test:1.2118e-12
DE: Worst value: 3.3022e-06,optimal value:9.2064e-07,average value:1.814e-06,standard deviation:5.3098e-07,Rank sum test:1.2118e-12
CS: Worst value: 6.9994,optimal value:1.8959,average value:3.8014,standard deviation:1.2914,Rank sum test:1.2118e-12
GSA: Worst value: 4.9166e-09,optimal value:2.4856e-09,average value:3.504e-09,standard deviation:5.3909e-10,Rank sum test:1.2118e-12
AEO: Worst value: 8.8818e-16,optimal value:8.8818e-16,average value:8.8818e-16,standard deviation:0,Rank sum test:NaN
 Function: F11
PSO: Worst value: 0.036894,optimal value:2.1649e-14,average value:0.0093535,standard deviation:0.011991,Rank sum test:1.2118e-12
DE: Worst value: 3.7433e-08,optimal value:3.5794e-11,average value:1.8981e-09,standard deviation:6.9345e-09,Rank sum test:1.2118e-12
CS: Worst value: 0.15639,optimal value:0.034367,average value:0.088308,standard deviation:0.036606,Rank sum test:1.2118e-12
GSA: Worst value: 8.1054,optimal value:1.5539,average value:4.2755,standard deviation:1.6783,Rank sum test:1.2118e-12
AEO: Worst value: 0,optimal value:0,average value:0,standard deviation:0,Rank sum test:NaN
 Function: F18
PSO: Worst value: 3,optimal value:3,average value:3,standard deviation:1.6012e-15,Rank sum test:0.31744
DE: Worst value: 3,optimal value:3,average value:3,standard deviation:1.355e-15,Rank sum test:0.025701
CS: Worst value: 3,optimal value:3,average value:3,standard deviation:1.8587e-15,Rank sum test:0.027704
GSA: Worst value: 3,optimal value:3,average value:3,standard deviation:2.2928e-15,Rank sum test:1.7076e-09
AEO: Worst value: 3,optimal value:3,average value:3,standard deviation:1.2881e-15,Rank sum test:1
 Function: F19
PSO: Worst value: -3.8549,optimal value:-3.8628,average value:-3.8617,standard deviation:0.002725,Rank sum test:0.041774
DE: Worst value: -3.8628,optimal value:-3.8628,average value:-3.8628,standard deviation:2.7101e-15,Rank sum test:NaN
CS: Worst value: -3.8628,optimal value:-3.8628,average value:-3.8628,standard deviation:2.7101e-15,Rank sum test:NaN
GSA: Worst value: -2.933,optimal value:-3.8628,average value:-3.5833,standard deviation:0.25471,Rank sum test:5.73e-11
AEO: Worst value: -3.8628,optimal value:-3.8628,average value:-3.8628,standard deviation:2.7101e-15,Rank sum test:NaN

The results show that the optimization performance of AEO algorithm is better than that of other optimization algorithms in the literature.

2. Solving the optimization problem of pressure vessel design

For details of pressure vessel design, please refer to here . In the simulation experiment, the running times, population size and maximum iteration times of the five algorithms are consistent, i.e N = 50 , M a x _ i t e r = 500 N=50,Max\_iter=500 N=50,Max_iter=500, each algorithm runs independently for 30 times. The results are as follows:

PSO: Worst value: 7535.0141,optimal value:4527.268,average value:5092.9523,standard deviation:643.4246,Rank sum test:8.543e-08
DE: Worst value: 5907.5692,optimal value:4871.7516,average value:5347.1045,standard deviation:287.6097,Rank sum test:5.2039e-12
CS: Worst value: 4527.2741,optimal value:4527.2681,average value:4527.2691,standard deviation:0.0013532,Rank sum test:5.2039e-12
GSA: Worst value: 6628.6711,optimal value:4867.8387,average value:5159.9656,standard deviation:328.5764,Rank sum test:5.2039e-12
AEO: Worst value: 4527.268,optimal value:4527.268,average value:4527.268,standard deviation:5.6653e-09,Rank sum test:1

3. WSN coverage optimization

This paper adopts 0 / 1 overlay model . Set the monitoring area as 50 m × 50 m 50 m×50 m 50m × 50m two-dimensional plane, number of sensor nodes N = 35 N=35 N=35, its sensing radius is R s = 5 m R_s=5m Rs = 5m, communication radius R c = 10 m R_c=10m Rc = 10m, 500 iterations. The evolution curves of initial deployment, AEO optimized coverage and AEO algorithm coverage are shown in the figure below.
The node locations and corresponding coverage of initial deployment and final deployment are respectively:

Initial position:
17.3063     24.0722
2.4797     42.4558
30.993     21.1578
10.3083     4.8748
34.7008     38.3494
45.6865     1.8292
25.3857     7.5721
30.0723     37.1601
21.8316     25.5546
48.5439     23.0681
18.2439     33.4251
20.8248     2.1981
38.3261     14.6839
31.2193     42.2345
23.9524     11.3774
18.543     4.9386
15.6759     7.3145
39.7729     9.6635
43.8758     33.9036
26.6877     44.7158
1.3646     47.6315
0.85157     19.007
8.7931     31.5573
2.1559     16.0309
35.453     25.5879
30.1878     20.8499
22.0685     49.8326
41.5909     45.4887
21.4667     16.7075
13.2908     38.154
9.6852     19.5459
46.9286     29.5455
10.1575     35.9321
41.3159     21.5517
28.1104     0.47979
 Initial coverage: 0.69358
 Optimal location:
23.1227     4.0828
17.8018     5.6011
39.5425     40.9766
3.0781     11.4631
7.3653     45.8083
16.7304     30.3155
46.3213     13.6972
19.748     21.2582
42.3955     47.9306
37.4827     31.5416
2.692     35.6838
37.7317     12.6031
29.5981     45.7391
24.5219     30.2482
8.4353     2.9343
45.3393     4.2828
48.7897     21.0165
20.0373     39.1088
42.146     22.5814
47.5344     40.107
30.179     37.2758
17.387     45.7307
28.0873     11.6437
20.5337     47.017
34.3311     18.3165
46.7132     30.6553
26.165     20.2073
34.464     4.9654
11.1573     11.3542
32.6236     27.307
18.866     15.4744
7.9963     29.0111
10.7126     38.4366
2.6424     21.3359
12.1582     21.493
 Optimal coverage: 0.89773

The experimental results show that AEO can effectively improve the coverage of WSN and make the node distribution more uniform.

3, References

[1] Weiguo Zhao, Liying Wang, Zhenxing Zhang. Artificial ecosystem-based optimization: a novel nature-inspired meta-heuristic algorithm[J]. Neural Computing and Applications, 2020, 32: 9383-9425.
[2] Cui Dongwen, Bao Yanfei Combined growth water demand prediction model based on Artificial Ecosystem Optimization Algorithm [J] . water resources protection, 2020, 36 (6): 122-130

Tags: MATLAB

Posted on Mon, 29 Nov 2021 01:25:12 -0500 by andrew_U