# Hybrid Optimization Algorithm of Particle Swarm Optimization and Cuckoo Search for Preventive Maintenance Period Optimization

Authors: Jianwen Guo; Zhenzhong Sun; Hong Tang; Xuejun Jia; Song Wang; Xiaohui Yan; Guoliang Ye; Guohong Wu
Journal: Discrete Dynamics in Nature and Society
 (2016)

---

## Abstract

All equipment must be maintained during its lifetime to ensure normal operation. Maintenance is one of the critical roles in the success of manufacturing enterprises. This paper proposed a preventive maintenance period optimization model (PMPOM) to find an optimal preventive maintenance period. By making use of the advantages of particle swarm optimization (PSO) and cuckoo search (CS) algorithm, a hybrid optimization algorithm of PSO and CS is proposed to solve the PMPOM problem. The test functions show that the proposed algorithm exhibits more outstanding performance than particle swarm optimization and cuckoo search. Experiment results show that the proposed algorithm has advantages of strong optimization ability and fast convergence speed to solve the PMPOM problem.


---

## Body

## 1. Introduction

Maintenance refers to restoring aging or faulty equipment parts to a satisfactory operating condition. The primary goal of maintenance is to avoid or mitigate the consequences of failure of equipment. Maintenance is a critical role in the success of manufacturing enterprises [1]. Manufacturing enterprises require cost-effective and adaptive production and maintenance strategies to capture market share [2].Preventive maintenance (PM) is one of the most popular maintenance policies recommended for the maintenance of manufacturing systems because it is executed with a planned interval aiming at improving machine conditions and preventing unforeseen failures [3]. PM includes a set of activities to improve the overall reliability and availability of a system. PM activities are inspection, testing, diagnosis, disassembly, assembly, cleaning, repair, and replacement. The ideal PM would prevent all equipment failure before it occurs [4].Preventive maintenance involves a trade-off between the production losses caused by occupying production time and the cost savings achieved by preventing system failure [5]. However, as a result of lack of experience in testing equipment, methods, and maintenance personnel, the accuracy of the PM period is still a key issue [6]. To solve this problem, many PM optimization models have been developed to search the optimal PM period under various conditions [7].Optimization model is a mathematical model that refers to choosing the best solution from all feasible solutions. Finding an optimal PM period (optimal solution) is difficult because of complexity of the optimization model. Recently, many metaheuristic algorithms provide new solutions to various complex optimization problems by imitating the self-organization mechanism of natural biological communities and the adaptive ability of evolution [8]. Metaheuristic algorithms also have been proposed to solve the combinatorial explosion problem of PM optimization models recently [9].Particle swarm optimization (PSO) [10] is a metaheuristic algorithm inspired by the social behavior of populations with collaborative properties. The PSO imitates this species collaboration and is widely used in solving mathematical optimization problems. PSO exhibits easy understanding, simple operation, and rapid searching. It has been successfully applied to several fields [11]. Cuckoo search (CS) [12] is a metaheuristic optimization algorithm inspired by the reproduction strategy of cuckoo species. Cuckoos lay their eggs in the nests of other host birds, which may be of different species. The host bird may discover strange eggs in its nest, and it will either destroy the eggs or abandon the nest to build a new one. This algorithm is enhanced by the so-called Lévy flights rather than by simple isotropic random walks. The effectiveness of CS over other methods such as GA and PSO has been validated on benchmarked functions [12].PSO has several advantages, such as fast convergence speed, but it also has some defects, such as premature convergence, and it easily falls into local optima. CS has several advantages, such as few control parameters and high efficiency, but it also has some defects, such as slow convergence speed and low accuracy. A PSO and CS hybrid algorithm should be developed as a hybrid algorithm with an outstanding performance because of the complementation of PSO and CS.In this paper, a preventive maintenance period optimization model (PMPOM) is proposed. PMPOM takes the cost of shutdown caused by breakdown maintenance, preventive maintenance, and inspection maintenance as evaluation indexes. PSO and CS hybrid optimization algorithm PSOCS is proposed to solve PMPOM. The test functions and application examples show that the proposed algorithm has advantages of strong optimization ability and fast convergence speed that can effectively solve the PMPOM.The remainder of the paper is organized as follows. Section2 introduces related works. Section 3 introduces PMPOM. Section 4 introduces PSOCS hybrid algorithm and carries out algorithm performance test. Section 5 uses PSOCS algorithm to solve PMPOM problem. Section 6 provides the conclusions and further works of the study.


## 2. Related Works

### 2.1. Particle Swarm Optimization

PSO is a population-based metaheuristic algorithm that is inspired by the social behavior of populations with collaborative properties. The PSO imitates this species collaboration and is widely used in solving mathematical optimization problems. The flow of PSO is shown in Figure1.Figure 1
Flowchart of PSO.Population in PSO is represented asX=X1,X2,…,XN, where Xi is a particle that moves within a multidimensional search space and strives for the optimal solution. A particle’s property includes position and velocity. The position of a particle is a solution candidate. The velocity of a particle is the information about direction and varying rate. A particle that moves within a d dimensional search space is represented as Xi=xi1,xi2,…,xid. A particle can adjust its position xid toward the best positions according to its experience (its best position pid) and that of their neighboring particles (the best position of population pgd). In this manner, all particles are expected to gradually approach the global optimum.Particle’s velocity is updated by using(1)vidk+1=ωvidk+η1r1pid-xidk+η2r2pgd-xidk,where vid(k+1) is the dth component of particle’s velocity after the (k+1)th update; pid is currently the particle’s best solution of dth component after the kth update; pgd is currently the population’s best global solution of the dth component after the kth update; η1 and η2 are positive constant parameters called acceleration coefficients, controlling the movement steps of particles; ω is inertia weight that controls the effect of previous values of particle’s velocity on next one. r1 and r2 are random variables with a range [0,1].To avoid the particle’s position beyond the search space, maximum search velocityvmax is introduced. If vid(k+1)>vmax, vid(k+1)=vmax, and if vid(k+1)<-vmax, then vidk+1=-vmax.Particle position is updated by using(2)xidk+1=xidk+vidk+1,where xid(k+1) is the dth component of particle’s position after the (k+1)th update and vid(k+1) is the dth component of particle’s velocity after the (k+1)th update.The update procedure consecutively iterates until a predetermined terminal condition is reached. Thereby, the best solution is obtained. Using formulas (1) and (2), three factors have a major effect on a particle’s update speed: (1) the distance between particle’s current position and particle’s best solution, (2) the distance between particle’s current position and population’s best global solution, and (3) the speed before this iteration. The importance of the three factors is determined by weight coefficients η1, η2, and ω, respectively.


