Design and application of improved sparrow search algorithm based on sine cosine and firefly perturbation

: Swarm intelligence algorithms are relatively simple and highly applicable algorithms, especially for solving optimization problems with high reentrancy, high stochasticity, large scale, multi-objective and multi-constraint characteristics. The sparrow search algorithm (SSA) is a kind of swarm intelligence algorithm with strong search capability, but SSA has the drawback of easily falling into local optimum in the iterative process. Therefore, a sine cosine and firefly perturbed sparrow search algorithm (SFSSA) is proposed for addressing this deficiency. Firstly, the Tent chaos mapping is invoked in the initialization population stage to improve the population diversity; secondly, the positive cosine algorithm incorporating random inertia weights is introduced in the discoverer position update, so as to improve the probability of the algorithm jumping out of the local optimum and speed up the convergence; finally, the firefly perturbation is used to firefly perturb the sparrows, and all sparrows are updated with the optimal sparrows using the firefly perturbation method to improve their search-ability. Thirteen benchmark test functions were chosen to evaluate SFSSA, and the results were compared to those computed by existing swarm intelligence algorithms, as well as the proposed method was submitted to the Wilcoxon rank sum test. Furthermore, the aforesaid methods were evaluated in the CEC 2017 test functions to further validate the optimization efficiency of the algorithm when the optimal solution is not zero. The findings show that SFSSA is more favorable in terms of algorithm performance, and the method's searchability is boosted. Finally, the suggested algorithm is used to the locating problem of emergency material distribution centers to further validate the feasibility and efficacy of SFSSA.


