1 Introduction

Many challenging problems in applied mathematics and engineering sciences can be regarded as the optimization process. Optimization is defined as the selected best available solution from the set of available solutions by considering a problem’s constraints and requirements. For instance, problem optimization aims to maximize profit or quality and minimize time, cost, or risk. Some engineering problems are typically involved. As a result, it is difficult to find precise solutions to such problems in a reasonable time. The classic optimization methods are susceptible to initialization estimation and may generally converge on a local optimum. Since the search space dimensions increase by increasing the optimization problem dimensions, it is not easy to find the global optimum solution through classical methods [1, 2]. The metaheuristic algorithms solve some of these problems. Therefore, they replaced classical optimization methods to solve non-linear optimization problems due to finding high-speed global optimum solutions with fewer control parameters at low computation costs in a more straightforward way [3,4,5].

Nevertheless, most of the metaheuristic algorithms should be improved because they are unsuitable for complex problems, such as complex scheduling and planning problems, analysis of big data, complex machine learning structures, and complex modeling and classification problems. Moreover, the efficiency of metaheuristic algorithms depends on the balance between the local exploitation capability and the global exploration capacity over the exploration process. The exploitation is characterized by an algorithm capable of extracting new solutions from the search space adjacent to the existing solutions. However, the exploration capacity refers to the process of exploring new areas of a search space. It is essential to achieve an ideal balance between these two contradictory properties to improve metaheuristic algorithms’ performance. Many metaheuristic algorithms, such as differential evolution (DE) algorithm [6], gravitational search algorithm (GSA) [7], teaching learning-based optimization (TLBO) algorithm [8], Krill Herd (KH) algorithm [9], forest optimization algorithm (FOA) [10], farmland fertility algorithm (FFA) [11], water cycle algorithm (WCA) [12, 13], whale optimization algorithm (WOA) [14], fireworks algorithm (FWA) [15], marine predators algorithm (MPA) [16], water strider algorithm (WSA) [17], adolescent identity search algorithm (AISA) [18], electric fish optimization (EFO) [19], lion optimization algorithm (LOA) [20], and equilibrium optimizer (EO) algorithm [21].

The PSO is a population-based stochastic optimization technique developed by Kennedy and Eberhart in 1995 [22], inspired by bird flocking or fish schooling’s social behavior. The PSO search process is based on a series of solutions generated stochastically in the search space. This series of potential solutions a swarm, and each solution is known as a particle. Before moving in the search space, each particle adjusts its velocity concerning the best position and the best position observed by every swarm particle. Learning from itself and learning from others are known as cognitive learning and social learning, respectively. However, PSO is widely used for solving real-world problems due to its simple concept and easy implementation.

Nevertheless, PSO may show a slow convergence rate and premature convergence when solving complex and multi-dimensional multimodal optimization problems and easily get trapped into poor local optimum. Moreover, it is essential to select control parameters, such as the acceleration coefficient, inertia weight, and maximum velocity. These parameters play a balancing role between global and local search processes. These parameters’ high and low values increase the global exploration capacity and local exploitation capability, respectively. As a result, overcoming its defects is still a significant problem in PSO applications.

The BSA is a population-based stochastic optimization technique developed by Civicioglu in 2013 for solving real-valued numerical optimization problems [23]. The unique BSA method of generating trial individuals (including the mutation and crossover operators) resulted in successful solutions to many optimization problems [24, 25]. The BSA has a simple structure and uses the previous generation's population to determine the search-direction matrix and remembers this historical population until it is changed. As a result, the BSA has a memory. Although it is highly capable of global exploration due to its reluctance to use individuals with higher fitness values and historical population for solving multimodal optimization problems, it showed low local exploitation capability. It converged slowly compared with other evolutionary algorithms [26,27,28].

This paper proposed an improved PSO with BSA called PSOBSA to resolve the original PSO algorithm’s problems. The motivation to develop the PSOBSA approach is to combine the PSO’s advantages with BSA to overcome the original PSO defects by avoiding the low local optimum and increasing convergence accuracy to solve continuous optimization problems. In the proposed PSOBSA, BSA’s mutation and crossover operators were modified through the neighborhood to increase the convergence rate. In addition to that, a new mutation operator was introduced to improve the convergence accuracy and evade the local optimum.

The rest of the paper consists of the following sections. Some related works on PSO are reviewed in Sect. 2. In Sect. 3, an overview of PSO and BSA is provided. The proposed PSOBSA is presented in Sect. 4, and conducted experiments and results are presents in Sect. 5. Finally, the conclusion and future work are included in Sect. 6.

2 Related works

Since the development of PSO, extensive studies have been conducted for its theoretical understanding. Many improved and hybrid versions of PSO can be found in the literature developed to overcome its defects. These algorithms have improved the PSO performance through different methods, using various neighborhood topologies, parameter correction, combination with other optimization algorithms, and other minor changes. The hybrid versions are among the most effective methods of improving the PSO performance. They refer to the combination of two or more optimization algorithms in the PSO. Some of the improved versions are as follows:

Liu et al. [29] proposed the hybrid PSO by combining the chaos technique to improve the PSO performance. First, the adaptive inertia weight factor (AIWF) was introduced to PSO to strike a sufficient balance between the exploration and exploitation capabilities. Then, the PSO was combined with AIWF and chaos to form the chaos PSO (CPSO). In this way, the population-based evolutionary search capabilities of PSO and chaos search behavior were combined. Da and Xiurun [30] first improved the original PSO to escape from the local optimum and then used the SA to modify it. After that, an artificial neural network (ANN) was developed through the proposed PSO. According to the results, the SAPSO-based ANN had a better ability to escape from a local optimum, more excellent training performance, and better-predicting ability than the PSO-based ANN. Liang et al. proposed the comprehensive learning PSO (CLPSO) to avoid a local optimum [31]. This approach adds no complex operators to the original PSO’s simple structure and only differs from it in the velocity update equation. The best historical data of all particles were used in the proposed learning strategy to update the particle velocity. This strategy preserves the swarm diversity to avoid early convergence. The CLPSO results indicate its outstanding performance in solving multimodal problems. However, it is no good choice for solving unimodal problems.

Yu et al. [32] proposed the improved PSO and discrete PSO (DPSO) through enhancement operations using the self-adaptive evolution strategies to optimize the joint optimization of three-layer feed-forward ANN structure and parameters (weights and bias). This combination of continuous and discrete PSO enabled the ANN to evolve its structure and regulate parameters simultaneously. Zhan et al. [33] proposed the adaptive PSO (APSO) to exploit the original PSO by adding two new parameters. Moreover, their approach can explore the entire search space at a faster convergence rate. APSO has two main steps. The first step is estimating a real-time evolutionary state to identify one of the four evolutionary states, i.e., exploration, exploitation, convergence, and jumping out in each repetition, by evaluating population distribution and particle fitness. The second step is an elitist learning strategy applied to the best global particle to escape from the local optimum when the evolutionary state is classified as the convergence state. Moreover, the inertial coefficient, acceleration coefficient, and other parameters are controlled for dynamic search efficacy and convergence rate.