### 2.2. Cuckoo Search

CS is a new and efficient population-based heuristic evolutionary algorithm for solving optimization problems. CS has the advantages of simple implementation and few control parameters. This algorithm is based on the obligate brood parasitic behavior of some cuckoo species combined with the Lévy flight behavior of some birds and fruit flies. It has been applied to solve a wide range of real-world optimization problems, such as structural optimization problem [13], shop scheduling problem [14, 15], nonconvex economic dispatch problem [16], and short-term hydrothermal scheduling problem [17].Below are the approximation rules during the search process [18].(1)
Each cuckoo lays one egg (solution) at a time and dumps its egg in a randomly chosen nest.(2)
The best nests with a high-quality egg (better solution) will be carried over to the next generation.(3)
The number of available host nests is fixed. A host bird can discover an alien egg with a probabilityPa[0,1]. In this case, the host bird can either throw the egg away or abandon the nest and build a completely new nest.From the implementation point of view, we can say that each egg in a nest represents a solution, and each cuckoo can lay only one egg (thus representing one solution). In this case, no distinction exists among an egg, a nest, or a cuckoo, because each nest corresponds to one egg, which also represents one cuckoo.In CS, each nest’s position or egg’s position can be regarded as a solution, because each nest corresponds to one egg. In the initial process, each solution is generated randomly when generating theith solution in the (i+1)th generation. Position is updated by using(3)xik+1=xik+α⊗Lλ,where xi(k+1) is the nest’s ith position of the k+1 generation in the population; xik is the nest’s ith position of the k generation in the population; α is a real number that denotes the step size, which should be proportional to the scales of the optimization problem; ⊗ represents entry-wise multiplications; and Lλ is the random search vector produced by Lévy distribution.The use of Lévy flights [19] for local and global searching is a vital part of CS [12]: (4)Lλ~u=t-λ1<λ<3.Here, the consecutive jumps/steps of a cuckoo essentially form a random walk process, which obeys a power-law step-length distribution with a heavy tail. Some of the new solutions should be generated by Lévy walk around the best solution, which will accelerate the local search. However, a substantial fraction of the new solutions should be generated by far field randomization whose locations should be far enough from the current best solution. This approach will ensure the system will not be trapped in a local optimum.CS updates each generation solution by Lévy flight, and a better solution is retained. Then, the retained solution is eliminated randomly by discover probabilityPa and is updated. The above process is repeated until the algorithm ends. The steps of the cuckoo algorithm are as follows.Step 1.
The parameters, number of the bird’s nest, termination condition of algorithm, search space dimension of algorithmd, step size α, and Pa are set.Step 2.
The population (randomly determining the position of the nest)p(0)=[x1(0),x2(0),…,xn(0)]T is randomly initialized.Step 3.
The initial population fitness value is calculated by using objective function, and the optimal position of the nestxgb(0) is determined.Step 4.
The position of the nest is updated by using formula (16), and a new position is created. Then, the fitness value is calculated by using the objective function. A better nest is chosen between the new and the old nests as an individual in the population. A new group of nest’s position is as follows: (5)gk+1=x1k+1,x2k+1,…,xnk+1T.Step 5.
Randomize elimination mechanism. The parameterPa reflects the probability whether the nest will be abandoned or be updated. Thus, for the eggs that may be found by the host, the location of the nest should be changed. Initially, an n-dimensional vector Rn=[r1,r2,…,rn] is produced. For ri in Rn, each component of a vector follows a uniform distribution with [0,1] when ri>Pa, randomly changing the ith nest position. Through a comparison between the fitness values of the old and new nests, the better nest will be chosen as a new generation of individuals in the population. The new group of nest’s position is produced as pk+1=[x1(k+1),x2(k+1),…,xn(k+1)]T.Step 6.
The best nest position is updated by usingpk+1.Step 7.
If the termination condition of the algorithm is satisfied, the optimal output position of nest is achieved, and the algorithm is terminated; otherwise, Step  4 is performed.


### 2.3. Preventive Maintenance

PM is one of the most important strategies for equipment maintenance and has been a concern of most scholars. In the past years, many period optimization models have been established. Chareonsuk et al. [20] established the PMPOM to achieve the target with minimum operation costs and then studied the effect of equipment operation cost and reliability by different maintenance period. Vaurio [21] established an optimization model to achieve a target with efficiency and low operating costs, and to study the effect of different maintenance period of the model. Jiang and Ji [22] treated maintenance period optimization as a multiobjective optimization problem, in which the equipment operation cost, equipment life, effectivity, and reliability are the optimization objective. Kalir [23] established preventive maintenance for semiconductor manufacturing.PM optimization problem can be treated as a constrained optimization problem. Recently, several new metaheuristic algorithms have been implemented to solve the problem. Samrout et al. [24] presented an ant colony to optimize the maintenance periods. Moghaddam et al. [25] presented a new multiobjective optimization model to determine the optimal preventive maintenance and replacement schedules in a repairable and maintainable multicomponent system. Yare et al. [26] introduced multiple swarm concepts for the modified discrete PSO to form a robust algorithm for solving the preventive maintenance schedule problem. Abdulwhab et al. [27] used the GA optimization technique to maximize the overall system reliability for a specified future time period, in which a number of generating units are to be removed from service for preventive maintenance. Berrichi et al. [28] presented an algorithm based on the ant colony optimization paradigm to solve the joint production and maintenance scheduling problem. Verma and Ramesh [29] viewed the initial scheduling of preventive maintenance as a constrained nonlinear multiobjective decision making problem. The optimization problem is solved using an elitist GA, and maintenance domain knowledge is effectively incorporated in its implementation.Each optimization algorithm has its own advantages and disadvantages. Thus, many hybrid optimization algorithms have been developed to solve the optimization problem. Lin and Wang [30] presented a hybrid genetic algorithm to optimize the periodic preventive maintenance model in a series-parallel system. Leou [31] proposed a novel algorithm for determining a maintenance schedule for a power plant. This algorithm combines the GA with simulated annealing to optimize maintenance periods and minimize maintenance and operational cost. Ma et al. [32] proposed a hybrid swarm intelligence algorithm to optimize the preventive maintenance period. Kim and Woo [33] presented a methodology for optimal maintenance scheduling of generating units using a hybrid algorithm that combines a scatter search and a GA. Samuel and Rajan [34] presented a hybrid PSO-based GA and hybrid PSO-based shuffled frog leaping algorithm to solve the long-term generation maintenance scheduling problem.


