Abstract
An algorithm with different parameter settings often performs differently on the same problem. The parameter settings are difficult to determine before the optimization process. The variants of particle swarm optimization (PSO) algorithms are studied as exemplars of swarm intelligence algorithms. Based on the concept of building block thesis, a PSO algorithm with multiple phases was proposed to analyze the relation between search strategies and the solved problems. Two variants of the PSO algorithm, which were termed as the PSO with fixed phase (PSOFP) algorithm and PSO with dynamic phase (PSODP) algorithm, were compared with six variants of the standard PSO algorithm in the experimental study. The benchmark functions for singleobjective numerical optimization, which includes 12 functions in 50 and 100 dimensions, are used in the experimental study, respectively. The experimental results have verified the generalization ability of the proposed PSO variants.
1. Introduction
Particle swarm optimization (PSO) algorithm is a populationbased stochastic algorithm modeled on the social behaviors observed in flocking birds [1, 2]. As a wellknown swarm intelligence algorithm, each particle, which represents a solution in the group, flies through the search space with a velocity that is dynamically adjusted according to its own and its companion’s historical behaviors. The particles tend to fly toward better search areas throughout the search process [3].
Many swarm intelligence algorithms have been proposed to solve different kinds of problems, which include single or multipleobjective optimization and realworld applications. These algorithms include particle swarm optimization algorithm [1, 2], brain storm optimization (BSO) algorithm [4–6], and pigeoninspired optimization (PIO) [7], just to name a few. Usually, a kind of swarm intelligence algorithm has many variants, which have different search strategies or parameters. Take the PSO algorithm as an example; for singleobjective optimization, there are adaptive PSO algorithm [8], timevarying attractor in PSO algorithm [9], interswarm interactive learning strategy in PSO algorithm [10], triple archives PSO algorithm [11], social learning PSO algorithm for scalable optimization [12], PSO variant for mixedvariable optimization problems [13], etc. For multiobjective optimization, there are adaptive gradient multiobjective PSO algorithm [14], coevolutionary PSO algorithm with bottleneck objective learning strategy [15], normalized ranking based PSO algorithm for manyOBJECTIVE optimization [16], etc. Besides, the classical PSO algorithm and its variants have been used in various realworld applications [17], such as searchbased data analytics problems [18]. Different variants of optimization algorithms have different components and strategies during the search process. The designing of proper components and strategies is vital for a search algorithm before solving the problem.
The building blocking thesis could be embedded into the genetic algorithm [19]. Building blocks indicate the components from all levels to understand and recognize the complex things or structures. An evolutionary computation algorithm could be divided into several components with the building block thesis. In the PSO algorithm, there are several components. The different settings of parameters, structures, and strategies of the PSO algorithm could perform differently on the same problem. Thus, the proper setting of the optimization algorithm is vital for the solved problem. However, there is no favorable method that could find out the best setting before the optimization. Many approaches have been introduced to analyze the components of the PSO algorithm. For example, the setting of parameter size in the PSO algorithm was surveyed and discussed in [20].
Based on the building block thesis, a PSO algorithm with multiple phases was proposed in this paper. This paper could be useful for understanding the search components in the PSO algorithm and designing the PSO algorithm for specific problems. It has two targets in this paper.(1)For the theoretical analysis of the PSO algorithm, the effectiveness of different components of various PSO algorithms, such as inertia weight, acceleration coefficient, and topology structures is studied(2)For the application of the PSO algorithm, more effective PSO algorithms could be designed for solving different realworld applications
The remainder of this paper is organized as follows. The basic PSO algorithm and topology structure were briefly introduced in Section 2. Section 3 gives an introduction to the proposed PSO algorithms with multiple phases. In Section 4, comprehensive experimental studies are conducted on 12 benchmark functions with 50 or 100 dimensions to verify the effectiveness of the proposed algorithms, respectively. Finally, Section 5 concludes with some remarks and future research directions.
2. Backgrounds
PSO algorithm is a widely used swarm intelligence algorithm for optimization. It is easy for understanding and implementation. A potential solution, which is termed as a particle in PSO algorithm, is a search point in the solution space with dimensions. For each particle, it is connected with two vectors, i.e., the vector of velocity and the vector of position. Normally, the number of particles is from 1 to and the index of the particles or solutions is represented by notation . The number of dimensions is from 1 to and the index of the dimensions is represented by notation . The is the total number of particles and is the total number of dimensions. The position of the th particle is represented as , . is the value of the th dimension for the th solution, where , and . The velocity of a particle is labeled as , .
2.1. Particle Swarm Optimization Algorithm
The basic process of PSO algorithm is given in Algorithm 1. There are two equations, the update of velocity and position for each particle, in the basic process of PSO algorithm. The framework of canonical PSO algorithm is shown in Figure 1. The fitness value is evaluated based on the calculation on all dimensions, while the update on the velocity or position is based on each dimension. The update equations for the velocity and the position are as follows [17, 21]:where denotes the inertia weight, and are two positive acceleration constants, and is a random function to generate uniformly distributed random numbers in the range . is termed as personal best at the th iterations, which refers to the best position found so far by the th particle, and is termed as local best, which refers to the position found so far by the members in the th particle’s neighborhood that has the best fitness value. The parameter was introduced to control the global search and local search ability. The PSO algorithm with the inertia weight is termed as the canonical/classical PSO.