Introduction
Swarm intelligence optimization algorithms have been developing rapidly in the last decades, and have been innovated in solving optimization problems. Meanwhile, the algorithm technology is being updated and iterated with the development [1]. Most of the swarm intelligence optimization algorithms are applied to the algorithms by simulating the characteristics of some animals in nature, through their survival ability and some laws of living habits [2]. For example, the most classical Particle Swarm Optimization (PSO) algorithm was proposed by Eberhart and Kennedy in 1995, and the source of the algorithm was based on the process of simulating the flight of a flock of birds in search of food [3,4]. Ant Colony Optimization (ACO) was proposed by Dorigo (Italy) in 1992 in his Ph.D. thesis and was based on the study of the biological characteristics of ants by leaving pheromones in the process of searching for food [5,6]. PSO and ACO are the most classical intelligent optimization algorithms, there are also Artificial Fish Swarms Algorithm (AFSA) [7], Grey Wolf Optimization Algorithm (GWO) [8], Whale Optimization Algorithm (WOA) [9], Bat Algorithm (BA) [10], Firefly Algorithm (FA) [11], Chimp Optimization Algorithm(ChOA) [12], Sparrow Search Algorithm (SSA) [13], and so on.
SSA is a new swarm intelligence optimization algorithm proposed by Xu et al. [13] in 2020, which is inspired by the foraging and anti-predatory behavior of sparrows, and the authors conducted some comparative experiments to test the effectiveness and performance of the algorithm they proposed, and the simulation results prove that SSA outperforms other existing algorithms in terms of search accuracy, convergence speed, and stability. However, when searching for the global optimal solution, SSA, like other optimization algorithms, suffers from the problem of reduced population diversity and easily falls into the local optimum.
The defect of easily falling into local optimum when searching for the global optimal solution of swarm intelligence optimization algorithms reflects its limitation in searching for optimal solutions. As a result, scholars both domestic and abroad put forward corresponding improvement methods. Duan et al. [14] improved the convergence speed and accuracy by considering the introduction of an extended memory factor into the PSO algorithm and then applied this extended memory-based PSO algorithm to AFSA. Han et al. [15] studied the multi-constrained unmanned helicopter high-quality flight path problem and proposed a method based on integrating group intelligence and brain-like cognitive learning artificial bee swarm algorithm (ABCA) path planning method to improve the traditional ABCA evolutionary method. Dereli et al. [16] improved the WOA algorithm convergence speed and overcame the problem of frequently falling into optimum by improving the equations of WOA adding two phases of search and wrap-around to make the population value better than the individual value. Chaudhary et al. [17] proposed a swarm bat algorithm (BA) for improving the searchability based on the two problems that BA tended to fall into local optimum and the speed of convergence decreased with iteration to the end. Wu et al. [18] provided an adaptive logarithmic spiral-Levy FA (AD-IFA) to solve the problem that LF-FA was underdeveloped locally and did not converge quickly, their work proved that AD-IFA outperformed both standard FA and LF-FA in terms of computational speed and derived optimal values. Xin Lu et al. [19] improved some shortcomings of SSA by introducing the Tent chaos model and Gaussian variation method. Ma et al. [20] applied a large number of variants combined with SSA to verify the performance of SSA variants compared with other intelligent algorithms and proved the effectiveness and stability of their algorithm. Ma et al. [21] studied and proposed an enhanced multi-strategy sparrow search algorithm (EMSSA) with algorithm improvements to incorporate adaptive tent chaos theory and weighted positive cosine algorithm, which in turn improved the population diversity and local optimum problems. Wu et al. [22] solved the travel quotient problem through the improvement of SSA using positive cosine and greedy algorithms and compared it with other intelligent algorithms, which proved that the improved algorithm was feasible. Zhang et al. [23] proposed an improved SSA by three strategies and applied it to mobile robot bionic path planning, results showed that the improved algorithm was more feasible compared with other studies.
SSA is continuously being improved since its introduction, and it is still in the exploration stage. To improve the search ability and convergence accuracy of SSA, this paper continues to explore new improvement strategies based on previous work and proposes an improved SSA that incorporates the positive cosine algorithm with random inertia weights and the firefly perturbation strategy.
The innovation points on the original sparrow search algorithm in this paper can be summarized as follows: 1) Tent chaos mapping is invoked in the initial population to make the population distribution more uniform and improve the population diversity.
2) A positive cosine approach with random inertia weights is proposed to update the discoverer's position. The strategy successfully reduces the likelihood that the algorithm would enter a local optimum solution and improves convergence accuracy thanks to the improved discoverer position.
3) Add firefly perturbation to update the position of all sparrows, update the optimal position, improve the search performance of the algorithm, compare the sparrows after perturbation with those before perturbation, and select the better position if it is better to update the sparrow position.
The remaining of this paper is structured as follows. In the second part, the mathematical model of the original sparrow search algorithm is described. In the third part, the improvement points of this paper are analyzed and the improved SFSSA algorithm is proposed. In the fourth part, the improved algorithm is compared with the other four algorithms, and thirteen benchmark test functions are chosen to prove the advantage of SFSSA in terms of algorithm performance. In the fifth part, to further illustrate the algorithm's capacity to identify the ideal value when the optimal value is not zero, the CEC2017 test function is used to compare the method. In the sixth part, the SFSSA algorithm is applied to the emergency material location problem, and the running results further prove the feasibility and effectiveness of the SFSSA algorithm. In the seventh part, the work of this paper is briefly summarized and some directions are made for future research work.

Predatory and anti-predatory behavior of sparrows
In nature, most animals are predators, but they are also been predated. Under the conditions of natural selection, animals will form a set of defensive measures to prevent anti-predatory behavior during foraging, and sparrows have such typical characteristics in the foraging process. Sparrows are flock animals, in each foraging process, each sparrow will have a clear division of labor, and sparrows in the foraging process has a keen perception and scouting ability, sparrows responsible for finding food can provide search lines and directions to their companions to help quickly find food, sparrows responsible for scouting, after the discovery of natural enemies, will promptly send a signal to their companions to quickly leave to avoid being predated.