## 2.1. Particle Swarm Optimization

PSO is a population-based metaheuristic algorithm that is inspired by the social behavior of populations with collaborative properties. The PSO imitates this species collaboration and is widely used in solving mathematical optimization problems. The flow of PSO is shown in Figure1.Figure 1
Flowchart of PSO.Population in PSO is represented asX=X1,X2,…,XN, where Xi is a particle that moves within a multidimensional search space and strives for the optimal solution. A particle’s property includes position and velocity. The position of a particle is a solution candidate. The velocity of a particle is the information about direction and varying rate. A particle that moves within a d dimensional search space is represented as Xi=xi1,xi2,…,xid. A particle can adjust its position xid toward the best positions according to its experience (its best position pid) and that of their neighboring particles (the best position of population pgd). In this manner, all particles are expected to gradually approach the global optimum.Particle’s velocity is updated by using(1)vidk+1=ωvidk+η1r1pid-xidk+η2r2pgd-xidk,where vid(k+1) is the dth component of particle’s velocity after the (k+1)th update; pid is currently the particle’s best solution of dth component after the kth update; pgd is currently the population’s best global solution of the dth component after the kth update; η1 and η2 are positive constant parameters called acceleration coefficients, controlling the movement steps of particles; ω is inertia weight that controls the effect of previous values of particle’s velocity on next one. r1 and r2 are random variables with a range [0,1].To avoid the particle’s position beyond the search space, maximum search velocityvmax is introduced. If vid(k+1)>vmax, vid(k+1)=vmax, and if vid(k+1)<-vmax, then vidk+1=-vmax.Particle position is updated by using(2)xidk+1=xidk+vidk+1,where xid(k+1) is the dth component of particle’s position after the (k+1)th update and vid(k+1) is the dth component of particle’s velocity after the (k+1)th update.The update procedure consecutively iterates until a predetermined terminal condition is reached. Thereby, the best solution is obtained. Using formulas (1) and (2), three factors have a major effect on a particle’s update speed: (1) the distance between particle’s current position and particle’s best solution, (2) the distance between particle’s current position and population’s best global solution, and (3) the speed before this iteration. The importance of the three factors is determined by weight coefficients η1, η2, and ω, respectively.


## 2.2. Cuckoo Search

CS is a new and efficient population-based heuristic evolutionary algorithm for solving optimization problems. CS has the advantages of simple implementation and few control parameters. This algorithm is based on the obligate brood parasitic behavior of some cuckoo species combined with the Lévy flight behavior of some birds and fruit flies. It has been applied to solve a wide range of real-world optimization problems, such as structural optimization problem [13], shop scheduling problem [14, 15], nonconvex economic dispatch problem [16], and short-term hydrothermal scheduling problem [17].Below are the approximation rules during the search process [18].(1)
Each cuckoo lays one egg (solution) at a time and dumps its egg in a randomly chosen nest.(2)
The best nests with a high-quality egg (better solution) will be carried over to the next generation.(3)
The number of available host nests is fixed. A host bird can discover an alien egg with a probabilityPa[0,1]. In this case, the host bird can either throw the egg away or abandon the nest and build a completely new nest.From the implementation point of view, we can say that each egg in a nest represents a solution, and each cuckoo can lay only one egg (thus representing one solution). In this case, no distinction exists among an egg, a nest, or a cuckoo, because each nest corresponds to one egg, which also represents one cuckoo.In CS, each nest’s position or egg’s position can be regarded as a solution, because each nest corresponds to one egg. In the initial process, each solution is generated randomly when generating theith solution in the (i+1)th generation. Position is updated by using(3)xik+1=xik+α⊗Lλ,where xi(k+1) is the nest’s ith position of the k+1 generation in the population; xik is the nest’s ith position of the k generation in the population; α is a real number that denotes the step size, which should be proportional to the scales of the optimization problem; ⊗ represents entry-wise multiplications; and Lλ is the random search vector produced by Lévy distribution.The use of Lévy flights [19] for local and global searching is a vital part of CS [12]: (4)Lλ~u=t-λ1<λ<3.Here, the consecutive jumps/steps of a cuckoo essentially form a random walk process, which obeys a power-law step-length distribution with a heavy tail. Some of the new solutions should be generated by Lévy walk around the best solution, which will accelerate the local search. However, a substantial fraction of the new solutions should be generated by far field randomization whose locations should be far enough from the current best solution. This approach will ensure the system will not be trapped in a local optimum.CS updates each generation solution by Lévy flight, and a better solution is retained. Then, the retained solution is eliminated randomly by discover probabilityPa and is updated. The above process is repeated until the algorithm ends. The steps of the cuckoo algorithm are as follows.Step 1.
The parameters, number of the bird’s nest, termination condition of algorithm, search space dimension of algorithmd, step size α, and Pa are set.Step 2.
The population (randomly determining the position of the nest)p(0)=[x1(0),x2(0),…,xn(0)]T is randomly initialized.Step 3.
The initial population fitness value is calculated by using objective function, and the optimal position of the nestxgb(0) is determined.Step 4.
The position of the nest is updated by using formula (16), and a new position is created. Then, the fitness value is calculated by using the objective function. A better nest is chosen between the new and the old nests as an individual in the population. A new group of nest’s position is as follows: (5)gk+1=x1k+1,x2k+1,…,xnk+1T.Step 5.
Randomize elimination mechanism. The parameterPa reflects the probability whether the nest will be abandoned or be updated. Thus, for the eggs that may be found by the host, the location of the nest should be changed. Initially, an n-dimensional vector Rn=[r1,r2,…,rn] is produced. For ri in Rn, each component of a vector follows a uniform distribution with [0,1] when ri>Pa, randomly changing the ith nest position. Through a comparison between the fitness values of the old and new nests, the better nest will be chosen as a new generation of individuals in the population. The new group of nest’s position is produced as pk+1=[x1(k+1),x2(k+1),…,xn(k+1)]T.Step 6.
The best nest position is updated by usingpk+1.Step 7.
If the termination condition of the algorithm is satisfied, the optimal output position of nest is achieved, and the algorithm is terminated; otherwise, Step  4 is performed.