The position value of a particle was updated in the search space at each iteration. The velocity update equation is shown in equation (1). This equation has three components: the previous velocity, cognitive part, and social part. The cognitive part indicates that a particle learns from its own searching experience, and correspondingly, the social part indicates that a particle can learn from other particles or learn from the good solutions in the neighborhood.
2.2. Topology Structure
Different kinds of topology structures, such as a global star, local ring, four clusters, or Von Neumann structure, could be utilized in PSO variants to solve various problems. A particle in a PSO with a different structure has a different number of particles in its neighborhood with different scope. Learning from a different neighbor means that a particle follows a different neighborhood (or local) best; in other words, the topology structure determines the connections among particles and the strategy used in the propagation process of searching information over iteration.
A PSO algorithm’s ability of exploration and exploitation could be affected by its topology structure; i.e., with a different structure, the algorithm’s convergence speed and the ability to avoid premature convergence will be various on the same optimization problem, because a topology structure determines the search information sharing speed or direction for each particle. The global star and local ring are the two typical topology structures. A PSO with a global star structure, where all particles are connected, has the smallest average distance in the swarm, and on the contrary, a PSO with a local ring structure, where every particle is connected to two near particles, has the largest average distance in swarm [22].
The global star structure and the local ring structure, which are two commonly used structures, are analyzed in the experimental study. These two structures are shown in Figure 2. Each group of particles has 16 individuals. It should be noted that the nearby particle in the local structure is mostly based on the index of particles.
(a)
(b)
3. Particle Swarm Optimization with Multiple Phases
The search process could be divided into different phases, such as the exploration phase and the exploitation phase. A discussion has been given on the genetic diversity of an evolutionary algorithm in the exploration phase [23]. To enhance the generalization ability of the PSO algorithm, multiple phases could be combined into one algorithm. The PSO algorithm is a combination of several components. Each component could be seen as a building block of a PSO variant. Some changeable components in PSO algorithms are shown in Figure 3. The setting of a component is independent of other components. Normally, the parameters’ settings, topology structure, and other strategies should be determined before the search process. There are three wellknown standard PSO algorithms, namely, the standard PSO algorithm by Bratton and Kennedy (SPSOBK) [24], the standard PSO algorithm by Clerc (SPSOC) [25], and the canonical PSO (CPSO) algorithm By Shi and Eberhart [26].
Different search phases are emphasized for PSO variants because it performs differently when solving different kinds of problems. Thus, to utilize the strengths of different variants, a PSO algorithm could be a combination of several PSO variants. For example, the global star structure could be used at the beginning of the search to obtain a good exploration ability, while the local ring structure could be used at the ending of the search to promote the exploitation ability. The basic procedure of the PSO algorithm with multiple phase strategy (PSOMP) is given in Algorithm 2. The setting of phases could be fixed or dynamically changed during the search. To validate the performance of different settings, two kinds of PSO algorithms with multiple phases are proposed.