Alfi and Fateh [34] proposed the improved fuzzy PSO (IFPSO) for the intelligent identification and control of a dynamic system. The proposed approach optimally estimates the system parameters and controls the system by minimizing the mean squared error. In the proposed approach, the local and global exploitation ability were improved using the fuzzy inertia weight. Moreover, each particle’s inertia weight was regulated dynamically based on the particle memories through a non-linear fuzzy model. Tang et al. proposed the improved quantum-behaved PSO (QPSO) to solve ongoing large-scale problems based on the memetic algorithm and a memory mechanism [35]. Before getting involved with the evolutionary process, the memetic algorithm was used for all particles to trade-off through local optimum.

Moreover, the memory mechanism was used to introduce the bird kingdom through memory capacity. Guedria [36] proposed an improved accelerated PSO (IAPSO), a simple and effective optimization method, for solving non-linear boundary optimization problems using continuous, hybrid, discrete, and integer variables. In the proposed approach, the penalty function is used as a constraint handling technique. Its operators can update particle positions with a simple equation. As a result, it is independent of the particle velocity; thus, it is simple to understand and implement.

Ouyang et al. [37] proposed a hybrid harmony search PSO with global dimension selection (NHSPSO-GDS) to improve the original PSO performance. The HS algorithm was used with the global dimension selection strategy to enhance the exploratory capacity and the exploitation capability. In HHSPSO-GDS, a new global velocity updating strategy was introduced to enhance the neighborhood region search and the better trade-off between convergence rate and robustness. In addition, a dynamic non-linear decreased inertia weight was utilized to balance global exploration and local exploitation. Meng et al. [38] proposed a new hybrid algorithm, called the crisscross search PSO (CSPSO), to avoid local optimum and enhance global search ability. The particle population in CSPSO was updated by modifying the PSO and implementing the crisscross search optimization (CSO) [39] at each iteration. The CSO is incorporated as a high-quality evolutionary catalytic agent with the rugged capability to search for the personal best. The PSO performance was enhanced by two search operators, namely horizontal crossover and vertical crossover. The horizontal crossover further enhances the PSO global convergence ability when the vertical crossover can enhance swarm diversity. Taherkhani and Safabakhsh [40] proposed an adaptive strategy called the stability-based adaptive inertia weight (SAIW). Regardless of its size, each particle’s inertia weight is determined through the local best position’s distance and performance. Also, each particle in the search space plays a distinct role. The adaptive inertia weight is suggested concerning the particle success in two previous iterations and the displacement of its best position. The position of each swarm particle influences the inertia weight adjustment. As a result, each particle in the SAIW has its inertia weight at different dimensions.

Many PSO algorithms have recently been introduced. In [41] proposed a hybrid algorithm with simple concepts to enhance exploration and exploitation capabilities. The proposed approach used the combination of the continuous and discrete probability distribution of the ant colony optimization (ACO) to help the GA with exploration. Two mutation operators were also introduced: the standard and refined mutations. In the initial iterations, the common mutation was used commonly with the concept of an unrepeated tour of the ACO to escape from the local optimum, whereas the monitored mutation was used in the next iterations to complete the exploitation search, mainly controlled by PSO. In [42] proposed a new hybrid version of PSO and DE algorithms for engineering and numerical optimization purposes. In that hybrid approach, new non-linear strategies were adopted to reduce the inertia weight. The chaos map was utilized to balance exploration and exploitation capabilities. In [42] proposed a nonparametric PSO without regulating any parameter. The multi-crossover operation, vertical crossover, and sample-based strategy were combined to enhance the exploitation and exploration capabilities.

In [43], a hybrid algorithm based on PSO with a spiral-shaped mechanism called HPSO-SSM for selecting the optimal feature subset for classification via a wrapper-based approach has been developed. In HPSO-SSM, there are three major modifications: first, a logistic map sequence is used to tune the inertial weight, which can effectively provide diversity and facilitate the avoidance of optima in the selection process. Second, two new parameters have been introduced into the original position update formula, which can better balance exploration and exploitation. Third, a spiral-shaped mechanism is embedded in the search process to improve the search solution’s quality by enabling any candidate solution to be selected. In [44], a hybrid binary PSO with Tabu Search called HBPSO/TS to solve the set-union knapsack problem (SUKP) has been proposed. First, an adaptive penalty function is utilized to evaluate the quality of solutions during the search, exploring the feasible solution space boundary. Next, based on the characteristics of the SUKP, a novel position updating rule to the procedure, new solutions are designed. The newly generated solutions obtain the good structures of previously found solutions. A Tabu-based mutation procedure is introduced to lead the search to enter into new hopeful regions. Finally, I designed a Tabu Search procedure to improve the exploitation ability. Furthermore, other attempts at improving PSO are as follows: APSO [45], PSO-GWO [46], PSOGA [47], ELPSO [48], QPSO [49], IMFMBO [50], CGPSO [51], NP-PSO [52], IDPSO [53] and CECBPSO [54].

This section references many studies that worked in various optimization and complex issues by the BSA. In [55], a new method based on specular reflection learning (SRL) to optimize BSA has been proposed. SRL is motivated by specular reflection phenomena in physics. There is a close relationship between opposition-based learning (OBL) and SRL. OBL can be seen as a similar model to SRL. To investigate the effectiveness of RL, SRL is applied to improve BSA. The proposed BSA's SRL performance is assessed by 88 test functions extracted from the well-known CEC 2013, CEC 2014 and CEC 2017 test suites and two constrained engineering design problems. Experimental results emphasized that SRL is a more effective method for improving BSA than OBL, establishing the basis for SRL applications on other models.

In [56], BSA is applied to measure amplitude and direction of arrival (DOA) parameters of sources impinging on a uniform linear array from the Fraunhofer zone. The variant of BSAs is proposed by varying the backtracking history and individual populations for effective optimization of the fitness evaluation function based on the mean squared error between actual and measured responses. The BSA optimization model is applied to different DOA release models from distant field sources for a noisy and noise-free environment. Through statistical results based on multiple executions, evaluation studies indicate that each solver is performed using different measurements of accuracy and complexity.

A robust optimization method with the notion of OBL, namely quasi-oppositional BSA (QOBSA), for load frequency control (LFC) of the power system has been proposed [57]. Two significantly used power systems have been selected to create the efficiency of QOBSA. Complementary controllers in LFC are designed with frequency deviations and tie-line in each region as input, and QOBSA is used to optimize controller fit simultaneously. Integral error-based performance criteria are formulated to claim the tuning optimality of QOBSA. Comparisons are also made with the existing results to establish the superiority of QOBSA in terms of convergence mobility and time response measurements. The applied method's success and competence have been confirmed after penetrating renewable energy resources and power system nonlinearities. The robustness of the expanded controller has been assessed with system uncertainty and random derangement.

In [58], a multi-objective learning BSA (MOLBSA) is proposed to solve the environmental/economic dispatch (EED) problem. Two new learning schemes are designed: a leader-choosing scheme, which takes a sparse solution from an external archive as a leader; a leader-guiding scheme, which updates individuals with the leader’s guidance. These two learning schemes have outstanding efficiency in improving the uniformity and diversity of gained Pareto front. The robust solutions, accordance solution and three metrics gained by MOLBSA are further compared with those of well-known multi-objective optimization algorithms in IEEE 30-bus 6-unit test system and 10-unit test system. Simulation results showed the capability of MOLBSA in generating a well-distributed and high-quality approximation of the correct Pareto front for the EED problem.