## 2.3. Preventive Maintenance

PM is one of the most important strategies for equipment maintenance and has been a concern of most scholars. In the past years, many period optimization models have been established. Chareonsuk et al. [20] established the PMPOM to achieve the target with minimum operation costs and then studied the effect of equipment operation cost and reliability by different maintenance period. Vaurio [21] established an optimization model to achieve a target with efficiency and low operating costs, and to study the effect of different maintenance period of the model. Jiang and Ji [22] treated maintenance period optimization as a multiobjective optimization problem, in which the equipment operation cost, equipment life, effectivity, and reliability are the optimization objective. Kalir [23] established preventive maintenance for semiconductor manufacturing.PM optimization problem can be treated as a constrained optimization problem. Recently, several new metaheuristic algorithms have been implemented to solve the problem. Samrout et al. [24] presented an ant colony to optimize the maintenance periods. Moghaddam et al. [25] presented a new multiobjective optimization model to determine the optimal preventive maintenance and replacement schedules in a repairable and maintainable multicomponent system. Yare et al. [26] introduced multiple swarm concepts for the modified discrete PSO to form a robust algorithm for solving the preventive maintenance schedule problem. Abdulwhab et al. [27] used the GA optimization technique to maximize the overall system reliability for a specified future time period, in which a number of generating units are to be removed from service for preventive maintenance. Berrichi et al. [28] presented an algorithm based on the ant colony optimization paradigm to solve the joint production and maintenance scheduling problem. Verma and Ramesh [29] viewed the initial scheduling of preventive maintenance as a constrained nonlinear multiobjective decision making problem. The optimization problem is solved using an elitist GA, and maintenance domain knowledge is effectively incorporated in its implementation.Each optimization algorithm has its own advantages and disadvantages. Thus, many hybrid optimization algorithms have been developed to solve the optimization problem. Lin and Wang [30] presented a hybrid genetic algorithm to optimize the periodic preventive maintenance model in a series-parallel system. Leou [31] proposed a novel algorithm for determining a maintenance schedule for a power plant. This algorithm combines the GA with simulated annealing to optimize maintenance periods and minimize maintenance and operational cost. Ma et al. [32] proposed a hybrid swarm intelligence algorithm to optimize the preventive maintenance period. Kim and Woo [33] presented a methodology for optimal maintenance scheduling of generating units using a hybrid algorithm that combines a scatter search and a GA. Samuel and Rajan [34] presented a hybrid PSO-based GA and hybrid PSO-based shuffled frog leaping algorithm to solve the long-term generation maintenance scheduling problem.


## 3. Preventive Maintenance Period Optimization Model

Suppose that equipment is newest at time 0. [0,t] is the limited time zone in which equipment is running nonstop; [0,t] is divided into n preventive maintenance period, in which each time span of the preventive maintenance period is not necessarily equal. ti is the ith preventive maintenance period, where i∈1,2,…,n.Minor maintenance [35] is a strategy used in case of equipment failure during the preventive maintenance period ti. This strategy cannot change equipment failure rate and reliability. Minor maintenance time is very small and can be neglected, unlike ti.The objective function of PM is as follows:(6)minf=∑i=1nCrFi+∑i=1nCpαi,ti+∑i=1nClθi,where ∑i=1nCrFi is the cost of equipment shutdown caused by breakdown maintenance, Cr is the average maintenance cost of the equipment after the failure occurs, Fi is failure probability functions within ti, ∑i=1nCpαi,ti is the cost of equipment shutdown caused by preventive maintenance, Cpαi,ti is preventive maintenance cost function within ti, αi is age reduction factor [36], ∑i=1nClθi is the cost of equipment shutdown caused by inspection and maintenance, Cl is the cost of equipment shutdown caused by overhaul in unit time, and θi is the time of preventive maintenance in ti.In this paper, failure probability functionFi follows the Weibull distribution. Its probability density function is calculated by using(7)ft=mηtηm-1exp⁡-tmη,where η and m are the scale parameter and shape parameter of the inherent attribute of the equipment, respectively. The value of η and m can be calculated by using statistics and analysis of historical fault data.Failure probability is calculated by using(8)λt=mηtηm-1.Failure probability withinTi is calculated by using (9)Fi=∫0Tiλitdt,where λit is failure probability within ti and is a function of age reduction factor αi. The mathematical expression of λit can be obtained as follows:(10)λ1t=λt,λ2t=λt+t1-α1t1,λ3t=λt+t2-α2t2.And then(11)λit=λt+ti-1-αi-1ti-1=λt+∑k=1i-1tk-∑k=1i-1αktk=λt+∑k=1i-11-αktk,i=1,2,…,n.Therefore(12)Fi=∫0tiλitdt=∫0tiλt+∑k=1i-11-αktkdt,i=1,2,…,n.A finite time PMPOM as formula (13) is the cost of equipment shutdown caused by breakdown maintenance, preventive maintenance, and inspection:(13)minCr∑i=1n∫0tiλt+∑k=1i-11-αktkdt+∑i=1nCpαi,ti+∑i=1nCiθi(14)s.t.∑i=1nti+∑i=1nθi<T,i=1,2,…,n(15)Tl≤θi,i=1,2,…,n,where Tl is the minimum time for the preventive maintenance.The optimization objective is the minimized maintenance and production costs caused by downtime. The constraint is preventive maintenance operation time. The number of decision variables (2n+1) and the mathematical expressions (14) and (15) of the constraint conditions are also dynamic. Making the optimization problem is more complex than making a general multiobjective nonlinear optimization problem because of the effect of dynamic change. Therefore, using a high-efficiency method is necessary to solve this problem.


## 4. PSO-CS Hybrid Algorithm

### 4.1. PSOCS Hybrid Algorithm Model

