This section will provide a detailed introduction to the optimization algorithm for solving the aircraft maintenance operation scheduling problem, including the encoding method, individual decoding process, and the design and implementation steps of the Reverse Learning Particle Swarm Optimization algorithm.
3.2. Individual Decoding of Populations
The core of the decoding process is to convert the priority encoding into a feasible maintenance schedule, achieving the goal of minimizing total maintenance time through a priority sorting and resource optimization allocation strategy. The specific steps are as follows:
- 1.
Initialize the completed operation set S (empty) and the schedulable operation set D (initially contains all operations without predecessor constraints).
- 2.
Sort the operations in D in ascending order based on their priority value. Select the operation with the highest priority.
- 3.
Allocate resources using a left-shift strategy: Analyze idle time slots of maintenance personnel, equipment, and space. Through time series analysis and intersection operations, select the earliest available time window that meets the operation’s duration requirement.
- 4.
Determine the start time of operation (take the maximum of the completion time of its predecessors and the earliest available time of the resources). Calculate the completion time .
- 5.
Move from D to S. Update D by adding new operations whose predecessors have all been completed.
- 6.
Repeat steps 2–5 until all operations are scheduled.
In step 1, the schedulable operation set D is initialized to contain all operations without predecessor constraints. Each time step 5 is conducted, schedulable operations of which predecessors are completed is added to set D. These ensure that all operations in set D are feasible.
This decoding method effectively shortens operation waiting time by utilizing resource idle time, ensuring the minimization of total maintenance time.
3.3. Hybridized Particle Swarm Optimization
The basic Particle Swarm Optimization (PSO) algorithm is prone to issues like insufficient population diversity and premature convergence when applied to aircraft maintenance scheduling optimization, making it difficult to explore better schedules. Therefore, this paper introduces a reverse learning mechanism and partial random operations into the basic PSO framework, designing an improved RL-PSO algorithm. Its core improvement logic revolves around enhancing exploration capability and ensuring convergence efficiency.
The introduced reverse learning mechanism expands the population search space by constructing reverse particles. Dynamically generating reverse particles corresponding to the global best particle during iteration effectively improves the overall quality of the initial population and helps the population escape local optima. Simultaneously, partial random operations periodically perform local random resets on some non-optimal particles, preventing the population from over-converging to a single search area. By controlling the random intensity appropriately, the structure of good solutions already found is protected.
The two mechanisms work synergistically: reverse learning is responsible for global diversity expansion, and partial random operations are responsible for local area fine exploration. This ultimately achieves a balance between fast convergence and global optimum, adapting to the optimization requirement of minimizing time under multi-operation, multi-resource constraints in aircraft maintenance scheduling. The algorithm flowchart is shown in
Figure 2.
Step 1: Population Initialization. First, according to the aircraft maintenance task, randomly initialize the positions and velocities of a particle population of size Np. Calculate the fitness function values corresponding to the population using the designed decoding method. Select the individual best () and the global best particle (). Set the iteration counter G = 1.
Step 2: Following the Optimum. The particle swarm updates individuals based on the current and according to the particle velocity update rules.
Step 3: Reverse Learning Phase. The particle swarm generates reverse particles through the reverse learning mechanism, performs optimization judgment, and retains the better individuals.
Step 4: Random Particle Perturbation Phase. Based on a random perturbation probability, some position vectors of some particles are re-randomized. This increases the diversity of particles in the population, enhancing the global search capability.
Step 5: Termination Judgment Phase. Check whether the termination condition for the optimization iteration is met. If yes, end the iteration and output the best particle found and its corresponding maintenance schedule. Otherwise, set G = G + 1 and go to Step 2 to continue the optimization iteration.
3.3.1. Following the Optimum Phase
This phase operates on the principle of following the current optimal particles. It uses individual best and global best particles to guide the iteration of individual particles to improve the overall swarm level. Let the position of the i-th particle be
and its velocity be
. Its individual extreme value (
) is defined as
, and the global extreme value (
) is defined as
. Particle
updates its velocity and position according to the following formulas:
where
,
,
are the position, velocity, and individual best of the i-th particle,
is the global best particle.
and
are random numbers uniformly distributed in [0, 1],
and
are acceleration coefficients, typically set to 2,
is a constriction factor to control the weight of the velocity. To prevent the velocity from becoming too large, a maximum velocity
is set. If
, then
.
is the inertia weight, whose variation determines the global/local search capability during the following phase. Therefore, a random inertia weight strategy is adopted to change the single search pattern.
3.3.2. Reverse Learning Phase
The reverse learning mechanism is implemented through two steps: reverse particle generation and optimal solution selection. Considering the characteristics of aircraft maintenance scheduling encoding (particle positions are operation priority values in the (0, 1) interval), the specific design is as follows:
- (1)
Definition and Calculation of Reverse Particles
For the i-th particle with position
(M is the total number of operations,
represents the priority of the m-th operation, smaller value means higher priority), its reverse particle
is calculated as:
where
and
are the lower and upper bounds of the particle position. This formula ensures that the reverse particle is symmetrically distributed in the search space relative to the original particle, potentially covering areas not explored by the original particle.
- (2)
Reverse Learning during Iteration Phase
To prevent the population from converging to a local optimum during iteration, the RL-PSO algorithm generates global best reverse particles every 10 generations. It extracts the current global best particle , calculates its reverse particle , compares the fitness of the two particles, and updates and retains the global best. By periodically generating the reverse of the global best, it explores potentially better solutions in the symmetric search area, enhancing global search capability.
3.3.3. Partial Random Strategy
The core of the partial random operation is controllable random perturbation. It only resets local dimensions of some non-optimal particles in the population, avoiding breaking good solutions while increasing flexibility in local exploration. By applying a random strategy judgment to particles, some of their position vectors are reset.
3.4. Overall Framework
The overall framework of the RL-PSO algorithm follows the core logic of encoding–decoding–iterative optimization, forming a complete optimization closed-loop adapted to the RCPSP model for aircraft maintenance scheduling. First, an initial population is generated using decimal priority encoding, avoiding the complex feasibility checks of traditional integer encoding. Next, through the decoding strategy of priority sorting and left-shift resource allocation, particle encodings are transformed into actual schedules that satisfy multiple constraints. Then, during the iteration process, the local exploitation of the following optimum phase, the global exploration of the reverse learning phase, and the local perturbation of the partial random operation are integrated to dynamically balance optimization accuracy and efficiency. Finally, upon meeting the termination condition, the schedule with the optimal total maintenance time is output. The entire framework closely connects the constraint requirements of the mathematical model with the algorithm improvement mechanisms, ensuring that each step serves the core objective of minimizing the total maintenance period under multi-resource constraints, achieving deep synergy between the model, encoding, and algorithm.