Skip to main content

Improved fruit fly algorithm on structural optimization

Abstract

To improve the efficiency of the structural optimization design in truss calculation, an improved fruit fly optimization algorithm was proposed for truss structure optimization. The fruit fly optimization algorithm was a novel swarm intelligence algorithm. In the standard fruit fly optimization algorithm, it is difficult to solve the high-dimensional nonlinear optimization problem and easy to fall into the local optimum. To overcome the shortcomings of the basic fruit fly optimization algorithm, the immune algorithm self–non-self antigen recognition mechanism and the immune system learn–memory–forgetting knowledge processing mechanism were employed. The improved algorithm was introduced to the structural optimization. Optimization results and comparison with other algorithms show that the stability of improved fruit fly optimization algorithm is apparently improved and the efficiency is obviously remarkable. This study provides a more effective solution to structural optimization problems.

Introduction

With the rapid development of computer technology, the efficiency of structural optimization is greatly improved, and structural designers can have more time and energy to consider how to get better structural design scheme. In 1974, Schimit and Farshi proposed to combine finite element theory with mathematical induction theory to solve the optimal weight problem of engineering structure. Structural optimization has stepped into a new era [1]. After that, the intelligent optimization algorithm is also widely applied to the structural optimization, and the modern structural optimization method is gradually applied to the engineering practice. Now, after years of research and development, structural optimization has changed from the original optimization of structure size to the present optimization of topology and further optimization of material distribution. From a single objective optimization problem, multiple objectives are optimized simultaneously. Azamirad and Arezoo [2] proposed an improved software package for stamping die structure that can greatly reduce the weight. Ide [3] designed the lightweight structure with the structural optimization method, and successfully realized the lightweight gear box design by using the design method of reducing contact constraint stress. Kaveh [4] proposed water evaporation optimization algorithm (WEO), which is a population-based intelligent optimization algorithm inspired by physics and used for continuous structural optimization. In order to apply different optimization solvers to various finite-based structural topology optimization problems Rojas-Laband [5], developed a widely representative example library of mechanism design problems with minimum compliance, minimum volume and different sizes. Sivapuram [6] discussed various calculus methods and numerical methods commonly used to solve structural topology optimization problems.

Inspired by the foraging process of fruit flies, scholar Pan [7] proposed a more efficient swarm intelligence optimization algorithm in 2012: fruit fly optimization algorithm (FOA). The algorithm has the advantages of clear principle, fewer parameters and simple operation. However, there are also some shortcomings, such as weak ability to solve complex, high-dimensional and nonlinear optimization problems and easy to fall into local extremum. In view of the above typical problems, many scholars have proposed many improvements. As for the generation of candidate solutions [8], added an escape parameter that can be negative to the taste concentration judgment value, so that the candidate solution can take a negative value. A novel double strategy evolutionary fruit fly optimization algorithm (DSEFOA) was proposed by Fang [9]. DSEFOA dynamically divided the fruit fly population into spermatogonium subgroups and ordinary subgroups, and adopted different strategies to update the evolution of drosophila at different levels of evolution, which improved the optimization ability of the whole population. In terms of search radius, Sang et al. [10] introduced adaptive parameters to adjust the search radius of drosophila so as to better balance the global search capability and local search capability. Cao [11] proposed to replace the traditional search mechanism with sector search mechanism, and the new fruit fly algorithm was generated to effectively improve the stability of the algorithm. In terms of flight strategy [12,13,14], added the operation of group collaboration and random perturbation to solve the problem of premature development of the algorithm. Sheng [15] proposed that the length of fruit fly search for Uber should be dynamically changed according to the change rate of concentration difference, which can effectively balance the global optimization ability and the local optimization ability. In terms of population diversity [16], divided the drosophila population into multiple subpopulations of the same size. Han [17] et al. proposed a dynamic twin group co-evolutionary FOA to improve the search accuracy. Xin [18] used the gaussian sampling method to update the fruit fly. This method can increase the chance of jumping out of the local extremum in the early stage of the algorithm and conduct more accurate search in the later stage.

Aiming at improving the performance of the standard fruit fly optimization algorithm, the hybrid algorithm was designed to combine with fusion immune response. Immune algorithm was fully utilized to improve the deficiency of fruit fly algorithm that is prone to fall into local extreme value in the later stage. In other words, when the number of evolutionary stasis steps t is greater than the threshold value of evolutionary stasis steps T, immune operation is performed to overcome the defect of basic fruit fly algorithm. The improved algorithm was proved to have better robustness and intelligence through standard functions and tests for solving 0–1 knapsack problems [19,20,21]. Finally, it was applied to the optimization of truss structure [22] and compared with other algorithms to verify the feasibility of the improvements.

Basic fruit fly algorithm

FOA (fruit fly optimization algorithm) is a new heuristic algorithm that simulates the foraging activities of fruit flies in nature to seek the optimal solution of the objective function. The foraging iteration diagram of fruit flies is shown in Fig. 1.