Description of the sparrow search algorithm
Sparrows are born with high alertness and keen perception of surroundings, sparrows are divided into discoverer, joiner, and scouter, the sparrow search algorithm is introduced based on the predatory characteristics of sparrows.
Suppose there is a population of N sparrows in a D-dimensional space, and the initial location of this population is as follows: where d represents the dimension of the problem variable, and n is the total number of sparrows.
Sparrow adaptation values are as follows: where f represents the adaptation value.
In the process of each iteration, some sparrows with high fitness are selected as discoverers in the population, with the percentage of generally 10 to 20%, and the location of discoverers is updated with the following equation: where represents the number of current iterations, 1,2,3 ⋯ . denotes the maximum number of iterations. , indicates the position of the sparrow in the dimension. ∈ 0,1 is a random number. is the alarm value, ∈ 0,1 . is the safety value, ∈ 0.5,1 . is a random number that obeys the standard normal distribution. is a 1 matrix and the elements in the matrix are all 1. When , means that the surrounding environment is safe without natural enemies, and the discoverer will conduct an extensive search. When , it means that natural enemies appear, and the scouter needs to send an early warning signal to the population, at this point all sparrows need to fly to other safe places to search for food.
The position of the joiners is updated with the following equation: where denotes the global worst position for the iteration.
indicates the optimal position of the discoverer in the 1 iteration. represents a 1 matrix, elements in this matrix are randomly assigned 1 or -1, and . When /2, the joiner is in a poor position and therefore in a very hungry state, then the joiner needs to fly to other places to search for food.
The proportion of scouts is 10 to 20% of the sparrow population, and the location of scouts is updated with the following equation: where is the current global optimal position. is the step control parameter, it is a random number that obeys 0,1 . is a random number and ∈ 1, 1 .
indicates the current individual fitness value, is the current global optimal fitness value, is the current global worst fitness value. is the minimum constant to avoid a denominator of 0. When , it means that the sparrow is at the edge of population danger and is extremely vulnerable to being attacked by natural enemies. When , it means that the scout is aware of the danger and needs to move closer to other joiners to avoid being predated by natural enemies, where is the direction in which the scout moves.

Initializing population-based on tent chaotic mapping
Chaos is a sequence of randomness generated by a simple deterministic system. Chaotic mapping plays a more prominent role in stochastic optimization algorithms, where their properties allow swarm intelligence algorithms to avoid falling into local optima due to the ergodic and semi-random nature of chaos. Chaotic sequences can influence the optimization results of the whole population during population initialization, selection, crossover, and mutation [24]. The common chaotic sequences are Logistic mapping, Tent mapping, Sine mapping, Circle mapping, Singer mapping, and Chebyshev mapping et al. [25]. In the process of initializing the population for the swarm intelligence algorithm, Tent chaotic sequences and logistic mapping are frequently used. By utilizing the properties of chaotic sequences to improve population diversity and make the population distribution more uniform, Tent chaotic sequences also maximize the avoidance of reducing the population later on when searching for the local optimum problem probability [26].The Tent mapping has merits of uniformity in population distribution and better searchability than the Logistic mapping [27].
Tent mapping is a segmented linear mapping function [28]. It is called a "Tent" because the shape of the mapping morphology is similar to a tent, as shown in Figure 1 [29].  The structure of Tent mapping is simple, and the distribution density of the results is relatively uniform with good ergodicity [30], the equation is displayed below.

2
, 0 0.5 2 1 , 0.5 1 Equation (6) is the expression when parameter a is set to be 0.5. The original mathematical expression of the Tent mapping is as follows [31].
where the system is in a chaotic state when ∈ 0,1 and ∈ 0,1 . It can be seen from its expression that the Tent algorithm involves fewer parameters and is relatively simple to operate. Here, the coefficient 0.7 and the initial value 0.6, the Tent mapping is iterated 1000 times, and the distribution of the values is in the interval [0,1], as shown in Figure 2 [32]. Figure 2, clearly demonstrates that the Tent mapping is distributed more uniformly, and the values are taken in the interval (0,1).

Sine cosine algorithm
Sine Cosine Algorithm (SCA) is a swarm intelligence optimization algorithm proposed by Seyedali Mirjalili, an Australian scholar, in 2016 [33]. It uses the oscillatory variation property feature of the sine cosine function to make the solution converge to the global optimal position. Sparrows' positions are constantly updated during the process of seeking food, and when the discoverer finds the optimal position, it attracts a large number of follower sparrows to concentrate together, increasing the probability that the population falls into a local solution. Therefore, based on the sine cosine algorithm, random inertia weights [34] are introduced as shown in Eq (8) to update the discoverer position, and then the new discoverer position update formula is obtained as shown in Eq (9). The introduction of the random inertia weights can balance the global convergence ability and facilitate the algorithm to find the global optimal solution, and the random variables can be used to adjust the random weights to induce the algorithm to avoid local optima and improve the stability of the searching results.
sin (8) where, is the maximum value of the random inertia weight. is the minimum value of the random inertia weight.

