Performance Analysis of Partitioned Step Particle Swarm Optimization in Function Evaluation

: The partitioned step particle swarm optimization (PSPSO) introduces a two-fold searching mechanism that increases the search capability of Particle Swarm Optimization. The ﬁrst layer involves the γ and λ , values which are introduced to describe the current condition of characteristics of the searched solution that diversiﬁes the particles when it is converging too much on some optima. The second layer involves the partitioning of particles that tries to prevent premature convergence. With the two search mechanisms, the PSPSO presents a simpler way of making the particles communicate with each other without too much compromise of the computational time. The proposed algorithm was compared with different variants of particle swarm optimization (PSO) using benchmark functions as well as the IEEE 10-unit unit commitment problem. Results proved the effectiveness of PSPSO with different functions and proved its competitive advantage in comparison with published PSO variants.


Introduction
Heuristic, which means "to find" or "to discover by trial and error", is a way of producing an acceptable solution to a complex problem in a reasonable time [1]. Moreover, metaheuristic algorithms are the further development of heuristic algorithms. In the literature, there is no clear distinction between these algorithms, and the terms are usually interchangeable. Although heuristic methods use randomness to search for the solution, these methods are flexible enough to search through non-smooth space where mathematical methods have difficulty [2].
Metaheuristic algorithms, at times called intelligent search methods [3], are methods patterned on certain behaviors in our environment [4]: genetic algorithm (GA), which was based on evolution; particle swarm optimization (PSO) and firefly algorithm (FA) are examples of swarm intelligence; gravitational search algorithm (GSA) is a physics-based algorithm; teaching-learning based optimization (TLBO) and harmony search(HS) are based on human behavior and a never-ending list of algorithms that are patterned to different behaviors of organisms.
The success of a metaheuristic algorithm depends on how it balances the exploration and exploitation capability of each algorithm [5]. Exploration ensures the diversity of the solution by searching on a global scale, while exploitation focuses on the search on the local region where good solutions are. Algorithms provide different weights on these two terms. Another unique characteristic of algorithms is how they perform their random walk that determines a new and, hopefully, a better solution. Certain components of the algorithm that also helps in its movement, such as the inertia weight in PSO or the differential weight in differential evolution (DE) [6], the circling movement around the target in whale algorithm [7], and the use of a quantum bit to store the direction and magnitude of rotation angle in quantum-inspired algorithms (QEA) [8]. Mostly these random walks provide a unique movement that helps in the exploration and exploitation.

Review of Related Algorithms
The three algorithms discussed below are the inspiration of the partitioned step particle swarm optimization (PSPSO). The concepts and behavior of these algorithms are used as a guide to develope the PSO variant.

Genetic Algorithm
John Holland's GA in 1975 became the foundation of modern evolutionary intelligent search methods [1]. It is based on Darwinian theory on natural selection-crossover, mutation, and selection. Each individual in the population is composed of chromosomes that are encrypted with data and are, then, evolved through recombination with other particles or mutation. These individuals are then evaluated according to their fitness and randomly selected on the basis of this fitness value as their probability of being selected to generate the next population or children. Because of the complexity of the GA, finding the global optimal in a wide variety of functions has been a great success but at the expense of large calculation time [3].

Particle Swarm Optimization
PSO was introduced by Kennedy and Eberhart [9]. This algorithm simulates the social behavior of flocking birds and schooling fish. It uses the autobiographical memory of the particle (pbest), described as the inclination of the individual to return to the place that is more satisfying in the past, and the target (gbest). Each particle represents a solution for the problem and the collective of particles is called the swarm. For every iteration, the velocity of the particles is determined on the basis of the distance of a particle to its current best (pbest), overall best (gbest), and previous direction. The new position of the swarm is determined by moving the particles according to their calculated velocities [1].
The structure of PSO seems simple enough with its few parameters and easy implementation. However, PSO usually suffers from premature convergence [2] or being stuck at the local optima since it always moves towards the pbest and gbest, which may simply be just the local optima [3]. It has problems with scattering its particles or exploration. Hence, balancing exploration and exploitation needs to be studied for PSO.