Fig. 1
figure1

FOA foraging schematic diagram

The basic steps are as follows [23,24,25,26]:

  • Step 1: initialize parameters. Set Sizepop and Maxgen of the population size, and initialize the population position:

    $$ \left( {X_{{{\text{\_axis}}}} , Y_{{\_{\text{axis}}}} } \right). $$
    (1)
  • Step 2: fruit fly searches in the olfactory system, which can make the search direction and the search step randomly. Random value (RV) is to be the search distance, and the position of the population is updated simultaneously:

    $$ \left\{ {\begin{array}{*{20}c} {X_{i} = X_{{\_{\text{axis}}}} + {\text{RV}}} \\ {Y_{i} = Y_{{\_{\text{axis}}}} + {\text{RV}}} \\ \end{array} } \right.. $$
    (2)
  • Step 3: since the exact location of the food is unknown, it is necessary to calculate the distance (\( {\text{Dist}}_{i} \)) between the fruit flies and the origin of the coordinate and then calculate the taste concentration parameter (\( S_{i} \)):

    $$ {\text{Dist}}_{i} = \sqrt {X_{i}^{2} + Y_{i}^{2} } $$
    (3)
    $$ S_{i} = \frac{1}{{{\text{Dist}}_{i} }}. $$
    (4)
  • Step 4: substitute the fruit fly flavor concentration determination value (Si) into the taste concentration decision function, the fitness function, then we will obtain the individual taste concentration of the fruit flies \( {\text{Smell}}_{i} \).

    $$ {\text{Smell}}_{i} = {\text{Fitness}}\left( {S_{i} } \right). $$
    (5)
  • Step 5: identify the individual with the highest flavor concentration in the drosophila population.

    $$ \left[ {{\text{bestSmell}},{\text{bestIndex}}} \right] = { \hbox{min} }\left( {\text{Smell}} \right). $$
    (6)
  • Step 6: retain the best flavor concentration value and coordinate, and other individuals in the population fly to this position:

    $$ {\text{SmellBest}} = {\text{bestSmell}}. $$
    (7)
    $$ \left\{ {\begin{array}{*{20}c} {X_{{\_{\text{axis}}}} = X\left( {\text{bestIndex}} \right)} \\ {Y_{{\_{\text{axis}}}} = Y\left( {\text{bestIndex}} \right)} \\ \end{array} } \right.. $$
    (8)
  • Step 7: termination condition, judge whether the concentration of the best position is better than that of the previous generation, and reach the maximum number of iterations; otherwise, skip step 2 to enter the iterative optimization.

Improved fruit fly algorithm with immune response

Since fruit fly has a relatively developed olfactory and visual system, it first carries out a wide range of search through the sense of smell and sends out food odor information to the surrounding drosophila in the process of foraging. When a fly is found to have a higher concentration by comparison, the individual flies will rely on visual function to fly to that location [27, 28]. It is precisely because of such population characteristics that the diversity of the population is reduced, the algorithm that simulates its characteristics, like other bionic intelligent algorithms, has the defect that it is easy to fall into local optimization, which leads to the problem of early maturity [29].

The immune algorithm was inspired by somatic cell theory and network theory [30]. And it can realize the function of self-regulation by generating different antibodies similar to the immune system [31]. This algorithm has strong local search ability. By using this, we can introduce it into the later stage of fruit fly algorithm execution to improve the basic fruit fly algorithm. The new algorithm IAFOA can be used to balance the deficiency of fruit fly algorithm that is prone to fall into local optimal, and improve the search efficiency.

Immune algorithm

Immune algorithm (IA) is a kind of bionic optimization algorithm. In 1990, Bersini [32] first used immune algorithm to solve problems. By simulating biological immune system identify antigen (objective function), simulation of the principle of the memory in the immune system, combination of antigen and antibody (optimization) solution, and diversity of imitation immune system, IA algorithm can realize the antigen recognition, cell differentiation, and memory of the immune system and self-regulating function [2, 33, 34]. The basic steps of IA are as follows:

  • Step 1: antigen recognition. Input objective function and constraint conditions as antigen of immune algorithm;

  • Step 2: generate the initial antibody. Generate initial antibodies randomly within the solution space;

  • Step 3: calculate the compatibility (fitness evaluation). According to the given fitness evaluation function, the affinities between antibodies and antigens and between antibodies and antibodies were determined. The compatibility between antigen and antibody \( A_{v} \) is defined as follows:

    $$ A_{v} = 1/\left[ {1 + O_{{Pt_{v} }} } \right] , $$
    (9)

    where \( O_{{Pt_{v} }} \) represents the matching degree of antigen and antibody, and the value of \( A_{v} \) is between 0 and 1. When \( O_{{Pt_{v} }} = 0 \), \( A_{v} = 1 \), indicating that the antibody matches the antigen very well, that is, the antibody is the optimal solution.

  • Step 4: update memory units. The antibody with the highest affinity to antigen calculated in step 3 was added into the memory unit and replaced by the original antibody.

  • Step 5: promote and inhibit node production. Calculate the expected value \( E_{xi} \) of antibody i, the low expected value of antibody will be suppressed.

    $$ E_{xi} = A_{i} /C_{i}, $$
    (10)

    where \( A_{i} \) is the affinity between antigen and antibody i, and \( C_{i} \) is the number of antibody i;

  • Step 6: generate new antibodies. The father generation produces the next generation antibody through heredity, mutation and crossover.

  • Step 7: whether termination conditions are met. Yes, stop the algorithm; No, skip to step 3.

Population diversity improvement of IAFOA

The immune system is the basic defense system to maintain the normal metabolism of living organisms by blocking the invasion of bacteria [27]. The system recognizes gene types to produce different antibodies, promotes the emergence of new individuals and inhibits the excessive production of individuals through regulatory mechanisms, so as to achieve biological diversity [4].

Suppose the immune system has N antibodies, and each antibody has M genes, as shown in Fig. 2. The information entropy \( H_{j} \left( N \right) \) of the j gene is:

$$ H_{j} \left( N \right) = \mathop \sum \limits_{i = 1}^{N} \left( { - P_{ij} { \log }P_{ij} } \right). $$
(11)

If all the alleles of the antibody are the same at position j, then \( H_{j} \left( N \right) \) is equal to 0.

Fig. 2
figure2

Information entropy of genes

Therefore, the average information entropy \( H\left( N \right) \) of the system is as follows:

$$ H\left( N \right) = \mathop \sum \limits_{j = 1}^{M} H_{j} \left( N \right)/M . $$
(12)

The implementation of IAFOA

Based on the standard fruit fly algorithm, FOA algorithm was first used to construct the feasible solution set. Then, the number of evolutionary stasis steps t was used as the trigger condition [35]. When t > T (threshold of evolutionary stasis steps), the IA search process was invoked, and the process of immune factors in the immune algorithm (corresponding to individual drosophila) seeking antigens (corresponding to food source in the drosophila algorithm) producing antibodies (optimal solution) was used to expand the search space. The elite retention strategy was carried out in the feasible solution set obtained after IA search. And the obtained optimization solution was used together with the original feasible solution set to update the concentration of odor information in the search space, so as to guide other fruit fly’s path search mechanism.

The threshold value of evolutionary stagnation step T is the index to enter the IA algorithm. The premature introduction of IA algorithm is not conducive to the search ability of IA, or even the convergence of feasible solutions. Through multiple independent experiments, T = 6 was adopted as the trigger value for entering IA algorithm.

If the trigger condition is satisfied, a fixed immune factor redistribution probability \( P^{*} \) was employed to the optimization of space. And the different individuals were given different adaptive immune probability \( P\left( i \right) \) according to their fitness values:

$$ P\left( i \right) = \frac{{\left( {{\text{Smellbest}} - {\text{Smell}}\left( i \right)} \right)}}{{\left( {\left( {{\text{Smellbest}} - {\text{Smellworst}}} \right)P^{*} } \right)}} $$
(13)
$$ \left\{ {\begin{array}{*{20}c} {{\text{if}}\left( {{\text{bestSmell}} < {\text{Smellbest}}} \right)} \\ {{\text{Smellbest}} = {\text{bestSmell}}1} \\ {{\text{else}}\left( {t = t + 1} \right)} \\ {{\text{Smellbest}} = {\text{bestSmell}}2} \\ {\text{end}} \\ \end{array} } \right., $$
(14)

where in order to avoid the algorithm falling into the local optimal solution, the initial probability of immune factor in IA algorithm was given \( P^{*} = 0.25 \) to randomly allocate it and increase the diversity of solutions.

The process of IAFOA is as follows:

  • Step 1: initialize parameters. Set Sizepop and Maxgen of population size, initialize population positions \( X_{{\_{\text{axis}}}} \) and \( Y_{{\_{\text{axis}}}} \), and the number of evolutionary stagnation steps t = 0;

  • Step 2: randomly generate fruit fly population according to Eq. (3);

  • Step 3: use Eqs. (4)–(7) to operate the population;

  • Step 4: record and retain the best flavor concentration value according to Eq. (14), and update the evolutionary iteration step number t;

  • Step 5: judge whether t < T is true, if directly go to step 7; otherwise, according to Eq. (13), the adaptive immunity probability of individual fruit fly was calculated, and the immune operation was carried out according to the immune algorithm. For individuals who did not perform the immune operation, step 7 was taken.

  • Step 6: repeat steps 2–4 for iterative search of the new population obtained by immunization;

  • Step 7: set gen = gen + 1; if gen < Maxgen, go to step 2; otherwise terminate the iteration.

IAFOA flowchart is shown in Fig. 3.

Fig. 3
figure3

IAFOA algorithm iteration diagram

Simulation results

In order to verify the effectiveness of the improved algorithm, four standard test functions [5, 36] were selected for numerical simulation test to test the performance of IAFOA algorithm. In addition, 0–1 knapsack problem was selected for simulation experiment [37], and the results are compared with other algorithms. Initialization parameters: population size Sizepop = 200, max iteration number Maxgen = 1000, dimension D = 30, P* = 0.25, T = 6.

Standard function test

The first standard function: Rosenbrock function:

$$ f_{1} (x) = \mathop \sum \limits_{i = 1}^{d - 1} \left[100\left({x_{i + 1} - x_{i}^{2} } \right)^{2} + ({x_{i} - {1} )^{2} } \right] . $$
(15)

The second standard function: Ackley function:

$$ f_{2} \left( x \right) = - a \;{ \exp }\left( { - b\sqrt {\frac{1}{d}\mathop \sum \limits_{i = 1}^{d} x_{i}^{2} } } \right) - { \exp }\left( {\frac{1}{d}\mathop \sum \limits_{i = 1}^{d} \cos (cx_{i} )} \right) + {\text{a}} + \exp \left( 1 \right). $$
(16)

The third standard function: Cross-in-tray function:

$$ f_{3} \left( x \right) = - 0.0001\left( {\left| {\sin \left( {x_{1} } \right)\sin \left( {x_{2} } \right)\exp \left( {\left| {100 - \frac{{\sqrt {x_{1}^{2} x_{2}^{2} } }}{\pi }} \right|} \right)} \right| + 1} \right)^{0.1} . $$
(17)

The fourth standard function: Levy function:

$$ f_{4} \left( x \right) = { \sin }^{2} \left( {\pi \omega_{1} } \right) + \mathop \sum \limits_{i = 1}^{d - 1} \left( {\omega_{i} - 1} \right)^{2} \left[ {1 + 10{ \sin }^{2} \left( {\pi \omega_{i} + 1} \right)} \right] + \left( {\omega_{d} + 1} \right)^{2} \left[ {1 + { \sin }^{2} \left( {2\pi \omega_{d} } \right)} \right] , \quad {\text{where}} \;\omega_{i} = 1 + \frac{{x_{i} - 1}}{4} ,\quad {\text{for}}\; {\text{all}}\; i = 1,2, \ldots ,d. $$
(18)

Figures 4, 5, 6, and 7 show the graphs of the four functions, where Rosenbrock function is a single peak function, which is mainly used to test the convergence performance of the improved algorithm in the process of operation. Both Ackley function and Cross-in-tray function are complex multi-peak functions, which tend to make the algorithm fall into local optimization, so that the real optimal value cannot be obtained, which is used to test the ability of the improved algorithm to deal with falling into “premature”. The Levy function has a complex spatial property and is used to test the computational accuracy, convergence stability and time complexity of the improved algorithm. The selected functions and their expressions are shown in Table 1.

Fig. 4
figure4

Rosenbrock function graph

Fig. 5
figure5

Ackley function graph

Fig. 6
figure6

Cross-in-tray function graph

Fig. 7
figure7

Levy function graph

Table 1 Comparison of optimization performance for benchmark functions

Four different standard functions were used to test the convergence performance, operation efficiency, handling of “local optimal” and “premature” problems, and the optimal value and average value in the optimization test. The standard deviation reflects the robustness of the algorithm. The running time reflects the convergence speed and accuracy of the algorithm. It can be seen from the calculation results in Table 2 that the fusion immune response hybrid fruit fly algorithm performs better than the standard fruit fly algorithm in different standard functions. The improved algorithm is feasible and effective.

Table 2 Result comparison table of TSP problem

In order to more intuitively see the effectiveness of improved algorithm performance, Fig. 8 shows immune algorithm (IA), particle swarm optimization (PSO), standard fly optimization algorithm. FOA) and fruit fly optimization algorithm based on immune algorithm (IAFOA) under the above four standard functions. The average value of multiple runs was used as the final result to avoid accidental errors.

Fig. 8
figure8

The iterative curve of the algorithm under four functions. a Rosenbrock function. b Ackley function. c Cross-in-tray function. d Levy function

It can be seen from the iterative curve of Fig. 5 that the algorithm can search the local optimal solution, in addition it reflects high convergence speed and convergence accuracy, especially at the initial stage of iterative algorithm. Take (a) in Fig. 5 as an example, when the algorithm runs about 78 times, it can jump out of the local optimal solution. When the number of iterations is about 255 times, the optimization result is generally stable. It is obviously that the improved algorithm proposed here is superior to the IA, PSO, and standard FOA.

Solve the TSP problem

Traveling salesman problem (TSP) is a classical combinatorial optimization problem, which is a typical NP hard problem. It has important research value in the field of logistics distribution and vehicle route planning.

The TSP problem can be described as: we know the coordinate position of N cities or the distance between two cities. A salesman needs to go to N cities to sell goods. To start from one city, salesman must pass through other cities only once, and then return to the starting city. Finding out the shortest path for saleman. The mathematical model is as follows.

If \( S = \left( {P_{1} ,P_{2} , \ldots ,P_{N} } \right) \) can satisfy the minimum value of \( f\left( S \right) \), then access order S is the optimal solution of TSP problem under the condition of N cities, that is, the optimal path [38].

$$ f\left( S \right) = \mathop \sum \limits_{n = 1}^{N - 1} \left( {d\left( {P_{i} ,P_{i + 1} } \right)} \right) + d\left( {P_{N} ,P_{1} } \right), $$
(19)

where \( P_{i} \) is the city code, \( i \in \left( {1,2, \ldots ,N} \right) \); \( d\left( {P_{i} ,P_{j} } \right) \) is the distance between city \( P_{i} \) and city \( P_{j} \). If only the city coordinates are known, then:

$$ d\left( {P_{i} ,P_{j} } \right) = \sqrt {\left( {X_{i} - X_{j} } \right)^{2} + \left( {Y_{i} - Y_{j} } \right)^{2} } , $$
(20)

where \( \left( {X_{i} - X_{j} } \right) \) is the coordinate position of \( P_{i} \);\( d\left( {P_{i} ,P_{j} } \right) = d\left( {P_{j} ,P_{i} } \right) \).

In order to verify the performance of the IFOA in solving the TSP problem, this paper selected Oliver30, Att48 and Eil51 standard examples from the international TSP database (The Library of TSP, TSPLIB) for parameter testing. The result is shown in Table 2.

The above analysis results show that IAFOA can not only effectively solve the TSP problem, but also has a higher robustness than other algorithms.

Optimization of truss structure by IAFOA

Optimization model of truss structure

  1. 1.

    The optimization model

    The optimization model problem of truss with sectional area as the design variable is described as follows [6]:

    $$ { \hbox{min} }F = W\left( x \right) $$
    (21)
    $$ {\text{s}} . {\text{t}} . {\text{g}}_{i} \left( x \right) \le 0,\quad i = 1,2, \ldots ,m ,$$
    (22)

    where \( {\text{g}}_{i} \left( x \right) \) is the constraint function; m is the number of constraints.

  2. 2.

    The objective function

    $$ W\left( A \right) = \mathop \sum \limits_{i = 1}^{n} \rho A_{i} L_{i} ,$$
    (23)

    where \( W\left( A \right) \) is the weight of the structure; \( A_{i} \) and \( L_{i} \) are, respectively, the cross-sectional area and length of the ith root. \( \rho \) is the density of the material; n is the number of design variables.

  3. 3.

    The constraint

Each member of the structure shall meet the requirements of strength, stiffness, stability and section size:

$$ \frac{{\sigma_{i} }}{\left[ \sigma \right]} - 1 \le 0, $$
(24)
$$ \frac{{\mu_{j} }}{{\mu_{ \hbox{max} } }} - 1 \le 0, $$
(25)
$$ {\text{A}}_{ \hbox{min} } \le {\text{A}}_{\text{i}} \le {\text{A}}_{ \hbox{max} } , $$
(26)

where \( \sigma_{i} \) is the normal stress of the ith root element. \( \left[ \sigma \right] \) is the allowable stress of the material. \( \mu_{j} \) represents the displacement of node j; allowable displacement of \( \mu_{ \hbox{max} } \) node j; \( {\text{A}}_{ \text{min} } \) and \( {\text{A}}_{ \text{max} } \) are the upper and lower limits of the member section, respectively.

Example 1

The 25-bar truss structure model [39] is established as shown in Fig. 9 and Table 3. Basic parameters of truss structure: rod length L = 0.635 m, elastic modulus \( E = 6.895 \times 10^{4} \;{\text{MPa}} \), material density \( \rho = 2.678 \times 10^{3} \;{\text{kg}}/{\text{m}}^{3} \), allowable stress range: [− 275.8275.8], maximum vertical displacement \( y = 8.889\;{\text{mm}} \) of nodes 1 and 2.

Fig. 9
figure9

The 25-bar spatial structure

Table 3 Load conditions of 25-bar truss structure

The results are shown in Table 4 and Fig. 10. Under the same constraint conditions, IAFOA was used to optimize the 25-bar truss structure, and the total mass of the optimized structure was 206.591 kg. Compared to IA, mass decreased (246.436–206.591)/206.591 = 1.93%. Compared with PSO, the quality decreased (216.339–206.591)/206.591 = 4.72%; compared with FOA, the optimization results were optimized (214.702–206.591)/206.591 = 3.93%. After about 68 iterations, IAFOA can find the global optimal solution. IA searched for the global optimal solution for about 130 times, PSO for about 150 times and FOA for about 165 times. For the quality problem of global optimal solution, IAFOA is superior to the other three optimization algorithms. It is proved that IAFOA is stable in the face of complex optimization problems in the optimization process, and it is not easy to fall into the local optimal solution. Thus, IAFOA is effective.

Table 4 Comparison of optimization results of 25-bar truss structure
Fig. 10
figure10

The optimization iteration curve of Example 1

Example 2

The 72-bar truss structure model [39] is established as shown in Fig. 11. 72 bars are divided into 16 groups, and the grouping condition is shown in Table 5. Material density is \( \rho = 2.678 \times 10^{3} \;{\text{kg}}/{\text{m}}^{3} \), elastic modulus is \( E = 6.895 \times 10^{4} \;{\text{MPa}} \), and the maximum displacement of each bar in all directions cannot exceed 6.35 mm, and maximum allowable stress is [− 172.375, 172.375], and the optimized results are shown in Table 6.

Fig. 11
figure11

The 72-bar spatial structure

Table 5 The classification of 72-bar truss structure
Table 6 Comparison of optimal designs for the 72-bar spatial truss structure

The results are shown in Table 7 and Fig. 12. Under the same constraint conditions, IAFOA was used to optimize the 72-bar truss structure, and the total mass of the optimized structure was 171.98 kg. Compared to IA, mass decreased (175.03–171.98)/171.98 = 1.77%. Compared with PSO, the quality decreased (173.87–171.98)/171.98 = 1.10%; Compared with FOA, the optimization results were optimized (176.31–171.98)/171.98 = 2.52%.

Table 7 The classification of 200-bar truss structure
Fig. 12
figure12

The optimization iteration curve of Example 2

Example 3

The 200-bar truss structure model [39] is established as shown in Fig. 13. 200 bars are divided into 29 groups, and it is relatively high-dimensional optimization problem. The grouping condition is shown in Table 7. Material density is \( \rho = 7.86 \times 10^{3} \;{\text{kg}}/{\text{m}}^{3} \), elastic modulus is \( E = 2.1 \times 10^{11} \;{\text{N}}/{\text{m}}^{2} \). The minimum permitted cross-sectional area for the truss members is taken as 0.1 cm2, a non-structural mass of 100 kg is attached for all free nodes.

Fig. 13
figure13

The 200-bar spatial structure

The results are shown in Table 8 and Fig. 14. Under the same constraint conditions, IAFOA was used to optimize the 200-bar truss structure, and the total mass of the optimized structure was 2156.05 kg. Compared to IA, mass decreased (2298.73–2156.05)/2156.05 = 6.62%. Compared with PSO, the quality decreased (2276.59–2156.05)/2156.05 = 5.59%; compared with FOA, the optimization results were optimized (2259.86–2156.05)/2156.05 = 4.81%.

Table 8 Comparison of optimal designs for the 200-bar spatial truss structure
Fig. 14
figure14

The optimization iteration curve of Example 3

Conclusion

With the development of civil engineering, the structural optimization is more and more important. To find a new method for the truss structure optimization, an improved FOA was proposed. To overcome the shortage of the basic FOA, the IA was introduced into FOA, and a new IAFOA algorithm was proposed. Combining the global search capability of the original standard FOA algorithm and the strong local search capability of IA algorithm itself, the IAFOA achieves good results in numerical simulation with high ability of solving optimization problems. Although these improvements can overcome some shortcomings of the algorithm, it lacks the adjustment of parameter stagnation step number wide value T and fixed probability \( P^{*} \). In the future, more detailed improvements are needed to make IAFOA algorithm converge faster and more accurately. In addition, the example in this paper is relatively simple, and the application of the algorithm in the optimization of complex structures needs to be further studied.

Availability of data and materials

All data generated or analyzed during this study are included in this published article.

References

  1. 1.

    Lin SM (2013) Analysis of service satisfaction in web auction logistics service using a combination of Fruit fly optimization algorithm and general regression neural network. Neural Comput Appl 22(3–4):783–791

    Article  Google Scholar 

  2. 2.

    Azamirad G, Arezoo B (2016) Structural design of stamping die components using bi-directional evolutionary structural optimization method. Int J Adv Manuf Technol 87(1–4):969–979. https://doi.org/10.1007/s00170-016-8344-7

    Article  Google Scholar 

  3. 3.

    Ide T, Kitajima H, Otomori M et al (2016) Structural optimization methods of nonlinear static analysis with contact and its application to design lightweight gear box of automatic transmission of vehicles. Struct Multidiscip Optim 53(6):1383–1394

    Article  Google Scholar 

  4. 4.

    Kaveh A, Bakhshpoori T (2016) A new metaheuristic for continuous structural optimization: water evaporation optimization. Struct Multidiscip Optim 54(1):2343. https://doi.org/10.1007/s00158-015-1396-8

    Article  Google Scholar 

  5. 5.

    Rojas-Labanda S, Stolpe M (2015) Benchmarking optimization solvers for structural topology optimization. Struct Multidiscip Optim 52(3):527–547. https://doi.org/10.1007/s00158-015-1250-z

    MathSciNet  Article  Google Scholar 

  6. 6.

    Sivapuram R, Dunning PD, Kim HA (2016) Simultaneous material and structural optimization by multiscale topology optimization. Struct Multidiscip Optim 54(5):1267–1281. https://doi.org/10.1007/s00158-016-1519-x

    MathSciNet  Article  Google Scholar 

  7. 7.

    Pan WT (2012) A new fruit fly optimization algorithm: taking the financial distress model as an example. Knowl Based Syst 26:69–74. https://doi.org/10.1016/j.knosys.2011.07.001

    Article  Google Scholar 

  8. 8.

    Pan WT (2013) Using modified fruit fly optimization algorithm to perform the function test and case studies. Connect Sci 25(2/3):151–160

    Article  Google Scholar 

  9. 9.

    Fang B, Chen HM (2019) A novel double strategies evolutionary fruit fly optimization algorithm. J Shandong Univ 49(3):22–31

    Google Scholar 

  10. 10.

    Pan QK, Sang HY, Duan JH (2014) An improved fruit fly optimization algorithm for continuous function optimization problems. Knowl Based Syst 62:69–83. https://doi.org/10.1016/j.knosys.2014.02.021

    Article  Google Scholar 

  11. 11.

    Cao ZG, Li ZW, Yu JF (2019) Fruit-fly optimization algorithm of sector search mechanism. Comput Eng Des 40(6):1584–1590

    Google Scholar 

  12. 12.

    Li J, Pan Q, Mao K (2014) Solving the steelmaking casting problem using an effective fruit fly optimization algorithm. Knowl Based Syst 72:28–36

    Article  Google Scholar 

  13. 13.

    Wang L, Shi Y, Liu S (2015) An improved fruit fly optimization algorithm and its application to joint replenishment problems. Expert Syst Appl 42(9):4310–4323. https://doi.org/10.1016/j.eswa.2015.01.048

    Article  Google Scholar 

  14. 14.

    Zhang QT, Fang LQ, Zhao YL (2015) Gemini fly optimization algorithm with Levy flight characteristics. Comput Appl 35(5):1348–1352

    Google Scholar 

  15. 15.

    Sheng C, Zou H, Zhu FZ (2019) A new self-changing step fruit fly optimization algorithm. Microelectron Comput 36(2):62–67

    Google Scholar 

  16. 16.

    Liu ZX, Wang YF, Zhang Y (2014) Multi-population fruit fly optimization algorithm for automated warehouse selection scheduling. J Wuhan Univ Technol 36(3):71–77

    Google Scholar 

  17. 17.

    Han JY, Liu CZ, Wang LG (2013) Dynamic twin group coevolution drosophila optimization algorithm. Pattern Recognit Artif Intell 26(11):1057–1067

    Google Scholar 

  18. 18.

    Xin CT, Zou H, Sheng C, Ding GK (2019) The optimal entropy threshold image segmentation of the mew fruit fly optimization algorithm. Microelectron Comput 36(4):52–56

    Google Scholar 

  19. 19.

    Cai ZX, Gong T (2004) Progress of immune algorithm research. Control Decis 19(8):841–846

    MathSciNet  Google Scholar 

  20. 20.

    Chen D, Li S, Wang J, Feng Y, Liu Y (2019) A multi-objective trajectory planning method based on the improved immune clonal selection algorithm. Robot Comput Integr Manuf 59:431–442. https://doi.org/10.1016/j.rcim.2019.04.016

    Article  Google Scholar 

  21. 21.

    Zhen Y, Ding YS, Hao KG, Cai X (2019) An adaptive immune algorithm for service-oriented agricultural internet of things. Neurocomputing. https://doi.org/10.1016/j.neucom.2018.06.094

    Article  Google Scholar 

  22. 22.

    Corus D, Oliveto PS, Yazdani D (2019) When hypermutations and ageing enable artificial immune systems to outperform evolutionary algorithms. Theor Comput Sci. https://doi.org/10.1016/j.tcs.2019.03.002

    MATH  Article  Google Scholar 

  23. 23.

    Hassan Z, Bahman N, Mohammad M (2019) The economic lot scheduling problem in limited-buffer flexible flow shops: mathematical models and a discrete fruit fly algorithm. Appl Soft Comput J 6:904–919. https://doi.org/10.1016/j.asoc.2019.03.054

    Article  Google Scholar 

  24. 24.

    Hu JH, Chen P, Yang Y, Liu YM (2019) The fruit fly optimization algorithms for patient-centered care based on interval trapezoidal type-2 fuzzy numbers. Int J Fuzzy Syst 5:1270–1287. https://doi.org/10.1007/s40815-019-00624-y

    MathSciNet  Article  Google Scholar 

  25. 25.

    Wang L, Zhang XL (2017) Research progress of fruit fly optimization algorithm. Control Theory Appl 34(5):557–563

    Google Scholar 

  26. 26.

    Xu XP, Shi XT, Qian FC (2008) Solving 0–1 knapsack problem based on monkey swarm algorithm. Appl Comput Syst 27(5):133–138

    Google Scholar 

  27. 27.

    Gholizadeh S, Poorhoseini H (2015) Optimum design of steel frame structures by a modified Dolphin echolocation algorithm. Struct Eng Mech 55(3):535–554. https://doi.org/10.12989/sem.2015.55.3.535

    Article  Google Scholar 

  28. 28.

    Zhang JM, Liu HJ (2018) Prediction of parking space based on BP neural network optimized by genetic algorithm. J Chongqing Univ 41(3):76–81

    Google Scholar 

  29. 29.

    Xie KH, Zeng XH, Liu CY (2003) Comparative analysis of immune algorithm and other stochastic optimization algorithms. J Chongqing Univ 26(11):43–47

    Google Scholar 

  30. 30.

    Li YC, Yan Z (2019) Improved shuffled frog leaping algorithm on system reliability analysis. Brain Inf. https://doi.org/10.1186/s40708-019-0095-4

    Article  Google Scholar 

  31. 31.

    Bonyadi MR, Michalewicz Z (2017) Impacts of coefficients on movement patterns in the particle swarm optimization algorithm. IEEE Trans Evol Comput 21(3):378–390. https://doi.org/10.1109/tevc.2016.2605668

    Article  Google Scholar 

  32. 32.

    Brsini H, Varela F (1991) Hints for adaptive problem solving gleaned from immune network. Springer-Verlag, Berlin Heidelberg, pp 343–354

    Google Scholar 

  33. 33.

    Babalık A, İşcan H, Babaoğlu İ, Gündüz M (2017) An improvement in fruit fly optimization algorithm by using sign parameters. Soft Comput 2:1–17. https://doi.org/10.1007/s00500-017-2733-1

    Article  Google Scholar 

  34. 34.

    Du TS, Ke XT, Liao JG, Shen YJ (2018) DSLC-FOA: improved fruit fly optimization algorithm for application to structural engineering design optimization problems. Appl Math Model 55:314–339. https://doi.org/10.1016/j.apm.2017.08.013

    MathSciNet  MATH  Article  Google Scholar 

  35. 35.

    Mohanty B, Hota PK (2015) Comparative performance analysis of fruit fly optimization algorithm for multi-area multi-source automatic generation control under deregulated environment. Gener Trans Distrib 9(14):1845–1855. https://doi.org/10.1049/iet-gtd.2015.0284

    Article  Google Scholar 

  36. 36.

    Mousavi SM, Tavana M, Alikar N, Zandieh M (2017) A tuned hybrid intelligent fruit fly optimization algorithm for fuzzy rule generation and classification. Neur Comput Appl. https://doi.org/10.1007/s00521-017-3115-4(In Press)

    Article  Google Scholar 

  37. 37.

    Zargham S, Ward TA, Ramli R, Badruddin IA (2016) Topology optimization: a review for structural designs under vibration problems. Struct Multidiscip Optim 53(6):1157–1177. https://doi.org/10.1007/s00158-015-1370-5

    MathSciNet  Article  Google Scholar 

  38. 38.

    Cai YG, Chen RH, Qi YH (2019) Chaotic fireworks algorithm for solving salesman problem. Comput Sci 46(6A):85–88

    Google Scholar 

  39. 39.

    Assimi H, Jamali A, Nariman-Zadeh N (2018) Multi-objective sizing and topology optimization of truss structures using genetic programming based on a new adaptive mutant operator. Neural Comput Appl 23(24):1–21. https://doi.org/10.1007/s00521-018-3401-9

    Article  Google Scholar 

Download references

Acknowledgements

This work was supported by the Project of Scientific Research Program of Colleges and Universities in Hebei Province (No. ZD 2019114) and the Innovative Funding Project for Graduate Students in Hebei Province (No. CXZZSS2020079).

Funding

This work was supported by the Project of Scientific Research Program of Colleges and Universities in Hebei Province (No. ZD 2019114).

Innovative Funding Project for Graduate Students in Hebei Province (No. CXZZSS2020079).

Author information

Affiliations

Authors

Contributions

LIY and HM were involved in initiating the study and developing the model. LY drafted the initial manuscript and performed the analyses. LY and HM edited the manuscript. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Yancang Li.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Li, Y., Han, M. Improved fruit fly algorithm on structural optimization. Brain Inf. 7, 1 (2020). https://doi.org/10.1186/s40708-020-0102-9

Download citation

Keywords

  • Truss structure optimization
  • Fruit fly algorithm
  • Improvement
  • Immune response