An improved BSA (IBSA) is proposed to gain an optimal charge plan for each feasible candidate set [59]. The best-obtained solution from the useful charging programs obtained by IBSA is extracted as the final charging program. In IBSA, a mapping plan is used to make base BSA suitable to binary problems. Improvements that consist of the adjustment of historical population updating plan, the hybrid of mutation and crossover strategy of difference evaluation algorithm, a greedy local search algorithm and the reproduction operator are also made to increase the exploitation and exploration ability IBSA. The comparisons of the simulation experiment showed the effectiveness of the IBSA and the proposed algorithm’s performance.

In [60], BSA is proposed to optimize the least square support vector machine (SVM). Thus, the SVM error is replaced with a prediction error based on a sliding window design to solve the mismatch between the prediction model and the actual sample data in a time-varying system. The proficiency of the proposed model is checked by classification and regression problems. 5 Benchmark datasets check the model’s classification performance, and the regression prediction performance is checked by the dynamic liquid level of the oil production process. Compared with GA, PSO, and improved several algorithms optimized least square SVM, the simulation results show that the proposed model has higher classification accuracy, higher prediction accuracy, less computation time, and reliability for the dynamic liquid level.

3 Material and methods

This section presents the original PSO and BSA algorithms.

3.1 Particle swarm optimization

In the PSO, many independent particles are stochastically generated in the search space. Each particle is a potential solution to the optimization problem, and each swarm includes a collection of particles. A position vector represents each particle \(X_{i}\) and a velocity vector \(V_{i}\) in the search space. Moreover, it has a memory to recall its previous personal best position. The particle velocity determines the pathway and distance which a particle should travel. In each iteration, the velocity of particle \(i\) is updated using Eq. (1):

$$V_{ij} (t + 1) = V_{ij} (t) + c_{1} \varphi_{1} ({\text{Pbest}}_{ij} - X_{ij} (t)) + c_{2} \varphi_{2} ({\text{Gbest}}_{j} - X_{ij} (t)).$$
(1)

In Eq. (1), \(i = (1, 2, 3, \ldots , N)\) Moreover, \(j = (1, 2, 3, \ldots , D)\), where \(N\) and \(D\) are the swarm size and the problem dimension, respectively. \(\varphi_{1}\) and \(\varphi_{2}\) are two random numbers with uniform distribution in the range of 0 to 1. Also, \(c_{1}\) and \(c_{2}\) are the acceleration coefficients, \({\text{Pbest}}\) is the personal best position of particle \(i\), \({\text{Gbest}}\) is the global best position obtained by the swarm, and \(t\) denotes the tth iteration in the search process. The position of particle \(i\) in each iteration is updated by adding the velocity vector to the position vector, defined in Eq. (2):

$$X_{ij} (t + 1) = X_{ij} (t) + V_{ij} (t + 1).$$
(2)

The acceleration coefficient determines the particle step size for the next iteration, defined as a numerical constant. Here, \(c_{1}\) is the particle attraction towards its success (cognitive learning), and \(c_{2}\) is the particle attraction towards swarm success (social learning). In the original PSO, \(c_{1} = c_{2} = 2\) is selected. This selection leads to particles’ sudden movement, an increased convergence rate, and the reduced local exploitation of the search space.

Eberhart et al. [61] proposed a scheme to control and constraint particle velocity to prevent the particles from flying out of the search space. In that, the velocity of each component \(V_{i}\) in Eq. (1) is in the range \([ - V_{{{\text{max}}}} , V_{{{\text{max}}}} ]\). Therefore, if the velocity exceeds \(V_{{{\text{max}}}}\) in every dimension, the velocity in that dimension should be limited to \(V_{{{\text{max}}}}\). As a result, it is a critical parameter whose value determines the regions between the search item’s current position and target position. If the value of \(V_{{{\text{max}}}}\) is too high, the particle may pass the suitable positions. On the other hand, if it is too low, it may not be searched beyond the local optimum position. As a result, the high and low values of \(V_{{{\text{max}}}}\) lead to global exploration and local exploitation, respectively.

Shi and Eberhard introduced the inertia weight to gain better control over the search domain, reduce the importance of \(V_{{{\text{max}}}}\). Moreover, overcoming early convergence [62]. The inertia weight established a balance between the global and local search. With the inertia weight application, the particle velocity updating rule Eq. (1) was developed into Eq. (3):

$$V_{ij} (t + 1) = \omega V_{ij} (t) + c_{1} \varphi_{1} ({\text{Pbest}}_{ij} - X_{ij} (t)) + c_{2} \varphi_{2} ({\text{Gbest}}_{j} - X_{ij} (t)).$$
(3)

In Eq. (3), \(\omega\) is the inertia weight coefficient, either a numerical positive constant or a positive linear or non-linear function. The large and smaller inertia weight values can improve global exploration and local exploitation, respectively [62].

Two general types of the particle neighborhood, namely the global best \(({\text{Gbest}})\). Moreover, local best \(({\text{Lbest}})\) have been studied by many researchers. In \({\text{Gbest}}\), Which is a concept used in the original PSO, particles are attracted to the best position obtained by every particle of the swarm. This type represents a fully connected network in which each particle has access to all other community members’ information. On the other hand, each particle in \({\text{Lbest}}\) has access to the information of its non-mediated neighbors concerning a specific swarm topology. In other words, \({\text{Lbest}}\) is the best position found so far within a neighborhood. Here, the neighborhood does not mean the particles’ real geometrical closeness relationship but is the relationship between the particles defined by the user. After defining the neighborhood, the particle velocity update Eq. (3) was developed into Eq. (4):

$$V_{ij} (t + 1) = \omega V_{ij} (t) + c_{1} \varphi_{1} ({\text{Pbest}}_{ij} - X_{i} (t)) + c_{2} \varphi_{2} ({\text{Lbest}}_{ij} - X_{ij} (t)).$$
(4)

In Eq. (4), \({\text{Lbest}}\) is the best position in the neighborhood of the particle \(i\). The applied structures of particle neighborhood in PSO, such as ring topology [63], von Neumann topology [64], and global best version [65], were proposed to enhance the global search capability and avoid trapping into the local optimum. Kennedy et al. in [66] believe that the \({\text{Gbest}}\) topology rapidly converges on the problem solutions, but it has poorly capable of avoiding the local optimum. Whereas, the \({\text{Lbest}}\) topology can search the neighborhood of a local optimum to explore different regions. The effects of different population topologies on PSO were systematically investigated in [67]. Using 20 particles, they realized that the best performance was in the stochastic neighborhood with five particles on average. The overall PSO structure is summarized in Fig. 1.

Fig. 1
figure 1

Pseudocode of the PSO

3.2 Backtracking search optimization