Harmony Search
HS was introduced by Geem, Lee, and Loganathan [10]. It was inspired by how the music player improvises music to create better harmony. A generation of harmony can be done in three basic steps: (1) playing by memory, (2) playing a variation of the harmony, or (3) composing new harmony. With its simple structure, fast convergence, and a good balance between exploration and exploitation [5], HS has been widely implemented and combined with other algorithms such as random search [10], PSO [11], virus optimization algorithm [12], etc.
The format of HS is not quite as similar to the other algorithms, but concepts have some equivalent to other algorithms, such as GA's elitism and mutation and PSO's simplicity. In HS, the harmony is composed of different melodies (solution). The harmony is divided into harmony memory, a variation of the memory, and new melodies through initializing the percentage of each of these components. Better melodies are, then, saved in the harmony memory every iteration [1]. This concept of harmony division is done using a random selector variable that dictates what type of harmony a certain solution is, which is the inspiration for the proposed partitioned step particle swarm optimization (PSPSO).
From the discussions above, it can be observed that there are four main components in an algorithm: the step, elitism, crossover, and mutation. In GA, each of these four components can easily be distinguished in its algorithm as they are separated. In HS, the step is merged with memory, variation, and composition, representing elitism, crossover, and mutation, respectively, in one equation. In a standard PSO, the representation of each of these components is not too obvious; the velocity computation is the step, within this step is its elitism (pbest and gbest) and its limited mutation (the random multiplier on the pbest and gbest). The crossover done by PSO is only with its pbest and gbest-this means that particles only move toward the particle's best value and the current global best. While this can mean that each particle independently operates, lack of knowledge about other pbest always maintains the velocity of the particle a little towards the gbest. This is the main reason why PSO suffers from premature convergence. Therefore, the PSO particles should learn how to communicate with other particles to improve their search capability.
The PSPSO introduces a fast way of incorporating crossover and mutation without compromising the computational time. Two layers of search are also introduced. The first layer handles the direction of the inertia weight that is responsible for the partial mutation in PSO. The second is through a modified step equation that partitions the crossover of pbest and gbest, and pbest and another pbest. The proposed algorithm is then compared to different variants of the PSO in terms of the function's characteristics and computational time.
This paper analyzes the effectivity of PSPSO in solving different benchmark problems as it was not done when it was first introduced by the authors in their paper [13]. This paper provides a better understanding as to how and why it is capable of solving such problems through conducting further tests on the PSPSO. Furthermore, only PSO variants were tested in this paper because we wanted to show its improvement on the PSO algorithm. The paper is organized as follows. Section 1.2 discusses in detail the components of PSO and its known variants found in the literature. Section 2 discusses the PSPSO algorithm and testing methods. Parameter setting results and function evaluation results are discussed in Section 3. Section 4 discusses the possible implications of the use of this algorithm. Lastly, Section 5 discusses the conclusion.

Particle Swarm Optimization Components
There are several studies conducted that focuses on the enhancement of the PSO algorithm through the following components.

Velocity Rule
The velocity rule is how the particles of the algorithm determine their next update or next step. Originally, PSO [9] uses three components for the step; the previous velocity, the particle best (pbest), and the global best (gbest). The inertia weight variant later introduced by Shi and Eberhart [14] is the recent widely used variant that follows the equation where c 1 and c 2 are the cognitive and cooperative constants, respectively; x is the particle position, ω is the inertia weight, and vel is the velocity of the particle. However, as discussed in Bonyadi and Michalewics [15], the weighted velocity variant discussed above is locally convergent and may suffer from premature convergence. Other papers tried to mitigate this problem by changing the value of the weight and/or changing the velocity rule. One notable method is removing the pbest component and just use the previous velocity and the global best for the update [16,17] which showed better results, especially in multimodal functions.
Another unique variant uses an additional component to the original PSO. Weight-Improved Crazy PSO (WICPSO) [18] uses a bad experience component (pworst) to help the particle move away from the not so good position.