The PSO has advantages such as easy understanding, simple operation, and rapid searching. However, in solving a large complex problem, PSO becomes easily trapped in local optimum. This weakness must be overcome to extend the practicability of PSO. CS has advantages such as few control parameters and high efficiency, but it also has some defects, such as slow convergence speed and low accuracy. In CS, high randomness of the Lévy flight makes the search process quickly jump from one area to another area. Thus, the global search ability of the algorithm is very strong. However, given the high randomness of the Lévy flight, the algorithm initiates a blind search process, convergence speed becomes slow, and the searching efficiency is significantly reduced close to the optimal solution.To improve the performance of CS, PSO is introduced in the update process of CS. Thus, a PSOCS hybrid algorithm is developed. PSOCS first uses Lévy flights in the search space to search, and then it uses the position of the PSO update mode to accelerate the particles to the optimal solution convergence. At the same time, the random elimination mechanism of CS can successfully escape local optima, thereby improving the performance of searching for the optimal solution.Algorithm terms are defined as follows.(1
) Population and Population Size (sizepop). The population is composed of a certain number of individuals; the total number of individuals is the population size, with sizepop.(2
) Fitness. Fitness is an index of individual quality. In general, a large fitness value corresponds to a good result, and vice versa.(3
) Search Space Upper Bound (Ub) and Search Space Lower Bound (Lb). Ub and Lb are the upper bound and lower bound, respectively, of the search space for the optimization problem.(4
) Maximum Search Velocity (
v
m
a
x
) and Minimum Search Velocity (
v
m
i
n
). Speed is limited as the algorithm performs a search. Consider vmax=a∗Ub, where a is the adjustment coefficient in the range of (0,1). Consider vmin=b∗Lb, where b is also the adjustment coefficient in the range of (0,1).(5
) PSO Search Mode. In this mode, an individual updates its position and velocity by using the process of PSO.(6
) Cuckoo Search Mode. An individual updates its position by using the process of CS. An individual in CS has no speed and velocity updating formula, whereas an individual in PSO search mode has both position and velocity. Individual velocity in the cuckoo search mode is not updated, and the current velocity of the individual is the velocity updated by PSO search mode.(7
) Discovery Probability. Through the random elimination mechanism in cuckoo search mode, the host has probability Pa of finding foreign eggs.A flowchart of PSOCS is shown in Figure2. Its procedure is as follows.Figure 2
Flowchart of PSOCS.Step 1.
The parameter is set, and the population is initialized. The parameters sizepop, run, Ub, Lb,a, b, Pa, η1, η2, ωmax, and ωmin are set. Population is initialized randomly, which includes initialization position p and velocity v of individual.Step 2.
The initial fitness value of the population is calculated by using the objective function, and the fitness value and position of the global optimal individual are determined.Step 3.
Cuckoo search mode is initiated. The position of the individual in Lévy flight search is updated by using formula (16), and a new individual is produced. The fitness values of new and old individuals are compared; the better result is selected as a new-generation individual.Step 4.
PSO search mode is initiated. The position and velocity of the individual are updated, and then a new individual is produced. The position is updated by using formula (1), and the velocity is updated by using formula (2). Before updating the velocity, the inertia weight coefficient needs to be updated by using (16)ω=ωmax-ωmax-ωmin∗iterrun,where iter and run are the current iteration times and maximum iteration times of the algorithm, respectively. ωmax and ωmin are the maximum and minimum inertia weights, respectively. In a comparison of the fitness values of new and old individuals, the one with the better result is selected as a new individual, and the global optimal individual is updated.Step 5.
Ann-dimensional vector Rn=[r1,r2,…,rn] is produced, and ri obeys a uniform distribution with [0,1]. When ri>Pa, a new individual is randomly produced by using formula (17). In a comparison between the fitness values of the old and new nests, the better one will be selected as a new generation of individuals in the population:(17)Tempi=Lb+Ub-Lb∗randn1,d.Step 6.
The global and individual optimal values are updated. The optimal positions of all the individuals and whole populations are updated.Step 7.
If the end condition of the algorithm is satisfactory, then the optimal position of the nest is outputted, and the algorithm is terminated; otherwise, Step  3 is performed.


### 4.2. Algorithms Test

