## 3 Mission and Reliability Driven Fleet Selective Maintenance Planning Two-Stage Method
### Algorithm Design  
#### 3.2.1 An Improved Sparrow Search Algorithm Used for Solving Selective Maintenance Planning  
The sparrow search algorithm (SSA) is a swarm intelligent algorithm developed based on sparrows' foraging and antipredation mechanism, proposed by [PERSON] et al. (2018), and it has attracted wide attention since it was proposed ([PERSON] et al., 2018; [PERSON] et al., 2018). [PERSON] et al. compared the performance of this algorithm with some other typical swarm algorithms in recent years through a series of test functions and believed that this algorithm has great research and application potential ([PERSON] et al., 2018). In this section, a multiobjective sparrow search algorithm (MSSA) is proposed to solve the multiobjective selective maintenance model. The original sparrow search algorithm is mainly aimed at a single-objective optimization problem. In the process of swarm position update, some solutions with poor fitness will jump directly near the optimal position, which will accelerate the convergence rate of the algorithm but also affect the global search ability of the algorithm, easily resulting in local optimal. In order to improve the algorithm and make it more suitable for the multiobjective selective maintenance model designed in this paper, this section improves the position update rules of the sparrow search algorithm, introducing the NSGA-II nondominated sorting method ([PERSON] et al., 2018). The improved algorithm is introduced as follows:Coding method  
A reasonable coding method is very important for the process of optimizing the algorithm to solve the problem. In this paper, component-based coding is adopted, and each component's maintenance level in the maintenance strategy corresponds to a code. The dimension of the population is equal to the total number of components in the system, and the position information of each dimension is equal to the maintenance-level code of the components. In this coding way, the solution space of the maintenance planning problem can correspond to the search space of the sparrow search algorithm, and then the search is carried out through the location update process. Nondominant sorting method  
In the process of location updating, the sparrow search algorithm needs to sort the population according to fitness. Since the problem involved in this paper is a multiobjective optimization problem, there is no fixed fitness calculation method. One way to solve this problem is to use NSGA-II nondominated sorting method to divide sparrow populations. The main steps of this sorting method are as follows: First, each individual in the population is compared with other individuals, and all the other individuals that dominate the individual are recorded. Then, all nondominant individuals are included in Pareto's optimal frontier, that is, the first nondominant level. These individuals are then removed from the dominant records of the remaining individuals, the nondominant individuals of the remaining individuals are included in the second nondominant class and so on, until all individuals are included in a nondominant class. In this way, the operation rules of the original algorithm can be simulated by the operation of different non-dominant-level individuals. Nondominated solution set update strategy  
After Pareto frontier solutions are obtained by nondominated sorting, these solutions should be input into external files and saved. Because swarm intelligence algorithm usually has a large number of iterations, the number of Pareto frontier solutions output by the algorithm is large, and these solutions cannot all be kept, so there is usually a capacity limit of external files. The NSGA-II algorithm adopts the crowding ranking method to protect the diversity of solutions in external files so as to ensure that the distribution of the output solution set of the algorithm is sufficiently dispersed in the target space [29]. Crowding is a number that measures how close a solution is to its neighbors in the solution set.