Inertia Weight
From the discussion of Shi and Eberhart [16], the velocity is intended to expand the search space, that the particles have in terms of ability to explore a new area. The inertia weight is responsible for controlling the previous velocity, thereby, controlling the movement of particles toward the previous velocity. In addition, this inertia weight is also responsible for balancing the global search (toward gbest) and local search (toward pbest).
Because of the inertia weight's control on the exploration of the PSO, several PSO variants were performed to modify the value of ω. The crazy PSO (CPSO) [14] uses a probability of craziness to determine if the new velocity will be used or if it would be a random number from zero to the pre-set maximum velocity. For both CPSO and weightimproved PSO (WIPSO) [19], the value of ω changes on the basis of the current iteration that decreases as the iteration increases. This decrease in the change of the ω value is necessary to make sure that the algorithm converges. The generalized PSO (GPSO) [20], likewise, changes in the inertia weight depending on the iteration. However, instead of a craziness component, the GPSO uses the previous gbest and current gbest to decide how much of the previous inertia would be used. However, if the GPSO got stuck in a local minimum, the inertia would not change. The GPSO compensates this by including the position of a random particle and a velocity of another random particle as the fourth and fifth terms in their velocity update, leading to too much exploration.
The adaptive PSO (APSO) has been presented in several pieces of literature as the consideration of the current state of particles or sparseness of the solution for exploration. Li et al. [21] used the distances between particles to compute the local sparseness degree to select the exemplars of each group of particles as pbest particles. Although Li et al.'s APSO seems a good way to select pbest particles, the presented algorithm itself uses long complicated steps. In the work of Han et al. [22], the APSO used additional constant parameters to adjust the degree of sparseness than then adjusted the value of ω. Han et al.'s variant seems to be promising because the particles were moved according to the current state of the solution rather than being limited by a range of ω or relying on randomness as in like the CPSO and WIPSO.

Crossover
Seeing a crossover operation in PSO is not usual because the velocity update itself seems to be the crossover operator-a crossover with its pbest and gbest [9]. In the paper of Chen et al. [17], discusses that the crossover enhances the information sharing between particles and prevents premature convergence. They have proposed the PSO with Crossover Operation (PSOCO), which uses two types of crossover operation, arithmetic crossover and differential evolution crossover. They also combined the concept of exemplars as a replacement strategy for stagnated value and competitive selection from differential evolution resulting in a faster convergence. However, arriving at the solution takes longer than usual due to the use of multiple procedures and function evaluation in every iteration.

Theory
The PSPSO incorporates adaptive components and crossover on the basis of the current state of the particles. In Li et al.'s [21] concept of APSO, the adaptive component is based on the congestion and distribution of particles. For the PSPSO, these two conditions are reformulated as the λ and γ components, acting similar to congestion and distribution components, respectively. The λ component indicates the sparseness of the solution in the current iteration; the larger the λ, the much closer are the fitness values. The γ component indicates how far is the fitness is the current best solution; the larger the value, the more near the particle is to the current best solution.
Equations (2)-(4) show the computation of the three components, λ, γ, and ω, respectively, where x is particle position, f (x) is the fitness function, MaxIter is the maximum iteration, and i is the iteration number. At the beginning of the algorithm when the sparseness is still high, the particles will try to improve themselves by moving towards the known better solutions, pbest and gbest. When the particles suddenly try to converge together, ω will be high, which means that the algorithm will do more exploration. In other studies, the ω is referred to as the "mutation" of PSO; when the ω is high, the algorithm searches more the solution space. This means that the PSPSO will try to use the previous trajectory more to look for other solutions or to diversify.
Traditional random walk for PSO includes the previous velocity, pbest, and gbest. Nonetheless, some research suggests that including gbest makes the algorithm converge prematurely. To remedy this, the probability of using gbest is decreased at the start of the iterations using the partition (p) (5). Even though the use of gbest is reduced, the cooperative component will remain throughout the iteration through the use of a random particle's pbest (pbest rand ). The velocity (6) would have two types of particles, the crossover of pbest and gbest, and the crossover of pbest and pbest rand . The vector representation for velocity (6) and particle movement update (7) is seen in Figure 1a.
part new = part old + vel new (7)