In this paper, four test functions [37] are chosen to test the performance of the algorithm, and the results are compared with those of PSO and CS to verify the performance of the algorithm. The selected four test functions are shown in Table 1. The environment of the simulation experiment is as follows: CPU is an Intel Core i5-3470 @ 3.20 GHz with 4 GB of RAM, the computer system platform is a Windows 7 32-bit operating system, and the program is written in Matlab.Table 1
Test functions.
ID
Function expression
Search range
Theoretical optimal value
1
f
1
x
=
∑
i
=
1
10
x
i
2
[−100, 100]
min
⁡
f
1
x
=
0
2
f
2
x
=
∑
i
=
1
10
x
i
+
∏
i
=
1
10
x
i
[−100, 100]
min
⁡
f
2
x
=
0
3
f
3
x
=
∑
i
=
1
10
∑
j
=
1
i
x
i
2
[−100, 100]
min
⁡
f
3
x
=
0
4
f
4
x
=
0.5
+
sin
2
⁡
x
1
2
+
x
2
2
-
0.5
1
+
0.001
x
1
2
+
x
2
2
2
[−5, 5]
min
⁡
f
4
x
=
0The basic parameters of the algorithm are as follows: population size is 25, the maximum number of iterations of functionf1x is 1000, the maximum number of iterations of function f2x is 1000, the maximum number of iterations of function f3x is 2000, the maximum number of iterations of function f4x is 5000, ωmax=0.7, ωmin=0.4, η1=0.2, η2=0.5, ωmax=0.3∗Ub, and ωmin=0.3∗Lb.The tests use PSO, CS, and PSOCS to optimize the functions in Table1, and every function is optimized by repeating the tests 50 times. The average optimization results are shown in Table 2. After optimization was repeated 50 times, the minimum fitness value is the best value (optimal individual of algorithm), the maximum fitness value is the worst value, and the average fitness value is the average value. Fitness value square deviation is the mean square deviation that was obtained after optimization was performed 50 times and is shown in (18)σ=150∑i=150si-s¯2,where si denotes the results after 50 optimization iterations and s¯ is the average value.Table 2
Average fitness value of optimization results for PSO, CS, and PSOCS.
Test function
Algorithms
Minimum fitness value
Maximum fitness value
Average fitness value
Fitness value square deviation
f
1
x
CS
4.1797
×
1
0
3
2.2880
×
1
0
4
1.5607
×
1
0
4
3.7549
×
1
0
3
PSO
5.3129
×
1
0
3
2.3924
×
1
0
4
1.5416
×
1
0
4
4.1414
×
1
0
3
PSOCS
4.4090
×
1
0
-
24
1.2366
×
1
0
-
20
2.0111
×
1
0
-
21
3.0248
×
1
0
-
21
f
2
x
CS
433.4732
722.1931
555.8759
62.9874
PSO
7.0584
×
1
0
9
2.9650
×
1
0
14
2.5924
×
1
0
13
5.3873
×
1
0
13
PSOCS
1.6394
×
1
0
-
14
1.7799
×
1
0
-
11
6.5228
×
1
0
-
13
2.5319
×
1
0
-
12
f
3
x
CS
4.2811
×
1
0
3
2.0117
×
1
0
4
1.5079
×
1
0
4
3.7231
×
1
0
3
PSO
9.6441
×
1
0
3
4.2375
×
1
0
4
2.1081
×
1
0
4
7.4645
×
1
0
3
PSOCS
1.4565
×
1
0
-
13
1.2702
×
1
0
-
8
9.2612
×
1
0
-
10
2.2172
×
1
0
-
9
f
4
x
CS
1.3793
×
1
0
-
5
0.0097
0.0020
0.0022
PSO
4.8710
×
1
0
-
5
0.0107
0.0084
0.0033
PSOCS
0
0.0097
0.0019
0.0033Table2 shows that for the test functions f1x, f2x, f3x, and f4x, the global optimal solution found by PSO and CSO is not ideal with the current population size and number of iterations. To obtain better results, the size of the larger population needs to be set, and more iteration is needed. The global optimal solution found by PSOCS is infinitely close to the theoretical optimum of the test function.The optimization results off4x indicate poor optimization performance of PSO, CSO, and PSOCS under current parameter settings. The value distribution map of f4x in search space is shown in Figure 3. The figure shows that many local optimum points exist, and being trapped in local optima is easy. The average fitness value and fitness value square deviation are the two key indicators of the stability of the algorithm. Table 2 shows that the average fitness value of the test functions is close to the minimum fitness value, and fitness value square deviation is within the ideal range. Therefore, the algorithm is more stable than PSO and CSO.Figure 3
Value distribution map off4x.


### 4.3. Algorithm Performance Comparison

With the average fitness value, average optimal fitness value, and average standard deviation fitness value taken as the evaluating indicators, this paper tests PSOCS performance with changes in iteration times. The average fitness value is the average fitness value of results obtained after 50 times of optimization. The average optimal fitness value is the average optimal value obtained after 50 times of optimization. The average standard deviation fitness value is the average standard deviation fitness value obtained after 50 times of optimization. The change trends of the three evaluating indicators with the increase of iteration times are shown in Figures4, 5, and 6, respectively. Charts (a), (b), (c), and (d) in Figures 4, 5, and 6 show the performance of the evaluation indicators in the test functions f1x, f2x, f3x, and f4x, respectively.Figure 4
Change trend of average optimal fitness value.
(a)
(b)
(c)
(d)Figure 5
Change trend of average fitness value.
(a)
(b)
(c)
(d)Figure 6
Change trend of average standard deviation fitness value.
(a)
(b)
(c)
(d)It can be seen from Figure4 that the optimization ability of PSOCS in the four test functions is better than that of CS and PSO, and the optimal solution is infinitely close to the theoretical optimal solution.The performance of CS is different from the test function. It can find the optimal solution in the test functionf2x quickly. However, the performance of the other three test functions is not satisfactory, and more iteration is needed to find a satisfactory result.The optimization ability of PSO is the worst of the three algorithms on the test functions. The result that was obtained after 1000 iterations is almost the same as the optimal values of the initial population. As the number of iterations increase, PSO is unable to effectively improve the quality of the optimization results.The stability and convergence rate of the algorithm can be tested based on the average fitness value and average standard deviation fitness value with the increased number of iterations. Figures4, 5, and 6 show that PSO shows good stability and convergence rate in f2x, but not in the other test functions. PSOCS has a fast convergence speed and is close to 0 with fewer iterations. The performance of CS in the test functions is between that of PSO and PSO.The above analysis indicates that the performance of PSOCS is improved greatly by integrating CS and PSO. Moreover, the stability, convergence speed, and optimization ability of PSOCS are better than those of CS and PSO. Furthermore, PSOCS requires few iterations to search for the optimal results. PSOCS is efficient, stable, and fast and can effectively solve the problem of continuous space optimization. Therefore, it can also be used to solve the problem of the optimization of the preventive maintenance period.


## 4.1. PSOCS Hybrid Algorithm Model