Firefly perturbation strategy
The Firefly Algorithm (FA) was proposed by Professor Xin-She Yang at the University of Cambridge [35]. The origin of the FA algorithm comes from the luminous properties of fireflies to attract the opposite sex, and the luminous biological properties can warn potential predators [36]. Such swarm-living animals as bees and ants, for example, can communicate among their group members, which is the main reason why group intelligence is characterized by organization and decentralized decision-making. Fireflies attract each other through their luminescence system, and the strength of luminescence becomes a signal to attract other fireflies so that their luminescence weakness will move towards the side with strong luminescence [37]. Therefore, based on the change in light intensity of fireflies and the attraction design formula, the assumptions are listed below.
1) Fireflies not only attract the opposite sex but also move toward the side of the stronger luminous fireflies.
2) The attraction of fireflies is proportional to their brightness, for any two fireflies, one will move towards the other brighter than it, however, the brightness is decreasing with the increase of distance.
3) If no one brighter than the given firefly is found, it will move randomly. The equation for the degree of luminescence of fireflies is as follows: . , (10) where is the intensity of the maximum light source of fireflies, and related to the target value of the function, the better the target value of the function, the greater the intensity of firefly light. is the light absorption coefficient, firefly light degree will change with the distance and propagation medium. , is the spatial distance between firefly and firefly .
The equation for the attraction of fireflies is as follows: where is the maximum attraction strength. The equation for updating the position of firefly attracted to firefly is shown in Eq (12): .
. rand 0.5 (12) where , f are the spatial locations of fireflies and respectively, ∈ 0,1 is the step size factor, a rand is a random number on 0,1 that obeys uniform distribution.

Flow Chart of SFSSA
Through the above analysis, it is found that the sparrow search algorithm has strong local search ability compared with other swarm intelligence algorithms, but there are still similar shortcomings as other intelligent algorithms, such as fast convergence speed and ease to fall into local optimum. Therefore, this paper proposes corresponding improvement measures: 1) the Tent chaotic map is used to improve the population diversity, 2) the improved sine and cosine algorithm is used to improve the searchability of the discoverer sparrow, 3) the sparrow position is updated by using the firefly disturbance, which can make the sparrow population jump out of the local optimum. The flow chart of SFSSA is shown in Figure 3, and the pseudo code of SFSSA is shown in Algorithm 1 below, and the specific improved process is as follows.
Step 1. Initialize parameters. Set population size N, the maximum number of iterations, discoverer PD, scout SD, warning value , safety value ST, etc.
Step 2. Initialize population. The population is initialized using the Tent chaos mapping in Eq (6).
Step 3. Calculate the fitness value of each sparrow and rank.
Step 4. According to the PD ratio, some sparrows with superior fitness values are selected as discoverers, and the discoverer positions are updated according to Eq (3).
Step 5. A positive cosine algorithm incorporating random inertia weights is introduced at the discoverer location to select the one with the best fitness value as the discoverer, and the discoverer location is updated according to Eq (9).
Step 6. The remaining populations are the joiners and the joiner positions are updated according to Eq (4).
Step 7. Some individuals in the population are randomly selected as scouts according to the proportion, the scout sparrow position is updated according to Eq (5), the new fitness value is calculated, and the update operation is performed if it is better than the current optimal value.
Step 8. The optimal position of the population is updated by adding firefly perturbation, and the intensity magnitude of the light source is used as the superiority of the fitness value, and the direction of movement of the population is determined according to the degree of firefly luminescence and attractiveness in Eqs (10) and (11).
Step 9. A perturbation strategy is applied to the population according to Eq (12) to update the location.
Step 10. Calculate the fitness value and determine the optimal position of the population.
Step 11. Observe whether the stop condition is satisfied, exit if it is satisfied, and output the result, otherwise, repeat from Step 3. Select the sparrow with better fitness as the discoverers by Eq. (3) Update the discoverers location using an improved sine-cosine algorithm by Eq. (9) Update accessions by Eq. (4) Update scouts by Eq. (5) Using firefly luminescence and attraction strength to determine the direction of population movement by Eq.(10) and Eq. (11) Update of population location by means of firefly disturbance by Eq. (12) Calculate the fitness value and determine the optimal position Whether meet the termination condition ?
Output results End YES NO Figure 3. SFSSA flow chart.