Parameter Setting
There are only two parameters for PSPSO-cognitive-cooperative constants (c 1 and c 2 ) and the number of particles. These parameters are determined by performing a brutal search, first, on the constants, then the number of parameters. The search range for the constants is from 1.5 to 2.5 with 0.25 increments, while the number of particles (N) is 30 to 60 with increments of 10. The mean, standard deviation, and computational time for the 30 runs of all the test functions are recorded. The parameter setting that has the best or lowest results in terms of mean, standard deviation, and computational time is then chosen.

Performance Tests 2.3.1. PSO Variants
Five PSO variants were used to compare the performance of the proposed PSPSO, namely, PSO [16], CPSO [14], PSOCO [17], WICPSO [18], APSO [21], and scout PSO (ScPSO) [23]. Each of these algorithms focus on a unique component of PSO, either in the velocity rule, inertia weight, crossover, or mutation. The CPSO introduced the craziness probability to adjust the inertia weight. WICPSO improved the CPSO by introducing the pworst component in the velocity rule but was not tested for global search. Li et al.'s APSO considered the relative positions of the particles in the movement. Lastly, the ScPSO uses the mutation criteria based on the artificial bee colony (ABC) algorithm.
All the variants were coded in MATLAB R2020a on an Intel i5 Core 3.2GHz with 8GB RAM. The initialized particles use the Halton quasirandom point set for uniform distribution on the solution space and uniformity of all algorithms. Parameter settings for each of the algorithms are shown in Table 1. The number of particles (N) and maximum iteration is set to 50 and 1000*dimension, respectively.

Algorithms
Parameter Setting

Benchmark Functions
The list of unconstrained functions can be found in Table 2, with its corresponding property taken from [24]. Moreover, five benchmarks constrained optimization problems were also used for the testing, as shown in Table 3.