BSA was proposed to make up for some evolutionary algorithms’ defects, such as the high sensitivity to the control parameters, high sensitivity to the control parameters, time-consuming computation, and premature convergence [68]. Moreover, this algorithm has a straightforward structure and includes only two control parameters to mix the search-direction matrix rate and amplitude, significantly reducing sensitivity to the control parameters’ initial values. The BSA is also a dual-population-based algorithm that uses both current and historical populations to generate promising solutions. The BSA uses three major genetic operators (selection, mutation, and crossover) to generate trial individuals and has a stochastic mutation operator. Contrary to other genetic algorithms such as DE and its derivatives (JADE, JDE, and SADE), it only uses one individual randomly selected from the previous generation. This selection is allowing BSA to perform more successfully in solving multimodal problems. The BSA also uses a non-uniform crossover operator, which is more complicated than the crossover operators used in many genetic algorithms. A unique mechanism for generating trial individuals enables it to solve numerical optimization problems successfully and fast. The underlying factors on the success of the BSA algorithm compared to other genetic algorithms are as follows:

  • BSA’s mutation and crossover operators produce very efficient trial populations in each generation.

  • BSA’s generation strategy for the parameter, which controls the search direction’s amplitude, can produce numerically large amplitude values necessary for a global search and the small amplitude values necessary for a local search in a very balanced and efficient manner. It enhances BSA’s problem-solving ability.

  • The historical population \(({\text{oldP}})\), used by BSA to calculate the search-direction matrix, belongs to the previous generation, selected randomly. As a result, the \({\text{oldP}}\) used in the next generations includes more effective individuals than the older generations' historical population. It facilitates BSA’s generation of more efficient trial individuals.

  • BSA’s crossover strategy has a non-uniform and complex structure that ensures the creation of new trial individuals in each generation. This crossover strategy enhances BSA’s problem-solving ability.

  • BSA’s boundary control mechanism helps achieve population diversity, ensuring efficient searches, even in advanced generations.

In general, the BSA can be divided into five major components: initialization, selection-I, mutation, crossover, and selection-II.

3.2.1 Initialization

In the initialization stage, the initial population is generated randomly in a uniform search space. The initial population is determined through Eq. (5):

$$P_{ij} \sim U({\text{low}}_{j} ,{\text{up}}_{j} )$$
(5)

In Eq. (5), \(i = (1, 2, 3, \ldots , N)\) and \(j = (1,2,3, \ldots ,D),\) where \(N\) and \(D\) are the population size and the problem dimension, respectively. U uniform distribution, and each \(P_{ij}\) is a target individual in population \((P)\).

3.2.2 Selection-I

In selecting I, the BSA determines the historical population \(({\text{oldP}})\) used to calculate the search-direction matrix. The old population is determined through Eq. (6):

$${\text{oldP}}_{ij} \sim U({\text{low}}_{j} ,{\text{up}}_{j} ).$$
(6)

The BSA has an option to redefine \({\text{oldP}}\) at the beginning of each iteration through the “if–then” rule in Eq. (7):

$${\text{if }}a < b{\text{ then oldP}} \,{:}{=}\, P| a,b\sim U(0,1).$$
(7)

In Eq. (7), \({:}{=}\) is the update operator. Equation (7) guarantees that the previous generation’s population is selected randomly as the \({\text{oldP}}\), and remembers this \({\text{oldP}}\) until it is changed. As a result, BSA possesses a memory. After the determination of \({\text{oldP}}\), Eq. (8) is used to randomly change individuals’ order in \({\text{oldP}}\):

$${\text{oldP}} \,{:}{=}\, {\text{permuting }}({\text{oldP}}).$$
(8)

In Eq. (8), the permuting function used is a random shuffling function.

3.2.3 Mutation

The mutation process is used for generating the initial form of the trial population, using Eq. (9):

$${\text{Mutant}} = P + F \times ({\text{oldP}} - P).$$
(9)

In Eq. (9), F controls the amplitude of mutation search-direction matrix \(({\text{oldP}} - P)\). Since \({\text{oldP}}\) is used to calculate the search-direction matrix, BSA generates the trial population by taking partisan advantage of its previous generations’ experiences.

3.2.4 Crossover

BSA’s crossover process produces the final form of the trial population (\(T\)). The initial value of the trial population is \({\text{Mutant}}\), as set in the mutation process. Trial individuals with better fitness values for the optimization problem are employed to evolve individuals’ target population. BSA’s crossover process has two steps. The first step, binary integer-valued matrix \(({\text{map}})\) of size \(N \times D\) is calculated, indicates that the \(T\) is manipulated using relevant individuals from the evolutionary population. Then, the \(T\) is updated. If \({\text{map}}_{ij} = 1\), where \(i = (1,2,3, \ldots ,N)\) and \(j = (1,2,3, \ldots ,D)\), \(T\) is updated with \(T_{ij} \,{:}{=}\, P_{ij}\).

BSA’s crossover strategy is entirely different from the crossover strategies used in DE and its variants. The mix rate parameter \(\left( {{\text{mixrate}}} \right)\) in the BSA’s crossover process controls the numbers of elements of individuals that will mutate in a trial using \({\text{mixrate}}\). The function of the mix rate is entirely different from the crossover rate used in DE. To determine the matrix \({\text{map}}\), two predefined strategies are randomly used. The first strategy uses parameter \({\text{mixrate}}\). The second strategy allows the random selection of only one individual to change each trial individually. Some individuals of the \(T\), obtained at the end of the BSA’s crossover process, can overflow the allowed search space limits due to the BSA’s mutation strategy. The individuals beyond the search space limits should be regenerated.

3.2.5 Selection-II

In the selection-II, if \(T_{i}\) that have better fitness value than the corresponding \(P_{i}\), it is used to update \(P_{i}\) based on the greedy selection. If the best individual of the population has a better fitness value than the BSA’s optimum global value, the optimum global value will be updated.

4 Proposed approach

This section will give a detailed description of the proposed PSOBSA approach for solving continuous optimization problems.

4.1 Motivations

One of the crucial criteria determining population-based stochastic optimization algorithms’ performance is balancing exploitation and exploration. The exploitation is characterized by an algorithm capable of extracting new solutions from the search space adjacent to the existing solutions. However, the exploration capacity refers to the process of exploring new areas of a search space. The original PSO in solving complex and multi-dimensional multimodal optimization problems has slow convergence rates and premature convergence, resulting in a poor local optimum. The main reason for premature convergence is that particles’ diversity decreases rapidly during the optimization process iterations.

Moreover, it is essential to select control parameters, such as the acceleration coefficient, inertia weight, and maximum velocity. These parameters play a balancing role between global and local search processes. On the other hand, BSA is proposed to solve evolutionary algorithms’ defects, such as the high sensitivity to the control parameters, time-consuming computation, premature convergence, and a robust global exploration capacity. However, there is no research on using the BSA algorithm to improve the performance and overcome the PSO’s weaknesses as far as we know. We put forward an improved PSO algorithm with BSA called PSOBSA for solving continuous optimization problems based on these considerations. This improvement includes adding a new search process with BSA’s operators (mutation and crossover) and proposed mutation to increase the diversity of particles and increase the PSO algorithm’s accuracy and convergence rate during optimization process iterations. The complete flowchart of the proposed PSOBSA is given in Fig. 2.

Fig. 2
figure 2

Flowchart of proposed PSOBSA

4.2 BSA’s mutation and crossover

In the proposed PSOBSA approach, each particle in the search space has two positions: the primary and trial positions. The neighborhood-based PSO is used to generate the leading position of the particles to take advantage of the local search capability of the PSO, and the BSA operators (mutation and crossover) are used to generate the trial position of the particles to take advantage of the global search capability BSA. The mutation and crossover operation of BSA has been modified to generate the trial position by the particle neighborhood. The historical population’s application in the BSA mutation to the direct population to global optimum concentrates on exploration. Nevertheless, the use of experiences of previous generations may reduce the convergence rate [69]. Therefore, in PSOBSA, the local best position is used instead of the mutation operator’s historical population to increase the convergence rate. Indeed, the BSA’s mutation operator in Eq. (9), which generates the trial position’s initial form, is modified in Eq. (10):