Test object and parameter setting
For the verification of the effectiveness of SFSSA, WOA, PSO, ChOA, SSA, LSSA and RWSSA are selected and compared with it in this paper. To ensure the fairness of the validation, the population size N of the algorithm is set to be 30 and the maximum number of iterations is set to be 500. Each experimental parameter is shown in Table 1.

Thirteen benchmark test functions
This paper selects 13 standard representative benchmark functions for testing [38], including 7 unimodal test functions. Unimodal test functions usually only have one global optimal solution, thus the comparison is conducted in terms of the search ability and convergence speed, as shown in Table 2.
There are 4 multimodal test functions with local optimal solutions in the function definition domain, which are easily falling into local optimum. Multimodal function testing can compare the algorithms in terms of the global search ability and local optimum ability without falling into local optimum, as shown in Table 3. There are 2 low-dimensional dimensional multimodal test functions. Swarm intelligence algorithms need to be constantly explored and developed, and low-dimensional dimensional multimodal test functions are used to compare the ability of each algorithm in global exploration and local development, as shown in Table 4.  Tables 5-7. From Tables 5-7, the following conclusions can be drawn. 1) For the highdimensional unimodal test functions F1-F7, the SFSSA algorithm proposed in this paper significantly outperforms WOA, PSO, ChOA, SSA, LSSA and RWSSA among functions F1-F4, the SFSSA effect for searching optimal solutions reach 100%, while in test functions F5-F7, SFSSA does not obtain an optimal solution, but the test results are also better than other algorithms. 2) For the high-dimensional multimodal test functions F8-F11, SFSSA also outperforms the other algorithms. There is no discernible difference between SFSSA and other algorithms in function F8, with the exception of PSO and ChOA, all other algorithms achieving 100% of the optimal solution search rate. The good ability of SFSSA to search for optimal solutions is also demonstrated in functions F10 and F11. 3) For the low-dimensional fixed-dimensional multimodal test F12 and F13, SFSSA also outperforms the other algorithms in terms of the optimal value and standard deviation in F12 and F13. Combining the above results, it can be concluded that SFSSA is significantly better than the other algorithms in terms of optimality and stability as well as robustness.

Algorithm convergence curve analysis
To show more intuitively the convergence accuracy and optimization search capability of the algorithm, the convergence curves of these 13 functions based on the number of iterations and adaptation values are presented in Figures 4-6. As shown in Figures 4-6, the convergence curves show that SFSSA outperforms other algorithms in unimodal, multimodal, and fixed-dimensional multimodal conditions. For example, in the unimodal test functions F1-F4, SFSSA has a great improvement in the early convergence speed compared with the other six algorithms, with the fastest convergence speed and the best convergence accuracy. In the unimodal test functions F5-F7, the convergence speed of SFSSA is not as fast as the F1-F4 test functions, but the convergence effect is better than the other six algorithms. In the multimodal test function F8, the convergence accuracy of the other four algorithms, except PSO and ChOA, is also good, but the convergence speed of SFSSA is faster and better in comparison. In comparison to other algorithms, the test results of SFSSA have reasonably stable search ability in multimodal test function F9, proving that this approach is superior to others, as shown in Figure 5. In the multimodal test functions F10 and F11, the SFSSA algorithm significantly outperforms the other algorithms in terms of optimal value, mean value, and standard deviation. In the fixeddimensional multimodal test functions F12 and F13, it can be seen from the convergence plots that SFSSA converges faster compared to the other algorithms, indicating that SFSSA outperforms the other algorithms in terms of local exploitation and global search ability.
In summary, the aforementioned results aim to demonstrate that SFSSA has better global search ability and does not easily fall into local optimum, and that under the same conditions, the global search and local exploitation ability of SFSSA has relative advantages compared with the other six algorithms described in the paper. .