The PSO has advantages such as easy understanding, simple operation, and rapid searching. However, in solving a large complex problem, PSO becomes easily trapped in local optimum. This weakness must be overcome to extend the practicability of PSO. CS has advantages such as few control parameters and high efficiency, but it also has some defects, such as slow convergence speed and low accuracy. In CS, high randomness of the Lévy flight makes the search process quickly jump from one area to another area. Thus, the global search ability of the algorithm is very strong. However, given the high randomness of the Lévy flight, the algorithm initiates a blind search process, convergence speed becomes slow, and the searching efficiency is significantly reduced close to the optimal solution.To improve the performance of CS, PSO is introduced in the update process of CS. Thus, a PSOCS hybrid algorithm is developed. PSOCS first uses Lévy flights in the search space to search, and then it uses the position of the PSO update mode to accelerate the particles to the optimal solution convergence. At the same time, the random elimination mechanism of CS can successfully escape local optima, thereby improving the performance of searching for the optimal solution.Algorithm terms are defined as follows.(1
) Population and Population Size (sizepop). The population is composed of a certain number of individuals; the total number of individuals is the population size, with sizepop.(2
) Fitness. Fitness is an index of individual quality. In general, a large fitness value corresponds to a good result, and vice versa.(3
) Search Space Upper Bound (Ub) and Search Space Lower Bound (Lb). Ub and Lb are the upper bound and lower bound, respectively, of the search space for the optimization problem.(4
) Maximum Search Velocity (
v
m
a
x
) and Minimum Search Velocity (
v
m
i
n
). Speed is limited as the algorithm performs a search. Consider vmax=a∗Ub, where a is the adjustment coefficient in the range of (0,1). Consider vmin=b∗Lb, where b is also the adjustment coefficient in the range of (0,1).(5
) PSO Search Mode. In this mode, an individual updates its position and velocity by using the process of PSO.(6
) Cuckoo Search Mode. An individual updates its position by using the process of CS. An individual in CS has no speed and velocity updating formula, whereas an individual in PSO search mode has both position and velocity. Individual velocity in the cuckoo search mode is not updated, and the current velocity of the individual is the velocity updated by PSO search mode.(7
) Discovery Probability. Through the random elimination mechanism in cuckoo search mode, the host has probability Pa of finding foreign eggs.A flowchart of PSOCS is shown in Figure2. Its procedure is as follows.Figure 2
Flowchart of PSOCS.Step 1.
The parameter is set, and the population is initialized. The parameters sizepop, run, Ub, Lb,a, b, Pa, η1, η2, ωmax, and ωmin are set. Population is initialized randomly, which includes initialization position p and velocity v of individual.Step 2.
The initial fitness value of the population is calculated by using the objective function, and the fitness value and position of the global optimal individual are determined.Step 3.
Cuckoo search mode is initiated. The position of the individual in Lévy flight search is updated by using formula (16), and a new individual is produced. The fitness values of new and old individuals are compared; the better result is selected as a new-generation individual.Step 4.
PSO search mode is initiated. The position and velocity of the individual are updated, and then a new individual is produced. The position is updated by using formula (1), and the velocity is updated by using formula (2). Before updating the velocity, the inertia weight coefficient needs to be updated by using (16)ω=ωmax-ωmax-ωmin∗iterrun,where iter and run are the current iteration times and maximum iteration times of the algorithm, respectively. ωmax and ωmin are the maximum and minimum inertia weights, respectively. In a comparison of the fitness values of new and old individuals, the one with the better result is selected as a new individual, and the global optimal individual is updated.Step 5.
Ann-dimensional vector Rn=[r1,r2,…,rn] is produced, and ri obeys a uniform distribution with [0,1]. When ri>Pa, a new individual is randomly produced by using formula (17). In a comparison between the fitness values of the old and new nests, the better one will be selected as a new generation of individuals in the population:(17)Tempi=Lb+Ub-Lb∗randn1,d.Step 6.
The global and individual optimal values are updated. The optimal positions of all the individuals and whole populations are updated.Step 7.
If the end condition of the algorithm is satisfactory, then the optimal position of the nest is outputted, and the algorithm is terminated; otherwise, Step  3 is performed.


## 4.2. Algorithms Test

In this paper, four test functions [37] are chosen to test the performance of the algorithm, and the results are compared with those of PSO and CS to verify the performance of the algorithm. The selected four test functions are shown in Table 1. The environment of the simulation experiment is as follows: CPU is an Intel Core i5-3470 @ 3.20 GHz with 4 GB of RAM, the computer system platform is a Windows 7 32-bit operating system, and the program is written in Matlab.Table 1
Test functions.
ID
Function expression
Search range
Theoretical optimal value
1
f
1
x
=
∑
i
=
1
10
x
i
2
[−100, 100]
min
⁡
f
1
x
=
0
2
f
2
x
=
∑
i
=
1
10
x
i
+
∏
i
=
1
10
x
i
[−100, 100]
min
⁡
f
2
x
=
0
3
f
3
x
=
∑
i
=
1
10
∑
j
=
1
i
x
i
2
[−100, 100]
min
⁡
f
3
x
=
0
4
f
4
x
=
0.5
+
sin
2
⁡
x
1
2
+
x
2
2
-
0.5
1
+
0.001
x
1
2
+
x
2
2
2
[−5, 5]
min
⁡
f
4
x
=
0The basic parameters of the algorithm are as follows: population size is 25, the maximum number of iterations of functionf1x is 1000, the maximum number of iterations of function f2x is 1000, the maximum number of iterations of function f3x is 2000, the maximum number of iterations of function f4x is 5000, ωmax=0.7, ωmin=0.4, η1=0.2, η2=0.5, ωmax=0.3∗Ub, and ωmin=0.3∗Lb.The tests use PSO, CS, and PSOCS to optimize the functions in Table1, and every function is optimized by repeating the tests 50 times. The average optimization results are shown in Table 2. After optimization was repeated 50 times, the minimum fitness value is the best value (optimal individual of algorithm), the maximum fitness value is the worst value, and the average fitness value is the average value. Fitness value square deviation is the mean square deviation that was obtained after optimization was performed 50 times and is shown in (18)σ=150∑i=150si-s¯2,where si denotes the results after 50 optimization iterations and s¯ is the average value.Table 2
Average fitness value of optimization results for PSO, CS, and PSOCS.
Test function
Algorithms
Minimum fitness value
Maximum fitness value
Average fitness value
Fitness value square deviation
f
1
x
CS
4.1797
×
1
0
3
2.2880
×
1
0
4
1.5607
×
1
0
4
3.7549
×
1
0
3
PSO
5.3129
×
1
0
3
2.3924
×
1
0
4
1.5416
×
1
0
4
4.1414
×
1
0
3
PSOCS
4.4090
×
1
0
-
24
1.2366
×
1
0
-
20
2.0111
×
1
0
-
21
3.0248
×
1
0
-
21
f
2
x
CS
433.4732
722.1931
555.8759
62.9874
PSO
7.0584
×
1
0
9
2.9650
×
1
0
14
2.5924
×
1
0
13
5.3873
×
1
0
13
PSOCS
1.6394
×
1
0
-
14
1.7799
×
1
0
-
11
6.5228
×
1
0
-
13
2.5319
×
1
0
-
12
f
3
x
CS
4.2811
×
1
0
3
2.0117
×
1
0
4
1.5079
×
1
0
4
3.7231
×
1
0
3
PSO
9.6441
×
1
0
3
4.2375
×
1
0
4
2.1081
×
1
0
4
7.4645
×
1
0
3
PSOCS
1.4565
×
1
0
-
13
1.2702
×
1
0
-
8
9.2612
×
1
0
-
10
2.2172
×
1
0
-
9
f
4
x
CS
1.3793
×
1
0
-
5
0.0097
0.0020
0.0022
PSO
4.8710
×
1
0
-
5
0.0107
0.0084
0.0033
PSOCS
0
0.0097
0.0019
0.0033Table2 shows that for the test functions f1x, f2x, f3x, and f4x, the global optimal solution found by PSO and CSO is not ideal with the current population size and number of iterations. To obtain better results, the size of the larger population needs to be set, and more iteration is needed. The global optimal solution found by PSOCS is infinitely close to the theoretical optimum of the test function.The optimization results off4x indicate poor optimization performance of PSO, CSO, and PSOCS under current parameter settings. The value distribution map of f4x in search space is shown in Figure 3. The figure shows that many local optimum points exist, and being trapped in local optima is easy. The average fitness value and fitness value square deviation are the two key indicators of the stability of the algorithm. Table 2 shows that the average fitness value of the test functions is close to the minimum fitness value, and fitness value square deviation is within the ideal range. Therefore, the algorithm is more stable than PSO and CSO.Figure 3
Value distribution map off4x.