$${\text{Mutant}} = X + F({\text{Lbest}} - X).$$
(10)

In Eq. (10),\(i = (1,2,3, \ldots ,N)\) Moreover, \(j = (1,2,3, \ldots ,D)\), where \(N\) and \(D\) are the swarm size and the problem dimension, respectively. \(X\) is the primary position, \(F\) is the amplitude of the search-direction matrix, and \({\text{Lbest}}\) is the best position in the neighborhood of the particle \(i\). Before using Eq. (10) for generates the initial form of the trial position, Eq. (11) is used to randomly change the order of individuals in \({\text{Lbest}}\):

$${\text{Lbest}} \,{:}{=}\, {\text{permuting}}({\text{Lbest}}).$$
(11)

The permuting function used in Eq. (11) is a random shuffling function. Besides, \({\text{Lbest}}\) to replacement in trial position is used in the BSA’s crossover process, which generates the trial position’s final form. The process is given in Fig. 3.

Fig. 3
figure 3

Pseudocode of the crossover strategy

4.3 Proposed mutation

In the proposed PSOBSA approach, the convergence accuracy, escaping from a poor local optimum, and exploring new spaces by generated trial position in different regions has been improved by the new mutation operator introduced in Eq. (12):

$$T_{ij} = X_{ij} + A( \varphi \times {\text{Lbest}} - X_{ij} ).$$
(12)

In Eq. (12), \(T_{i}\) is the trial position, A is a coefficient vector, \(\varphi\) is a random number with uniform distribution in the range of (0, 1), and \({\text{Lbest}}\) is the best position in the neighborhood of the particle \(i\). This paper uses the value \(A = 2 \times {\text{rand}}\), where \({\text{rand}}\sim U(0,1).\)

4.4 Procedure of PSOBSA

The detailed step-by-step procedure for the proposed PSOBSA approach is described in Fig. 4.

  • Step 1 Initialization. The control parameters are swarm size, inertia weight, acceleration coefficients, mix rate, coefficient vector, mutation probability, neighborhood size, and termination criterion. The initial swarm are as follows: the central position vector \(X_{i}\) is generated randomly within the search space, the initial trial position vector, and velocity \(T_{i} = 0\) and \(V_{i} = 0\), particle’s personal best position \({\text{Pbest}}_{i} = X_{i}\). Moreover, update global best \(({\text{Gbest}})\). Moreover, the determination of the particle’s neighborhood is done at this step. The stochastic technique is used to determine particle neighborhoods in PSOBSA. So, the neighbors of the particle \(i\) are randomly selected based on the number of neighborhood sizes (NS).

  • Step 2 Selection-I. In this step, the PSOBSA determines the local best \({\text{(Lbest)}}\). Thus, the personal best position in the neighborhood, which has the best value of the fitness function, is chosen as \({\text{Lbest}}\) of particle \(i\). If there are several best positions, one is chosen at random.

  • Step 3 Main position generation. In this search phase, for every particle \(i\), the particle's velocity is adjusted by Eq. (4). Then, the new generated central position \(X_{i}\) is achieved by Eq. (2).

  • Step 4 Trial position generation. The trial position of particle \(i\), is generated using the mutation and crossover operation on their central position. The selection between the BSA’s modified mutation operator in Eq. (10) and the proposed mutation operator in Eq. (12) is based on the probability of mutation \({\text{(PM)}}\). In that, a random number is generated in the range of 0 and 1. If the random number is smaller than the \({\text{PM}}\), the mutation operator of Eq. (12) is selected. Otherwise, first, the permutation function in Eq. (11) is used to randomly change the order of individuals in \({\text{Lbest}}\). Then, the mutation operator is selected in Eq. (10) to generate the mutated position. It is the mutated position of the initial form of the trial position. In the end, the crossover process is used to produce the final form of a trial position. The crossover process consists of two stages. In the first stage, the binary integer-valued matrix called map is determined to show that the trial position components are manipulated with \({\text{Lbest}}\). In the second step, the \(T\) is updated. Two predefined strategies from BSA are randomly used. The first strategy uses parameter \({\text{mixrate}}\) (Fig. 3, line 3). The second strategy allows for the random selection of only one component for change in a trial position (Fig. 3, line 5). Equations (11) and (12) globally influence hybrid model search changes, allowing the hybrid model to discover the best points and strike a balance between exploration and exploitation.

  • Step 5 Selection-II. In PSOBSA’s selection-II step, the \(T_{i}\) that have better fitness values than the corresponding \(X_{i}\) are used to update the \(X_{i}\) based on a greedy selection. In the end, the \({\text{Pbest}}_{i}\), and \({\text{Gbest}}\) are updated. Thus, if \(X_{i}\) is that have better fitness values than \({\text{Pbest}}_{i}\), the \({\text{Pbest}}_{i}\) is updated by \(X_{i}\). After that if \({\text{Pbest}}_{i}\) has a better fitness value than the global best solution obtained so far, the \({\text{Gbest}}\) is updated by \({\text{Pbest}}_{i}\).

  • Step 6 Termination criterion. If the termination criterion (maximum number of iterations) is met, computation is terminated. Otherwise, steps 2 to 6 are repeated.

Fig. 4
figure 4

Pseudo code of the PSOBSA

5 Experiments result

In this section, the details of the experimental tests, statistical analyses, optimization problems, and control parameters used in the proposed PSOBSA and other compared algorithms were provided along with statistical results. Three experimental tests are used to investigate the performance of the proposed PSOBSA from different aspects based on several well-known benchmark functions. The first test is used to validate the comprehensive performance of the proposed PSOBSA by comparison with other well-known metaheuristic algorithms. The second test is used to measure the effects of the proposed mutation on PSOBSA. The third test is used to validate the comprehensive performance of the proposed PSOBSA by comparison with other state-of-the-art PSO variants. The aim of the last test to further exhibit the excellent performance of the proposed PSOBSA. All tests and statistical analyses were conducted in MacOS Mojave’s environment using a computer with an Intel Core i5 processor with a clock speed of 2 GHz and 8 GB RAM. Moreover, MATLAB R2017b MathWorks, Inc. software tool was used for the execution of algorithms.

There are 70 benchmark functions used for experiments as optimization problems. Many researchers have used these classical functions (Tables 1, 2, 3 and 4) [70,71,72,73]. In general, these 70 benchmark functions are the minimization problems and can be classified into four groups. Group 1 includes multi-dimensional unimodal functions F01–F12. Group 2 contains fixed-dimension unimodal functions F13–F19. Group 3 consists of multi-dimensional multimodal functions F20–F31, and group 4 includes fixed-dimension multimodal functions F32–F70. The unimodal functions have only one optimum value and are suitable for evaluating the local search ability of the PSOBSA.

Table 1 The multi-dimension unimodal benchmark problems
Table 2 The fixed-dimension unimodal benchmark problems
Table 3 The multi-dimension multimodal benchmark problems
Table 4 The fixed-dimension multimodal benchmark problems

