Solving the Periodic Maintenance Scheduling Problem via Genetic Algorithm to Balance Workforce Levels and Maintenance Cost

Problem statement: In this article we address the multi-objective Per iodic Maintenance Scheduling Problem (PMSP) of scheduling a set of cy cli maintenance operations for a given set of machines through a specified planning period to min i ize the total variance of workforce levels measured in man-hours and maintenance costs with eq ual weights. Approach: The article proposed a mixed integer non-linear math programming model a nd linearised model for the PMSP. Also, we proposed a Genetic Algorithm (GA) for solving the p roblem using a new genome representation considered as a new addition to the maintenance sch duling literature. The algorithms were compared on a set of representative test problems. Re ults: The developed GA proves its capability and superiority to find good solutions for the PMSP and outperforms solutions found by the commercial optimization package CPLEX. The results indicated that the developed algorithms were able to identify optimal solutions for small size problems up to 5 machines and 6 planning periods.The GAs defined solutions in 22 seconds con suming less than two kilobytes with a reliability of 0.84 while the nonlinear and linear models consumes on average 705 and 37 kilobytes respectively. Conclusion: The developed GA could define solutions of averag performance of 0.34 and 0.8 for the linearized algorithm compared with lower bound defined by the nonlinear math programming model. We hope to expand the developed algorithms for integrating maintenance planning and aggregate production planning problems .