## 4.3. Algorithm Performance Comparison

With the average fitness value, average optimal fitness value, and average standard deviation fitness value taken as the evaluating indicators, this paper tests PSOCS performance with changes in iteration times. The average fitness value is the average fitness value of results obtained after 50 times of optimization. The average optimal fitness value is the average optimal value obtained after 50 times of optimization. The average standard deviation fitness value is the average standard deviation fitness value obtained after 50 times of optimization. The change trends of the three evaluating indicators with the increase of iteration times are shown in Figures4, 5, and 6, respectively. Charts (a), (b), (c), and (d) in Figures 4, 5, and 6 show the performance of the evaluation indicators in the test functions f1x, f2x, f3x, and f4x, respectively.Figure 4
Change trend of average optimal fitness value.
(a)
(b)
(c)
(d)Figure 5
Change trend of average fitness value.
(a)
(b)
(c)
(d)Figure 6
Change trend of average standard deviation fitness value.
(a)
(b)
(c)
(d)It can be seen from Figure4 that the optimization ability of PSOCS in the four test functions is better than that of CS and PSO, and the optimal solution is infinitely close to the theoretical optimal solution.The performance of CS is different from the test function. It can find the optimal solution in the test functionf2x quickly. However, the performance of the other three test functions is not satisfactory, and more iteration is needed to find a satisfactory result.The optimization ability of PSO is the worst of the three algorithms on the test functions. The result that was obtained after 1000 iterations is almost the same as the optimal values of the initial population. As the number of iterations increase, PSO is unable to effectively improve the quality of the optimization results.The stability and convergence rate of the algorithm can be tested based on the average fitness value and average standard deviation fitness value with the increased number of iterations. Figures4, 5, and 6 show that PSO shows good stability and convergence rate in f2x, but not in the other test functions. PSOCS has a fast convergence speed and is close to 0 with fewer iterations. The performance of CS in the test functions is between that of PSO and PSO.The above analysis indicates that the performance of PSOCS is improved greatly by integrating CS and PSO. Moreover, the stability, convergence speed, and optimization ability of PSOCS are better than those of CS and PSO. Furthermore, PSOCS requires few iterations to search for the optimal results. PSOCS is efficient, stable, and fast and can effectively solve the problem of continuous space optimization. Therefore, it can also be used to solve the problem of the optimization of the preventive maintenance period.


## 5. PSOCS for PMPOM

We use PSOCS to solve the preventive maintenance period optimization problem. Historical fault data analysis shows that the equipment fault time approximately follows the Weibull distribution with the parametersm=2 and η=50. The rest of the parameters are shown in Table 3. With the above data and (9), (12), and (13), the constrained preventive equipment within the [0,1000] maintenance model can be obtained.Table 3
Parameter setting.
Parameters
T
C
l
C
r
T
l
C
p
α
i
,
t
i
α
i,  i=1,2,…,n
Value
1000 h
2000
560
3 h
200
+
25
α
i
t
i
0.95The PSOCS parameters are as follows: sizepop = 25, run = 300,ωmax=0.7, ωmin=0.4, η1=0.2, η2=0.5, Pa=0.25, search range is [0,1000], and speed range is [-300,300].The optimization results are shown in Table4. The curve of the optimization results is shown in Figure 7. The above optimization results indicate that the minimum total cost is 102820 and the four preventive maintenance period gBest are 185.98, 216.63, 225.62, and 212.05.Table 4
Optimization results.
PM times
Cost
PM operation timeθi
0
224000
—
1
168340
3
2
137620
3
3
111640
3
4
103570
3
5
102820
3
6
106320
3
7
110490
3Figure 7
Optimization results of test.When the maintenance time is 4, PSOCS is applied to solve the problem. The average fitness and optimal fitness of the population that changes with iteration times are shown in Figure8. The standard deviation of population fitness that changes with iteration times is shown in Figure 9.Figure 8
Average fitness and optimal fitness of the population changing with iteration times.Figure 9
Standard deviation of the population fitness.Figure8 shows that PSOCS can search the optimal solution in fewer than 100 iterations. The curves of the average and optimal fitness almost coincide, which shows that the algorithm has converged. Figure 9 shows that the standard deviation of the population fitness declined rapidly and reaches down to 0. Figure 10 shows the optimal fitness of the population (sizepop = 25). From Figure 10, the optimal fitness of each individual is 102820. This result indicates that the algorithm has a fast convergence rate and good stability. The test proves that PSOCS can effectively solve the maintenance period optimization problem based on the optimization model proposed in this paper.Figure 10
The optimal fitness of the population (sizepop = 25).


## 6. Conclusions and Further Works

In this paper, a PSOCS hybrid algorithm is developed to solve a finite time PMPOM in which the costs of equipment shutdown caused by breakdown maintenance, preventive maintenance, and inspection are used as evaluation indexes. Compared with PSO and CS, PSOCS has the advantages of fast convergence speed, strong searching ability, and the ability to solve the problem of multidimensional continuous space optimization by using test functions. A test example shows that PSOCS can effectively solve the maintenance period optimization problem based on the proposed optimization model. Furthermore, we established the PMPOM based on economic and reliability indicators. This model can be considered a multiobjective optimization problem, which is addressed by using PSOCS.



---

*Source: 1516271-2016-02-16.xml*