On the other hand, the multimodal problems have many local optimums, and the number of their optimum local increases exponentially by increasing the problem dimensions, which can make them suitable for evaluating the global search ability of the PSOBSA. In Tables 1, 2, 3 and 4, the columns “Optimum” gives the optimum global value, and “Range” defines the lower and upper bounds of the definition domain in all dimensions. Moreover, column “D” is the benchmark problem dimension.

5.1 Comparisons of PSOBSA with other well-known metaheuristic algorithms

In this section, the performance of proposed PSOBSA is compared with PSO [63, 74], BSA [23], WOA [14], GWO [75], SSA [76], TLBO [8], WCA [12, 13], DE [6] on different benchmark problems. Solutions obtained are listed in results tables in the form of scientific notation with decimal place 2. The parameter configurations of these algorithms are according to the corresponding references, which are shown in Table 5.

Table 5 The parameters of the algorithms and their values

Regarding the stochastic nature of metaheuristic algorithms, they may arrive at better or worse solutions than the earlier solutions reached during the search for new solutions to the problem. As a result, statistical instruments are employed to evaluate problem-solving success and compare an optimization algorithm with other methods. The simple statistical indices (best, mean, and standard deviation of the best solutions), obtained using an algorithm in solving a specific problem, under different initializations, only offer information about the algorithm’s behavior in dealing with that specific problem. The test results are summarized in Tables 6, 7, 8, 9 and 10. Where “Best”, “Mean”, and “Std.” are three evaluative indices that represent optimum value, the mean and standard deviation of the best solutions, where the algorithms are ranked based on the mean best solutions. The final ranks illustrated the performance of the nine algorithms in terms of the mean best solutions. Algorithms find the best value for the benchmark problem ranks 1st, worst algorithm rank 9th while the other algorithms rank between 1st and 9th.

Table 6 Comparison of optimization results obtained for the multi-dimension unimodal benchmark problems
Table 7 Comparison of optimization results obtained for the fixed-dimension unimodal benchmark problems
Table 8 Comparison of optimization results obtained for the multi-dimension multimodal benchmark problems
Table 9 Comparison of optimization results obtained for the fixed-dimension multimodal benchmark problems
Table 10 Comparison of optimization results obtained for the Rosenbrock problem

Table 5 shows the initial values of control parameters of metaheuristic algorithms used in this test. For the proposed PSOBSA, the inertia weight coefficient is set the random numerical in the range of (0.1, 0.8), the acceleration coefficients are set as \(c_{1} {\text{ and }}c_{2} = 1.4962\), the parameters mix rate, neighborhood size, and mutation probability are set to 1.0, 10, and 0.2, respectively, the parameters F and A are set to \(2 \times {\text{rand(}}0,1{)}\). The standard control parameters, such as population size and a maximum number of iterations, were set at 40 and 100. For each benchmark problem, each algorithm is performed 30 times independently to obtain statistical results. In Tables 6, 7, 8, 9 and 10, for the problems with an optimal value of zero, if the algorithms obtain solutions of the near-optimal value, the results are shown in the scientific notation with decimal place 2.

The unimodal problems without local optimum, best solution accuracy are the paramount criterion to compare the performance of proposed PSOBSA with different algorithms. However, as shown in Tables 6 and 7, PSOBSA in unimodal benchmark problems can find solutions with exact optimal value or highest accuracy. These findings show that the PSOBSA has a robust local search ability and high convergence accuracy in unimodal problems. Comparisons of the algorithms on multimodal problems are reported in Tables 8 and 9. These problems contain several local optimums, and the number of their optimum local increases exponentially by increasing the dimensions, which may lead to premature convergence of PSO algorithms. If a particle enters into a local optimum, it can hardly fly out of it. As shown in Tables 8 and 9, PSOBSA can find solutions with exact global optimal or near-global optimal value. It means that PSOBSA has a strong global search ability and can effectively maintain population diversity in multimodal problems.

As shown in Table 6, the PSOBSA can obtain the best results than other F1–F12 problems. For problem F06, PSOBSA can find the highest accuracy solution and has a 1 with a standard deviation of 0, which indicates that PSOBSA has high exploitation and strong stability. The sum rank PSOBSA is significantly better than the other algorithms, and it has the first final rank compared to them. In this table, the DE and BSA provide poor results, and they have the worst rank, respectively. In the Figs. 5, 6, 7 and 8, the vertical ordinate is denoted by the fitness problem value that is each iteration achieved by PSOBSA and other algorithms. As shown in Fig. 5, the PSOBSA has higher convergence accuracy than other competitor algorithms in all multi-dimensional unimodal problems.

Fig. 5
figure 5figure 5

The convergence curves of PSOBSA and other algorithms on F1–F12 problems

Fig. 6
figure 6

The convergence curves of PSOBSA and other algorithms on F13, F15, F16, and F17 problems

Fig. 7
figure 7

The convergence curves of PSOBSA and other algorithms on F20 and F22–F30 problems

Fig. 8
figure 8figure 8

The convergence curves of PSOBSA and other algorithms on F34–F45 problems

According to the diagrams results, it is clear that the PSOBSA model has been able to find the optimal solution by 100 iterations. The PSOBSA model obtained the optimal value for the functions by taking advantage of the optimal parameters and discovering the search space’s optimal positions more accurately. Other models must be repeated at least 500 times to achieve the optimal solution.

For problem F08 (Rosenbrock), the algorithms do not find the optimal or near-optimal value. Because in this problem, by increasing the dimension of the problem, its complexity increases and works like multimodal problems. Therefore, to compare the performance of the proposed PSOBSA in this problem, the termination conditions of the algorithms should be appropriate. In this test, the maximum number of iterations is considered 10,000.

As shown in Table 10, the performance of the proposed PSOBSA and different algorithms are evaluated on the Rosenbrock problem in different dimensions. For the ten dimensions, BSA and DE can find the exact optimal value, and they have rank 1 and rank 2, respectively. After BSA and DE, PSOBSA is third-ranked for the 20 dimensions, PSOBSA can find the highest accuracy and has rank 1. For the 30 dimensions, PSOBSA can find the exact optimal value and has rank 1. The WOA and GWO provide poor results for all dimensions, and the SSA has the worst rank.

In summary, the sum rank PSOBSA is significantly better than the other algorithms, and it has better performance in high dimensions and first final rank compared with the other algorithms. The SSA, GWO, and WOA have the worst rank, respectively. According to Fig. 9, PSOBSA has higher convergence accuracy, and SSA, GWO, and WOA have lower convergence accuracy than all algorithms in 20 and 30 dimensions for the Rosenbrock problem.

Fig. 9
figure 9

The convergence curves of PSOBSA and other algorithms on the Rosenbrock problem. a 20 dimensions, b 30 dimensions

For problem F13, PSOBSA and WCA reach the best global minimum, but PSOBSA has a better mean and standard deviation of the best solutions, and it also has rank 1. For problem F14, PSOBSA, PSO, and WCA can find the exact optimal solution, but only PSOBSA has rank 1 with a standard deviation of 0. For problem F15, PSOBSA reaches the best global optimum value, and the standard deviation is zero. Also, TLBO and WCA obtain the best global minimum, but their results are not stable. For problem F16, PSOBSA can find the solution with the highest accuracy and has rank 1. For problem F17, PSOBSA and WCA can find the exact optimal value, but PSOBSA has a better mean and standard deviation. For problem F18, PSOBSA and TLBO reach the best global minimum, and they have zero standard deviation. Also, WOA, GWO, WCA, and DE obtain the best global minimum, but their results are not stable. For problem F19, only PSOBSA can find the exact optimal value and has a rank of 1.