INTRODUCTION
The preventive maintenance scheduling is among the most important problems faced by productive/service organizations. The preventive maintenance applied by servicing the equipment on regular intervals is for the purpose of increasing its reliability as much as possible. The problem has attracted researchers due to its economical importance and complexity, see for example Dekker (1996). These articles and others contained therein were interested in modeling and solving the problem to minimize the cost or maximize the machine lifetime. Extensive research treated the problem as a stochastic model whereas the machine failures described by probability distributions (see for instance Gertsbakh and Gertsbakh (2000) while a little was concerned with the deterministic case where the failures described by constant parameters (see Wagner et al. (1964) for an early reference).
Two variants of maintenance planning problems exist in literature, the Free Periodic Maintenance Scheduling Problem (FPMSP) and the Periodic Maintenance Scheduling Problem (PMSP). The FPMSP considers T as a decision variable and aims to find the optimal T* optimizing maintenance costs while the PMSP assumes values of cycle lengths. Bar-Noy et al. (2002) have shown that the FPMSP is NP-hard even when T* is known so this implies the PMSP is NP-hard (Grigoriev et al., 2006).
The PMSP is to find a cyclic maintenance schedule of a given length T for a set of machines to optimize predefined organization goals. The maintenance scheduling problems research work could be broadly categorized as stochastic and deterministic approaches based on the machine failures pattern. The nature of machine failures in stochastic approaches is described by probability distributions (see for instance Gertsbakh and Gertsbakh (2000)) while the deterministic approaches are used to describe the cyclic maintenance scheduling activities assuming a fixed cycle length. The stochastic machine failure maintenance scheduling has attracted researchers more than the deterministic case.
costs are 4227969 and 1361584 with a total variance of 5,589,553. For a set of 15 practical cases of 10 machines and T = 12, we solved each case by both random and heuristic approaches. The resulting variance for each case is depicted at the scatter plot of Fig. 1. The scatter plot shows that the random plan where we begin the cycle for each machine by a random maintenance operation always gives larger variance than the heuristic approach.
Our motivations for investigating the PMSP rather than FPMSP are threefold. First of all, the PMSP is a more practical and industrial problem than the academic FPMSP where the number of machines may reach to 500 or more and the cycle length might be 250,52,30,7,24 or 60. The second motivation of this study is solving the PMSP to optimality whereas most previous research work was focused on the complexity and approximation of the PMSP. A third motivation of our work is to consider a real objective of smoothing the workforce levels and maintenance costs through T using a non-linear objective function (variance).
The purpose of this study is to introduce Genetic Algorithms (GAs) as a solver for the PMSP with the objective of minimizing the total variance of workforce man-hours and maintenance costs with equal weights. GAs include features for handling a large number of constraints, modeling flexibility in dealing with problem complexity, utilizing less CPU memory allocation than mathematical programming techniques, handling the multi-criteria nature of real-world problems without any modeling complications and ease of implementation. Furthermore, there have been a significant number of studies that have shown GAs effectiveness in solving hard combinatorial problems. For example, Beasley and Chu (1996) and Lorena and Lopes (1997) applied GA to the set covering problem. Also, we proposed a mixed-integer non-linear math programming model and a linearized model for the PMSP to evaluate the performance of the developed GA. The evaluation was based on the solution defined by math models due to the concerned problem differ from the standard PMSP so the existing solution methods must developed to handle this difference.
Also, Schabanel (2000) showed that the preemptive FPMP was also NP-hard. Kenyon et al. (2000) introduced a Polynomial-time approximation scheme for data broadcast of a bounded service costs environment while the non-identical service times case was studied by Kenyon and Schabanel (2001). Brauner et al. (2001) addressed the complexity of high multiplicity scheduling problems that arise from compact encodings of solutions.
A dynamic programming technique to minimize the salvage costs and the discounting of costs of operating a parallel machine shop whose operational costs increase with age. The problem deals with the possibility of replacing a machine at each planning period at the expense of purchasing costs.
Based on the previous survey, we note that no research work done tackling the PMSP with a large number of machines corresponds to real-world manufacturing systems. Also, no research was done to minimize the total variance workforce man-hrs and maintenance costs. Moreover, previous research focused on the parallel machine problem when at each planning period there was one machine in maintenance and other machines in service but this study allowed for more than one machine to be in maintenance.

MATERIALS AND METHODS
The solution methodology: In this article, we adopt a solution methodology shown in Fig. 2. The methodology consists of four steps. The first step begins by generating a set of test problems by considering the factors affecting the complexity of the PMSP and their levels. The system size, cycle length and the number of different maintenance operations were considered. A full experimental design was adopted to generate the full factorial design for the factors. Each design was replicated 50 times to generate 50 instances per design.
A standard time-indexed mixed-integer non-linear math programming model was developed in the second step to represent the PMSP for minimizing the total variance of man-hours and costs through the planning period with equal weights. The model considers the maintenance plan sequence of operations for all machines, the total of man-hours per period must not exceed the available and the total maintenance cost doesn't exceed the available money allocated to perform maintenance operations. The software package LINGO was applied to solve all non-linear models. A linear integer math programming model version for the original PSMP was developed by linearizing the nonlinear terms in the objective function and adding the necessary constraints to find the global optimal solution. The software CPLEX was used to find the linear solutions. Applying integer math programming solvers to handle practical problems usually has many practical implementation difficulties such as higher CPU seconds, memory bytes and needs more modeling effort to code the problem in the math form.
GAs were used extensively in scheduling literature to solve these difficulties whereas they do not need high amount of CPU seconds, consume low memory bytes compared with math programming solvers and they do not need a lot of coding effort to formulate the problem in genetic form. Moreover, the math programming solvers for large-size problems might fail to find any feasible solution in suitable CPU seconds, whereas the GAs find a feasible solution during the initial evolution process. Unfortunately, GAs need their parameter tuning to find better solutions for complex problem structures.
The third step is concerned with designing the developed GA by conducting a full factorial design for the factors affecting the GA's efficiency. Each factor levels were defined and the GA was run for 100 replicates per design. The parameter's selection criterion was the best average performance for minimizing the variance. After the GA's parameter tuning step, we applied the developed GA in the last step to find the solution of the generated test problems at step 1. Each problem was solved 100 times to find the minimum, average and maximum variances, reliability to find the minimum variance, average consumed CPU seconds and the average memory bytes were traced with respect to different population sizes and number of generation combinations.

Fig. 2: The solution methodology
By comparing the three developed solution models for the PSMP, we could find the limitations, advantages, disadvantages and applicability of using each model to solve real-world maintenance scheduling problems.
We will propose a mixed-integer non-linear math programming model for the PSMP and the linearised version of the model.

The math programming models:
We develop a mixed-integer non-linear math programming model for PMSP as a standard time-indexed formulation and linearise it to find the global optimal solution. The notations used in this formulation are listed below.

Parameters:
a = Weight to balance man-hours and maintenance cost variances and 0 ≤ a ≤ 1. It equals to 0.5 in this article c j = The cost for maintenance operation j of the standard machine C j = The available money at period j for maintenance operations c ki = Complexity parameter for machine number l of type k h ikl = The required man-hours to perform maintenance operation i for machine number l of type k and equals to h j , c kl h j = The required man-hours to perform operation j for the standard machine H j = The available man-hours at period j M = Number of machine types m k = Number of machines per type k T = Cycle length Decision variables: x ijkl = A binary decision variable equals to 1 if a maintenance operation i will be performed at period j of the machine type k for the machine number l and equals to 0 otherwise y ikl = An integer variable represents the completion time of maintenance operation i for the machine number l of type k z jkl = A binary decision variable equals to 1 if any maintenance operation will be performed at period j or the machine number l of type k and equals to 0 otherwise Based on the definitions of indexes, parameters and decision variables we formulate the multi-objective mixed-integer non-linear math programming model for the PSMP as follows: The objective function shown in Eq. 1 minimizes the total variances of man-hours and costs for planning periods T. Eq. 2 ensures that the total allocation of manhours per period doesn't exceed the available per period J. Equation 3 ensures that the total allocated costs per period are not more than the available. Equations 4-6 ensure that maintenance operations assignment follow the sequence of operations for the standard unit maintenance cycle. The variable domains are defined by Eq. 7.
In this article, we reformulate the model to a mixed-integer linear formulation by performing the following variable transformations. For each product of binary variable pairs ijkl pqrs x .x in the objective function, replace ijkl pqrs x .x by ijklpqrs z and adding the following three constraints as shown in Eq. 8-11: The linearised model can find the global optimal solution for the non-linear model for small-size problems and also can find lower bounds for larger problems. We will introduce a GA formulation for the PSMP by originating a new genome representation for minimizing the total variance of man-hours and costs.
The proposed genetic algorithm: The GA is an optimization heuristic based on a stochastic search which mimics the biological process of natural selection (Goldberg, 1989;Davis, 1991). It has widely applied to solve hard single and multi-criteria optimization problems as job-shop scheduling, flexible manufacturing loading, transportation planning, daily image selection problem (Mansour and Dessouky, 2010). The algorithm evolves with a constant population size for a predefined period defined by a stopping criterion. This criterion may be a fixed number of generations, a certain execution time, or until an occurrence of a population convergence. The GA begins by generating an initial population of individuals known as genomes. Each genome represents a feasible solution for the problem and has a fitness controlling its existence in the next generations. At each generation, a new population is formed by mating genomes as a result of applying genetic operators as crossover and mutation so the good genomes replace the worst ones in the current generation (Michalewicz, 1996). A systematic GA's structure is depicted in Fig. 2.
We will develop a GA to provide efficient solutions to the predefined PSMP. We first begin with introducing a new genome representation for the PSMP and then a detailed GA's structure will be defined in terms of initialization, selection, crossover and mutation and replacement mechanisms. Also, the genome's fitness evaluation is illustrated besides conducting an experiment to define the most affecting GA's components on maximizing the algorithm performance.

Genome representation, initialization, selection and genetic operators:
The proposed genome consists of number of genes equal to the total number of machines in the manufacturing system, ∑m k for all values of k. Each gene's allele was generated from a discrete uniform distribution with lower and upper bounds equals to 1 and T respectively. The gene order in the genome sequence represents the machine number while the gene's allele represents the maintenance operation that will be performed on that machine at period 1 of the planning horizon. For example, the allele value at position 2 of a hypothetical genome represents the first maintenance operation that will be performed at period 1 for machine number 2. Figure 3 illustrates an industrial system consisting of 5 machines and it is required to construct a maintenance schedule for 6 planning periods. The first machine (M1) chosen as a standard machine and has maintenance schedule of O 1 , O2,….,O 6 , while the third machine schedule is O 2 ,O 3 ,O 4 ,O 5 ,O 6 ,O 1 and so on. The depicted schedule could be presented as the genome O 1 , O 6 , O 2 , O 5 , O 4 . The genome indicates that maintenance operations 1, 6, 2, 5 and 4 will be adopted for machines 1 to 5 as the starting maintenance operation at period 1. The proposed genome advantages are the small length, avoiding the representation's infeasibility that exhausts GAs and existence of the standard genetic operators.
The initial population was randomly generated and controlled by various genetic operators through the evolution process. Different selection operators were adopted as tournament, ranking, roulette wheel and uniform. One point, two point and uniform crossover operators were applied. The flip and Gaussian mutation operators were applied in the developed GA. Genome's fitness evaluation: The genome's fitness determines the power to achieve the objectives of solving the problem. It controls the genome's existence through the evolution process. In this article, the fitness evaluation process evaluates the total variance of manhours loads and costs per planning period. The variance was computed by the formula shown in Eq. 11. The X J variable represents the total man-hours or costs allocated by a plan at period j while x is the overall average of all periods and is the average per period j: For the shown example in Fig. 3, the total manhours for periods are 24, 23, 22, 21, 25 and 20 respectively. The overall average of 22.5 man-hours is achieved for the given schedule and variance equals to 0.324. Also, the cost's variance equals to 0.179. The total of these two variance components gives the genome's objective.

RESULTS AND DISCUSSION
Genetic algorithm parameter settings: To identify the best GA's parameters for the PMSP, we conducted a full experimental design on 8 factors. The eight factors were tested on 5 randomly generated test problems including 10,20,30,40 and 50 machines and a planning period of 52 weeks. The experiment's objective is to define the most effective level for each factor and the most effective factor combinations associated with the difference in the GA's behavior. The factors are selection, crossover, mutation schemes, crossover and mutation probabilities, replacement percentage, population size and number of generations. It is indicated that these factors affects the algorithm efficiency. The population size and number of generations varied for each problem hence they will be defined for each one separately. Based on the experiments the factors settings of uniform crossover probability of 0.93, flip mutation probability of 0.01 and roulette wheel replacement percentage of 0.25, give the best average total variance. For each test problem, the genetic algorithm was run 100 times, each time with a different initial random seed.
We will test the developed math programming and GA models on a set of test problems considering the most affecting factors on the PSMP's complexity. The objective is to find out the advantages, disadvantages and limitations for each solution method for solving the problem under consideration. The comparison criteria will be solution quality, CPU time measured in seconds to reach best solutions and the consumed memory Megabytes consumed by the CPU during processing the various algorithms.

Computational experiments:
We tested the proposed algorithms on a set of 100 test problems representing the full factorial design for three factors. These factors are system sizes of {5,10,20,30,50} machines, cycle lengths of {6,12,24,36,52} and number of different maintenance operations per cycle of {2,3,4,5}. We assumed that there are 9 maintenance operations' options where the first option represented an overhaul operation. The man-hours required for an overhaul is generated from a discrete uniform random number from [1500,1600] while other operations man-hours is generated from the discrete uniform distributions from [45,55]    The MATLAB software was used to code the developed GA heuristic that tested on a Fujitsu Siemens Laptop, Intel (R) Pentium (R) M with 240 MB RAM, 40 GB HDD, 1.6 GHz speed computer system running Windows XP. 100 test problems were generated for each design resulting 10000 instances. Each problem was solved by the mixed-integer non-linear and linearized math programming models using CPLEX software and hence solved by the developed GA. Table  2 summarizes the experimentation results. Columns 1-4 depict the design number, system size, cycle length and number of different maintenance operations. Columns 5 to 8 present the average lower bounds (LB) of the 100 problem per design, the average Upper Bounds (UB), the memory allocated to the linear solver and the time consumed in CPU seconds by CPLEX. Columns 8 to 10 give the performance of the mixed-integer nonlinear programming model in terms of average lower bounds referenced to the lower bounds of the linear model given at column 5, the consumed memory and the CPU seconds. Columns 12-18 presents the GA's performance in terms of best, mean, worst, reliability (Rel) measured as the average number of times the GA could find the best solution divided by 100, memory consumed (Mem), CPU seconds and population size/number of generations. The "--" indicates that a math programming stopping criterion of 36,000 seconds. A random seed was used for each GA's evolution.
For the smallest level of 5 machines and 6 planning periods, the nonlinear, linearized math models and the developed GA were able to identify the optimal solution but the GA solved each design in a second consuming Megabytes whereas math models consume larger CPU seconds and memory bytes. By increasing the number of machines, the developed algorithms could not define optimal solutions but GA could find solutions better than the math models for all remaining problems. The nonlinear math algorithm could find solutions with lower bounds better than the linearised version where the linear model defines feasible solutions for 4 problems. The nonlinear model trapped in local optimal solutions for 25 problems before achieving the stopping criteria of 36,000 seconds as listed in Table 2.
With regard to the CPU seconds, the developed GA could find better solutions rather than the math programming models where it takes on average 22 sec.
The mixed integer linear math programming model could not define solutions for 96 and 75 problems respectively. The GA success to define solutions with average reliability of 0.84. The Rel, CL and O were interrelated by the equation Rel = 1.02-0.00573×M-0.00123×CL-0.00388×O for the developed GA. The developed GA outperforms both the math programming models in finding best solutions in suitable computational time and Megabytes.

CONCLUSION
This article addressed the minimization of a hard mixed-integer non-linear optimization problem related to the periodic maintenance scheduling. The problem had a predefined sequence of maintenance operations on a set of machines for a definite planning period. The objective was to minimize the total man-hours and cost variances along the planning horizon with equal weights. We developed a mixed-integer non-linear math programming model and the linearised version of the problem. Also, we developed a GA for solving the problem and compared the performance of algorithms on a generated set of test problems. The results indicated the superiority of the developed GA on the math programming models with respect to solution quality, memory allocated to each algorithm and the CPU seconds.
The natural expansion to this work is to consider the relevant and efficient meta-heuristics like simulated annealing, taboo search, particle swarm and ant colony optimization approaches and analyzing their performances in order to get a better understanding of how benefits are attained from using each approach. Also, we can consider the integration between maintenance planning and aggregate production planning problems. A possible work could be done by considering other maintenance strategies as reliabilitybased and condition-based approaches. Analyzing the resulting linear integer programming model for figuring out integrality gaps and valid inequalities strengthening the formulation would be a nice expansion to the field.