Wilcoxon rank sum test
To verify whether SFSSA outperforms the other four algorithms, this paper uses the Wilcoxon rank-sum test [39] to verify the significant difference between SFSSA and the other four algorithms. The significance level was set at p = 5%. When p < 5%, the original hypothesis is rejected, proving that there is a significant difference between the two algorithms; when p > 5%, the original hypothesis is accepted, proving that there is no significant difference between the two algorithms, i.e., the two algorithms are similar in terms of searching optimum. The results of the Wilcoxon rank-sum test are presented in Table 8. As shown in Table 8, the p-values of SFSSA are overwhelmingly less than 5%, which indicates that SFSSA outperforms the other six algorithms in the aspect of searching for optimal solutions.

CEC 2017 function test
In this paper, we chose to evaluate 29 test functions on CEC 2017 to show more clearly the applicability and validity of the SFSSA method and to prevent ISSA from being meaningful only when the optimal value is 0. The number of test group participants was set to 30, the number of iterations was set to 500, the CEC 2017 dimension was set to 30, the SD was set to 0.6, and all other parameters were kept constant to ensure the fairness of the experiment. The best (Best), worst (Worst), mean (Ave), and standard deviation of each method were determined by running each of the above algorithms 30 times independently (Std). Conventionally, the CEC02 function was not employed because of highdimension instability.
According to the data in Table 9, SFSSA performs better than the other algorithms in terms of the average solution accuracy across all 29 functions. In terms of average solution accuracy on 17 of the 29 functions in CEC2017, SFSSA outperforms the other six comparison methods. SFSSA optimizes effectively and can get close to each function's theoretically ideal value. Each SFSSA measure in F1, F4, F9, F11, F12, and F25 is the best among the methods. While WOA and PSO perform well in this algorithm test when the optimal solution is not 0, SFSSA performs better when trying to discover the ideal value.  The convergence curves for SFSSA and the aforementioned comparative method are presented in order to show the convergence and stability of the revised approach. The Figure 7 shows that SFSSA has strong search ability, converges quickly in the early stage, and maintains the advantage of continuous search in the later stage, demonstrating that Tent chaos improves population diversity and expands the search space. SFSSA uses the improved positive cosine algorithm to make the algorithm compensate for the problem that the original algorithm falls into local optimum and improves the convergence accuracy of the algorithm; firefly is used to prove that Tent chaos improves population diversity and increases the search space. In a nutshell, SFSSA outperforms other algorithms in terms of optimization performance, has strong generality and efficiency, and can handle some complex optimization tasks.

Background analysis and parameter setting
When facing sudden natural disasters, how to protect people's living materials becomes a critical issue, and the government needs to make emergency plans immediately. Generally, temporary relief materials reserve centers to place relief materials from all over the country are open to solving the problem of transporting relief materials to each demand point in a reasonable way.
City A in a disaster situation is taken as a case study. There are 8 alternative locations of eligible emergency material storage centers in city A, suitable ones should be selected from these 8 alternative centers as emergency material distribution centers, serving 20 demand points in the city, to minimize the total construction cost. The corresponding location coordinates of 8 alternative centers, 20 demand points, the fixed construction cost, and the quantity of material demand for each demand point are shown in Tables 10 and 11. The assumptions made in this paper are listed as follows.
1) The selected emergency material distribution center needs to meet the demand of the demand point.
2) The emergency material distribution center can only be selected among the alternative locations.
3) One demand point should only be served by one distribution center. 4) The fixed construction cost of each alternative center is given. 5) The emergency material distribution center has the maximum capacity constraint. 6) The transportation cost is proportional to the transportation volume.
The parameter symbols and their meanings are listed as follows: : number of alternative centers for emergency supplies.
: number of demand points.
: the amount of demand at each demand point j.
: number of emergency material distribution centers to open.
: capacity of distribution center . : transportation volume from distribution center to demand point j. : transportation cost from distribution center to demand point j.
: 0-1 variable, =1 indicates that distribution center is selected, otherwise, =0. : fixed cost of emergency material distribution center construction. Based on the above assumptions, the objective is to achieve the minimum cost under the constraint of maximum capacity and satisfy contingency requirements. The mathematical model is formulated as follows: Subject to: 0, 1,2, ⋯ ; 1,2, ⋯ Equation (13) represents the objective function, which is seeking the minimum fixed construction cost and total transportation cost of the emergency material distribution center. Equation (14) indicates that the selected emergency distribution center can meet demand. Equation (15) represents selecting p centers from M alternatives as emergency materials distribution centers. Equation (16) is to ensure that alternative centers do not exceed their capacity limit. Equations (17) and (18)