As shown in Table 7, the sum rank PSOBSA is significantly better than the other algorithms, and it has the first final rank compared with the other algorithms. Also, BSA and WOA provide poor results, and they have the worst rank, respectively. As shown in Fig. 6, F13, F15, and F17, PSOBSA after WCA has the highest convergence rate. Also, for problem F16, PSOBSA has higher convergence accuracy than other algorithms. The above analysis showed that PSOBSA had influential local exploitation, convergence accuracy, and stability in solving unimodal benchmark problems.

Comparisons of the algorithms on multimodal problems are reported in Tables 8 and 9. These problems contain several local optimums, and the number of their optimum local increases exponentially by increasing the problem dimensions, which may lead to premature convergence of PSO algorithms. If a particle enters into a local optimum, it can hardly fly out of it. As shown in Tables 8 and 9, PSOBSA can find the exact global optimal or near-global optimal value. It means that PSOBSA has a strong global search ability and can effectively maintain population diversity. For problem F20, only PSOBSA can find the solution near-global optimal value and has rank 1. For problem F21, PSOBSA, WOA, and TLBO can find the exact global optimum value, and they have rank 1.

For problem F22, PSOBSA and WOA can find the exact optimal value, but only PSOBSA has a 1 with a standard deviation of 0. For problems F23, F25–F26, and F28–F29, PSOBSA can find the highest accuracy solution and has rank 1. For problems F24, PSOBSA can find the solution with the highest accuracy and has rank 1 with a standard deviation of 0, which indicates that PSOBSA has high exploration and strong stability. For problem F27, only PSOBSA can find the exact optimal value, and it has rank 1 with a standard deviation of 0. For problems F30, only PSOBSA can find the exact global optimal value and has rank 1. For problems F31, all algorithms other than BSA, WOA, and GWO can find the exact global optimal value, and after TLBO, PSOBSA is second-ranked.

As shown in Table 8, the sum rank PSOBSA is again significantly better than the other algorithms, and it has the first final rank compared with the other algorithms. Also, DE and BSA provide poor results, and they have the worst rank, respectively. As shown in Fig. 7, For problem F22, PSOBSA has a higher convergence rate than other algorithms. For problems F20 and F23–F24, PSOBSA has higher convergence accuracy than other algorithms. For problem F27, PSOBSA has a higher convergence rate than WOA and other algorithms.

For problems F25–F26 and F28–F30, PSOBSA has higher convergence accuracy than other algorithms. For problems F32–F33, all algorithms can find the exact global optimal value, but on problems F32, only PSOBSA has a better mean and standard deviation of the best solutions, and it also has rank 1, and on problem F33, PSOBSA, GWO, and TLBO have rank 1 with standard deviation 0. For problem F34, PSOBSA, TLBO, and WCA can find the highest accuracy, but PSOBSA and WCA have a better mean and standard deviation of the best solutions, and it also has rank 1. For problem F35, PSOBSA and WCA can find the exact global optimal value, but only PSOBSA has a better mean of the best solutions, and it also has rank 1. For problems F36–F37, F39–F40, PSOBSA can find the highest accuracy and has a rank of 1. For problems F38, PSOBSA and WCA can find the exact global optimal value, but only PSOBSA has a better mean and standard deviation of the best solutions, and it also has rank. For problem F41, PSOBSA, TLBO, WCA, and DE reach the best global minimum and have zero standard deviation. Also, WOA obtains optimal global value, but its results are not stable. For problem F42, PSOBSA, GWO, TLBO, and DE reach the best global minimum, and they have zero standard deviation. Also, WOA and WCA obtain optimal global value, but their results are not stable.

For problem F43, PSOBSA, TLBO, and WCA reach the best global minimum and have zero standard deviation. Also, GWO and DE obtain optimal global value, but their results are not stable. For problem F44, PSOBSA, GWO, and TLBO reach the best global minimum, and they have zero standard deviation. Also, WOA, WCA, and DE obtain optimal global value, but their results are not stable. For problem F44, PSOBSA, GWO, and WCA reach the best global minimum and have zero standard deviation. Also, WOA, SSA, TLBO, and DE obtain optimal global value, but their results are not stable. For problem F46, all algorithms other than BSA can find the exact global optimal value, but PSOBSA has a better mean and standard deviation of the best solutions, and it also has rank 1. For problems F47, F53–F56, F58–F59, all algorithms can find the exact global optimal value, but PSOBSA has a better mean and standard deviation of the best solutions, and it also has rank 1. For problems F48–F49, F52, and F62, all algorithms can find the exact global optimal value. In this problem, PSOBSA, TLBO, WCA, and DE have rank 1. For problem F50, PSOBSA, PSO, and WCA can find the exact global optimal value, but only PSOBSA has a better mean of the best solutions, and it also has rank 1.

For problem F51, all algorithms can find the exact global optimal value, but only PSOBSA has a standard deviation of 0, indicating that PSOBSA has high exploration and strong stability. For problem F57, all algorithms can find the exact global optimal value, and BSA has rank 1. The PSOBSA in this problem has rank 5. For problem F60, PSOBSA, PSO, BSA, SSA, TLBO, WCA, and DE has rank 1. For problem F62, PSOBSA, SSA, and TLBO can find the exact global optimal value, but only PSOBSA has rank 1. For problem F63, only PSOBSA can find the exact global optimal value and has rank 1. For problem F64, all algorithms other than WOA and GWO can find the exact global optimal value, and TLBO has rank 1. The PSOBSA in this problem has rank 5. However, PSO and WCA can find the exact global optimal value. The best solutions obtained from these algorithms worse than all algorithms and have the worst rank. For problems F65 and F66, all algorithms other than BSA, WOA, and GWO can find the exact global optimal value, and DE has rank 1. The PSOBSA in this problem has rank 5. For problem F67, PSOBSA, TLBO, and DE have rank1. For problem F68, all algorithms other than WOA can find the exact global optimal value, and TLBO has rank 1. Moreover, the PSOBSA has rank 5. Although PSO can find the exact global optimal value, the best solutions obtained this algorithm worse than all algorithms and have the worst rank. For problem F69, all algorithms other than BSA, WOA, and GWO can find the exact global optimal value. The PSOBSA in this problem has rank 3. For problem F70, PSOBSA and TLBO can find the exact global optimal value, but only PSOBSA has rank 1.

As shown in Table 9, the sum rank PSOBSA is significantly better than the other algorithms, and it has the first final rank compared with the other algorithms. In this table, the WOA and SSA provide poor results and have the worst rank. As shown in Fig. 8, For problem F34, PSOBSA has a higher convergence rate than WCA and other algorithms. For problems F35 and F38, PSOBSA after WCA has the highest convergence rate. For problems F36–F37 and F39, PSOBSA has higher convergence accuracy than other algorithms. For problem F41–F45, PSOBSA has a higher convergence rate than other algorithms. For problem F40, PSOBSA has higher convergence accuracy than other algorithms.