Unit Commitment Problem
The PSPSO is, likewise, applied to solve the IEEE 10-unit unit commitment (UC) problem, which is a non-convex, large-scale, non-linear, and mixed-integer combinatorial problem. There are several attempts to solve the IEEE10-unit UC problem in literature using WICPSO [18], hybrid genetic-imperialist competitive algorithm (HGICA) [25], GA [26], quantum-inspired binary grey wolf optimizer (QBGWO) [27], binary artificial sheep algorithm (BASA) [28], binary grey wolf optimizer (BGWO) [29], and MILP-based stochastic multi-objective UC (SMOUC) using one scenario and single objective base case [30]. The UC problem deals with the 24-h scheduling of generators, deciding on when a generator turns on or off (unit commitment decision) and what amount of power should be scheduled for each generator (economic dispatch decision) in order to have the least operating cost. The generator constants and load are listed in Tables 4 and 5. Table 6 lists the objective function and constraints of the UC problem. The objective, as found in Table 6-a, is to minimize sum of the fuel cost and start-up (SU) cost of the generators for the entire period. It is subject to seven system constraints. The total fuel cost at each hour t is equal the summation of the fuel cost of each generator i given their fuel constants (a, b, and c) ( Table 6-b). UC i is the commitment of generator i; a UC value of 1 means that the generator is turned on, and 0 means the generator is turned off. The power balance of the system must be maintained at each hour such that the summation of the power generated by each generator P DG must be equal to the load demand P L at a particular hour (Table 6-c). The generator power output should not exceed the maximum (UB) and minimum (LB) operating limits of each generator (Table 6- (Table 6-f). The shutdown costs of each generator depend on the cold start hour (CSH) of each generator (Table 6-g). Finally, the scheduled reserve (10% of the load) at each hour (Table 6-h) should be available.   1  2  3  4  5  6  7  8  9  10  11  12  Load  700  750  850  950  1000  1100  1150  1200  1300  1400  1450  1500   Hour  13  14  15  16  17  18  19  20  21  22  23  24  Load  1400  1300  1200  1050  1000  1100  1200  1400  1300  1100  900  800   Table 6. Ten-unit unit commitment problem.

. Function Evaluation Tests
The test is conducted by running the function evaluation 30 times with 30, 40, and 50 unknown variables. The number of iterations is set to 1000*dimension for all algorithms. The average of the runs of each algorithm is recorded. The average value, standard deviation, and running time for each function are, likewise, recorded.
The best algorithm for each function characteristic is determined by obtaining the average ranking of the values of every algorithm for every function characteristic. The overall best algorithm is determined by simply obtaining the average ranking of each algorithm for all functions. Table 7 shows the results for varying c 1 or c 2 value from 1.00 to 2.50 (with 0.25 increments) while making the number of particles constant at 50 and varying the number of particles N (with 10 increments) while keeping the c 1 or c 2 value constant at 1.50. These are evaluated using all functions in Tables 2 and 3 with zero as optimal value. On the basis of the data in Table 7a, we can conclude that 1.50 is the most suitable constant parameter since it has the lowest mean, standard deviation, and computational time. Increasing the c value increases all the criteria values. Decreasing its value also increases the all the criteria values but not as much as increasing the c value. Using 1.5 as the constant value, as seen in Table 7b, N = 50 can be selected as the number of parameters for PSPSO, since increasing N does not give appreciable change in the mean and standard deviation. Although N = 70 has the lowest mean and standard deviation, the increase in computational time is large compared to the decrease in mean and standard deviation. Figure 2 shows the change in the fitness f (x) of a selected random particle with its ω, γ and λ. Notice that when the diversity of the particles is high during the start of the iteration (high λ and γ), ω will also be in its higher value. When the particle moves closer to the best solution, the value of ω increases, which means that the algorithm tries to explore more and does not come too near the best solution at the earlier iterations. This can happen in any iteration, which can be seen in the pulses in ω. These pulses will be larger when a bad solution for a particle is found, moving the particle away from the bad solution by giving a larger ω. Convergence is also assured as the value of ω decreases as the iteration increases.  Figure 3 shows the average convergence graph for the 30 runs for Rosenbrock, Pinter, G02, and Pathological functions of PSPSO compared with other PSO variants. In almost all functions, the PSPSO was able to find the solution before 25% of the total iterations. Of all the benchmark functions only in (f12) Pathological and (f19) Styblinski-Tang was the PSPSO not able to converge in less than 25% of the total iterations. However, for the Pathological function, the PSPSO was still able to outperform the others in finding a better solution in the end.  Tables 8 and 9 for each PSO variant for every benchmark function. The results of Tables 8 and 9 are summarized in Table 10 by ranking the performance of each algorithm. It can be seen that in almost all functions that the PSPSO was ranked 1 except for separable, non-scalable, and multimodal functions where it ranked second. The PSOCO ranked second on almost all functions, performing better in discontinuous, separable, non-scalable, and multimodal functions but performed poorly in constrained function. Overall, the PSPSO ranked first, followed by the PSOCO, CPSO, and APSO tied on third, ScPSO and PSO on fifth, and lastly WICPSO.      Figure 4a shows the average ranking of the algorithms with increasing dimension, where PSPSO almost remained first in rank in function evaluation with a slightly improved performance. It can be noted that both the APSO and PSPSO, both with downward slope, had better performance when the dimension was increased. This can also mean the other way around, that the other algorithms' performance worsened, especially for the CPSO with an increased average ranking (upward slope). Figure 4b shows the average computational time of every variant with increasing dimension. It also shows that the computational times of PSPSO, CPSO, WICPSO, ScPSO, and PSO were not that far from each other, even in the increase in dimension. On the other hand, PSOCO was found to be always more than twice the computational time of the other variants. The computational time PSO variants are magnified in Figure 4c, and the effect in the increase in dimension is seen linear for all but with different slopes. The proposed PSPSO had the lowest slope followed by APSO, PSO, ScPSO, WICPSO, CPSO, and PSOCO. Although the average computational time for PSPSO was the lowest, its overall ranking for computational time was just a third, as seen in Table 10. This means that not in every function evaluation was solved the fasted by the PSPSO, and that most of the time APSO or PSO solved a function faster than PSPSO.  Table 11 shows the result of the UC from the PSPSO with a total UC cost of $563,934.16. The total fuel cost is $559,844.16 and the total start-up cost is $4,090. This result is the same commitment of units with the other published literatures but with discrepancies in the dispatch and/or costs.   0  8  455  455  130  130  30  0  0  0  0  0  24,150.34  0  9  455  455  130  130  85  20  25  0  0  0  27,250.86  860  10  455  455  130  130  162  33  25  10  0  0  30,057.22  60  11  455  455  130  130  162  73  25  10  10  0  31,915.33  60  12  455  455  130  130  162  80  25  43  10  10  33,889.36  60  13  455  455  130  130  162  33  25  10  0  0  30,057.22  0  14  455  455  130  130  85  20  25  0  0  0 Table 12 shows the results of the PSPSO compared with algorithms in the literature, which also solved the 10-unit UC problem. Although the maximum iteration is 1000, the algorithm terminated around the 400th iteration with an average time of 3.57 s. The best result of the PSPSO reached the minimum solution found in the literature. The average cost of the algorithm was 104.33 more than the best cost, which was a 0.018% difference.

Unit Commitment Performance
Moreover, some algorithms were three times slower than the proposed PSPSO, and only one algorithm was faster than the proposed.  Table 13 shows the results of the 10-unit system multiples with the termination criteria changed to maximum iteration for all algorithms. In almost all cases, the PSPSO performed the best. However, in the 20-unit and 60-unit systems, the WICPSO was able to outperform PSPSO in finding the best cost, yet PSPSO still was the best in terms of the average cost, worst cost, and computational time. The performance of WICPSO was already expected because it has already been used to solved this test system in the literature, but the fact that PSPSO almost always demonstrates the best performance in all the multiples, costs, and computational time makes PSPSO a viable and competitive algorithm in solving a unit commitment problem.

Discussion
The PSPSO showed very competitive results with the other known variants of PSO in both search and computational time. The PSPSO outperformed CPSO, WICPSO, ScPSO, and PSO on all function properties except non-scalable functions. Although PSOCO's search for the global optimum was better than the other variants, PSOCO had the worst computational time, which at times was twice the time of a standard PSO due to its multiple crossover operation, which is computationally taxing. The PSPSO, on the other hand, computed faster compared to other variants. This may have been due to the algorithm's freedom to direct the particles. Combining this concept with a crossover with another particle would make the particles move more intelligently on the solution space. This suggests that PSPSO can be an alternative to PSO and its variants.

Conclusions
In the literature, it has always been the disadvantage of PSO of it having no crossover operation, aside from its crossover to its global best solution, in terms of preventing it from premature convergence. Although some variants tried to include a crossover operation, the operational time is usually compromised, as in the case of PSOCO. The proposed PSPSO's γ and λ values summarize the characteristics of the current set of particles so that all particles will gain some information about other particles as well and continually search for a better solution. Combining these constants with the partitioned velocity rule may provide an alternative crossover operation that does not compromise the computational time.
The results have proven the effectiveness of PSPSO compared to variants without the crossover operation in different types of functions. The computational speed is likewise competitive with published variants. Even with the increased dimension, the effectiveness of PSPSO is still maintained with a slight improvement in computational time. The PSPSO was also proven effective in solving the IEEE 10-unit problem and is competitive with other algorithms found in the literature.