Results analysis
The improved SFSSA is chosen to compare with the original SSA for the emergency siting problem in this study because to the comparative findings of the aforementioned methods. The aforementioned emergency material distribution center location model was resolved by multiple experimental simulations using MATLAB software to demonstrate the benefits of SFSSA over SSA. Table 12 displays the SASSA and SSA parameters. The results of the optimization comparison between SFSSA and SSA for the emergency distribution center location problem are displayed in Table 13.  Table 13 is clear and understandable. Since the location results calculated by both algorithms are the same, so is the fixed construction cost, with a total of RMB 140,357. However, the demand points served by each distribution center are different, which leads to differences in transportation costs. The transportation cost calculated by SFSSA is RMB 47,712.0915, while that calculated by SSA is much larger, which is RMB 51,707.7721. It can be concluded that the emergency material transportation cost is less calculated by SFSSA than SSA, which proves that SFSSA has better feasibility than SSA.  Figure 8 shows the routes for the optimal location scheme for SFSSA and SSA.  The distinction is that Nos. 7 and 8 have different demand point distributions. The improved sinecosine method used in this research helps the algorithm avoid running into the optimum solution problem up front, and firefly perturbation is used to boost the original algorithm's capacity to do optimal searches. Figure 5 shows how the algorithm's search capability has improved for the demand point locations of distribution centers 5 and 7 and 8. It is also clear from the figure that SFSSA's optimal site distribution solution is more effective than SSA's. Figure 9 shows the convergence plots of SFSSA and SSA in the optimal location schemes. SFSSA and SSA optimal values of 1.8807e+05 and 1.9206e+05, respectively, were obtained from the optimal outcomes of alternative center siting ran on MATLAB, demonstrating that the SFSSA approach surpasses the SSA algorithm. Tent chaos perturbation improves the algorithm's global search ability, as does enhancing the positive cosine in the discoverer position update, which improves the algorithm's search accuracy and speeds up the algorithm's convergence. The convergence graph in Figure 9 clearly shows that the SFSSA method converges quicker and has higher convergence accuracy than the SSA approach. As a consequence, the SFSSA strategy proposed in this study is more practical and successful than the SSA approach in the application of the emergency distribution center location problem.

Conclusions
This paper proposes a sparrow search algorithm based on sine cosine and firefly perturbation. In the proposed algorithm, the diversity of the original population is optimized through Tent mapping initializing. Then the sine cosine algorithm and random inertia weights are invoked to update the discoverer position to avoid the algorithm falling into the optimum, and the convergence accuracy of the algorithm is improved. Finally, the firefly perturbation strategy is introduced to bring all sparrows closer to the optimal position and improve the optimal solution of the algorithm.
To sum up, SFSSA is shown to be more practical and effective when compared with four algorithms, namely WOA, PSO, GWO, and SSA, on 13 benchmark test functions and the Wilcoxon rank-sum test. Additionally, the above algorithms are contrasted in the CEC 2017 test function to further confirm the optimization performance of the algorithm when the optimal solution is not 0. In order to further demonstrate the viability of the SFSSA algorithm on real-world issues, the article's conclusion involves developing a mathematical model for the placement of emergency material distribution centers. In order to address real-world issues, future studies may look into expanding SFSSA to additional domains.