In summary, according to the above analysis results of unimodal benchmark problems, the PSOBSA can find the highest accuracy and exact optimal value. Therefore, the PSOBSA has high exploitation ability and convergence accuracy. In multimodal benchmark problems, the PSOBSA can find the exact global optimum or near optimum global value and avoid local optimum solutions. Therefore, PSOBSA has a high global exploration ability.

5.2 The effect of the proposed mutation on PSOBSA

As a unique constituent element of PSOBSA, the search process by proposed mutation plays a vital role in increase convergence when solving the unimodal problems and preventing premature convergence when solving the multimodal problems. To investigate the effect of the search process by a proposed mutation on PSOBSA, we done the comparative experiments on eight benchmark problems: F01 (Sphere), F02 (Schwefel 1.2), F04 (Schwefel 2.21), and F10 (Zakharov), which are listed in Table 1 and F22 (Griewank), F23 (Salomon), F26 (Powell) and F27 (Rastrigin), which are listed in Table 3.

In this experiment, the number of particles was set to 40, the maximum number of iterations is set to 100, and other parameters are the same as that first experiment. The typical convergence curves of the PSOBSA with and without the search process by proposed mutation are illustrated in Figs. 10 and 11. As shown in Fig. 10, it can be seen that on the multi-dimension unimodal problems F01F02, F04, and F10, the PSOBSA without the search process by proposed mutation compares poorly with the complete PSOBSA in terms of convergence accuracy. It indicates that the search process by proposed mutation plays a vital role in increase convergence in solving such complex problems. According to Fig. 11, we observe that the PSOBSA without the search process by proposed mutation suffers the premature convergence problem in the optimizations on all four of the multimodal problems of F22, F23, F26, and F27.

Fig. 10
figure 10

The convergence curves of PSOBSA with and without the search process by proposed mutation for F01–F02, F04, and F10

Fig. 11
figure 11

The convergence curves of PSOBSA with and without the search process by proposed mutation for F22–F23 and F26–F27

5.3 Comparison of PSOBSA with several state-of-the-art PSO variants

In this section, the performance of proposed PSOBSA is compared with CLPSO [79], PSOCO [79], LPSO [67], VPSO [67], APSO [33], OLPSO [80], CAPSO [81], NHPSO [82], PSOTD [83], FIPS [84] and GL-PSO [85] on thirteen benchmark problems, which are listed in Tables 1 and 4. The parameter configurations of these algorithms are according to the corresponding references, which are shown in Table 11.

Table 11 The parameters of the algorithms and their values

For the proposed PSOBSA, the inertia weight coefficient is set the random numerical in the range of (0.1, 0.8), the acceleration coefficients are set as \(c_{1} {\text{ and }}c_{2} = 1.4962,\) the parameters mix rate, neighborhood size, and mutation probability are set to 1.0, 10, and 0.2, respectively, the parameters F and A are set to \(2 \times {\text{rand(}}0,1{)}\), the population size and a maximum number of iterations are set to 40 and 2000, respectively, and the maximum number of iterations for problem F08 is considered 10,000 because of high complexity. For each benchmark problem, each algorithm is performed 30 times independently to obtain statistical results. In Table 12, for the problems with an optimal value of zero, if the algorithms obtain near-optimal value solutions, the results are shown in the scientific notation with decimal place 2.

Table 12 Comparison of PSOBSA with PSO variants on 13 benchmark problems

Table 12 shows the mean and standard deviation of each algorithm’s best solutions on thirteen benchmark problems, where the algorithms are ranked based on the mean best solutions. The unimodal problems without local optimum, best solution accuracy are the paramount criterion to compare the proposed PSOBSA with state-of-the-art PSO variants. However, as shown in Table 12, PSOBSA can find the exact optimal value in unimodal benchmark problems, indicating that PSOBSA has better performance and high convergence accuracy. For problems F01 and F05, the PSOBSA, CAPSO, and NHPSO can find the exact optimal value, and they have rank 1. The FIPS and CLPSO provide poor results, and they have the worst rank, respectively. For problem F02, PSOBSA and CAPSO can find the exact optimal value, and they have rank 1. The local topology of PSO (LPSO) and FIPS provide poor results and have the worst rank. For problem F07, all algorithms can find the exact optimal value, and they have rank 1. For problem F08, PSOBSA can find the highest accuracy and has rank 1. The VPSO and GPSO provide poor results, and they have the worst rank, respectively. For problem F09, only PSOBSA can find the exact optimal value. For problem F11, after NHPSO, PSOBSA is second-ranked. The PSOCO and OLPSO-L provide poor results, and they have the worst rank, respectively.

Comparisons of the algorithms on multimodal problems F22, F24, and F27–F30 are reported in Table 12. These problems contain several local optimums, which may lead to premature convergence of PSO algorithms. As shown in Table 12, PSOBSA, PSOCO, OLPSO-L, NHPSO, and PSOTD, are not trapped in the low local optimum of the problem F22. On the contrary, the other nine algorithms have seen difficulties locating the global optimum of problem F22 because this problem has many local optimums being far from the global optimum. For problem F24, after NHPSO, PSOBSA is second-ranked, and OLPSO-L has a standard deviation of 0 on this problem. For problem F27, the PSOBSA, PSOCO, OLPSO-L, NHPSO, and PSOTD can find the exact global optimal value and rank 1. The other nine algorithms are trapped in a poor local optimum. For problems F28 and F29, the PSOBSA, PSOCO, OLPSO-L, PSOTD, and GL-PSO can find the exact global optimal value and rank 1. The other algorithms are trapped in a poor local optimum.

Problem F30 (Schwefel) is a complex multimodal problem with a significant number of local optimums. For this problem, an algorithm maintaining more extensive diversity is more likely to yield good results. It can be observed in Table 12 that PSOBSA performs the best on this problem (mean and standard deviation), which means that the BSA’s mutation and crossover operation modified by the particle neighborhood with search process by proposed mutation effectively maintains the population diversity. This success owes much to the mutation operation, diversifying the solution and diversifying particles' search most. In general, in terms of solution accuracy, the PSOBSA performs the best in five out of the six multimodal problems with fewer iterations than the other algorithms.

6 Conclusions and future work

This paper proposed an improved PSO with BSA called PSOBSA to resolve the original PSO algorithm’s problems for solving continuous optimization problems. In the proposed PSOBSA approach, the BSA’s mutation and crossover operation were modified through the particle’s neighborhood to increase the convergence rate. Moreover, a new mutation operator was introduced to improve the convergence accuracy and evade the local optimum. The search process by proposed mutation plays a vital role in increase convergence when solving the unimodal problems and preventing premature convergence with maintaining more considerable diversity when solving the multimodal problems, which is shown in the second experiment. As shown in the first experiment, the sum rank PSOBSA is significantly better than the other algorithms, and it has the first final rank compared with the other algorithms. The criteria showed that the PSOBSA produced better performance than the PSO, BSA, and other well-known metaheuristic algorithms. The third experiment indicates that the PSOBSA has better-searching performance than most of the other state-of-the-art PSO variants. This success owes much to the mutation operation, diversifying the solution and diversifying particles’ search most. We intend to develop a binary and multi-objective version of the PSOBSA to solve real-world problems in future works.