3.1. Particle Swarm Optimization with Fixed Phases
One PSOMP variant is the PSO with fixed phases (PSOFP) algorithm. The process of the PSO algorithm with multiple fixed phases is shown in Figure 4. Two standard PSO variants, the CPSO with star structure and the SPSOBK with ring structure, are combined for the PSOFP algorithm. In the experimental study, both variants perform the same iterations. The PSOFP algorithm started with the CPSO with the star structure and ended with the SPSOBK with the ring structure. All parameters are fixed for each phase during the search. The PSOFP algorithm switches from one variant to another after the fixed number of iterations.
3.2. Particle Swarm Optimization with Dynamic Phases
The other PSO variant is PSO with dynamic phases (PSODP) algorithm. As the name indicates, the phase could be dynamically changed for this algorithm during the search process. As the same with the PSOFP algorithm, the PSODP algorithm started with the CPSO with the star structure and ended with the SPSOBK with the ring structure. However, the number of iterations is not fixed during the search. The process of the PSO algorithm with multiple dynamic phases is shown in Figure 5. The global best (gbest) position is the best solution found so far. The gbest not changing for iterations indicates that the algorithm may be stuck into local optima. The PSO variant will be changed after this phenomenon occurs several times. For the setting of the PSODP algorithm, the search phase will change from CPSO with star structure to SPSOBK with a ring structure. The condition of phase change is the gbest stuck into a local optimum; i.e., the gbest is not changed for 100 iterations.
4. Experimental Study
4.1. Benchmark Test Functions and Parameter Setting
Table 1 shows the benchmark functions which have been used in the experimental study. To give an illustration of the search ability of the proposed algorithm, a diverse set of 12 benchmark functions with different types are used to conduct the experiments. These benchmark functions can be classified into two groups. The first five functions are unimodal, while the other seven functions are multimodal. All functions are run 50 times to ensure a reasonable statistical result necessary to compare the different approaches, and the value of global optimum is shifted to different for different functions. The function value of the best solution found by an algorithm in a run is denoted by . The error of each run is denoted as .
Three kinds of standard or canonical PSO algorithms are tested in the experimental study. Each algorithm has two kinds of structure, the global star structure and the local ring structure. There are 50 particles in each group of PSO algorithms. Each algorithm runs 50 times, iterations in every run. The other settings for the three standard algorithms are as follows.(i)SPSOBK settings: ; , i.e., [24](ii)SPSOC settings: ; [25](iii)Canonical PSO (CPSO) settings: ; i.e., is linearly decreased during the search; , ; [26]
4.2. Experimental Results
The experimental results for functions with 50 dimensions are given in Tables 2 and 3. The results for unimodal functions are given in Table 2, while results for multimodal functions are given in Tables 2 and 3. The aim of the experimental study is not to validate the search performance of the proposed algorithm but to attempt to discuss the combination of different search phases. This is a primary study on the learning of the characteristics of benchmark functions.
To validate the generalization ability of PSO variants, the same experiments are conducted on the functions with 100 dimensions. All parameters’ settings are the same for functions with 50 dimensions. The results for unimodal functions are given in Table 4, while the results for multimodal functions are given in Tables 4 and 5. From the experiment results, it could be seen that the proposed algorithm could obtain a good solution for most benchmark functions. Based on the combination of different phases, the proposed algorithm could be performed more robustly than the algorithm with one phase.
The convergence graphs of error values for each algorithm on all functions with 50 and 100 dimensions are shown in Figures 6 and 7, respectively. In these figures, each curve represents the variation of the mean value of over the iteration for each algorithm. The six PSO variants are tested with the proposed two algorithms. The notation of “S” and “R” indicates the star and ring structure in the PSO variants, respectively. For example, “SPSOBKS” and “SPSOBKR” indicate the SPSOBK algorithm with the star and ring structure, respectively. The robustness of the proposed algorithm also could be validated from the convergence graph.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
(k)
(l)
4.3. Computational Time
Tables 6 and 7 give the total computing time (seconds) of 50 runs in the experiments for functions with 50 and 100 dimensions, respectively. Normally, the evaluation speed of the PSO algorithm with ring structure is significantly slower than the same PSO algorithm with a star structure.
The PSOFP and PSODP algorithms perform slower than the traditional PSO algorithm on the test benchmark functions. The reason is that some search resources are allocated on the changes of search phases. The variant of PSO with multiple phases needs to determine whether to switch phase and the time of switching phase.
5. Conclusions
The swarm intelligence algorithms perform in varied manner for the same optimization problem. Even for a kind of optimization algorithm, the change of structure or parameters may lead to different results. It is very difficult, if not impossible, to obtain the connection between an algorithm and a problem. Thus, choosing a proper setting for an algorithm before the search is vital for the optimization process. In this paper, we attempt to combine the strengths of different settings for the PSO algorithm. Based on the building blocks thesis, a PSO algorithm with a multiple phase strategy was proposed in this paper to solve singleobjective numerical optimization problems. Two variants of the PSO algorithm, which were termed as the PSO with fixed phase (PSOFP) algorithm and PSO with dynamic phase (PSODP) algorithm, were tested on the 12 benchmark functions. The experimental results showed that the combination of different phases could enhance the robustness of the PSO algorithm.
There are two phases in the proposed PSOFP and PSODP methods. However, the number of phases could be increased or the type of phase could be changed for other PSO algorithms with multiple phases. Besides the PSO algorithms, the building block thesis could be utilized in other swarm optimization algorithms. Based on the analysis of different components, the strength and weaknesses of different swarm optimization algorithms could be understood. Utilizing this multiple phase strategy with other swarm algorithms is our future work.
Data Availability
The data and codes used to support the findings of this study have been deposited in the GitHub repository.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This work was partially supported by the Scientific Research Foundation of Shaanxi Railway Institute (Grant no. KY201629) and the Natural Science Foundation of China (Grant no. 61703256).