Application of Genetic Algorithm on Spare Part Automotive Body Scheduling

Job shop scheduling is one of the complex problems in the manufacturing industry, such as an automotive body manufacturer. This manufacturing company, located in Cikarang, Indonesia, deals with huge customer demand that leads to difficulties in production scheduling. This will cause a delay in some jobs and product deliveries. The current system is using the semi-active scheduling approach and requires 637 minutes for performing 6 jobs with 5 machines. The genetic algorithm (GA) model is proposed as an alternative solution to solve this problem. The GA parameter is set as follow: The population size expected is 30 with maximum generation can be produced in amount of 50. The crossover rate, mutation, and preservation are set to 0.3, 0.1, and 0.1, respectively. After 50 generations are obtained, the optimum solution is shown in generation 6 with a makespan of 597 minutes. Thus, the genetic algorithm model is effectively reducing the makespan of the job-shop scheduling problem by 10% compared to the current method applied at the company.


Introduction
In doing business, a manufacturing company has several targets that need to be achieved.Among the targets are the following categories: maximizing production output, fulfilling customer's satisfaction in terms of product quality and delivery time, and minimizing the cost [1].In simple terms, the targets pertain to output, quality, time, and cost.In order to achieve those targets, good scheduling is needed for the production process.
Scheduling is a decision making tool for the company to deal with customer demand and production process.Furthermore, scheduling is the process of organizing, selecting, and determining the time by considering the resources to do the activity or operation.Scheduling is set by considering the situation and condition of the company [1].Based on process flow, there are two types of scheduling which are flow shop scheduling and job shop scheduling.Most automotive or spare part companies are using the job shop scheduling type.
Job shop is defined as a flow of production process with each routing being unique for all jobs.There are several constraints on jobs and machines such as [2]: a job does not produce on the same machine twice, there is no precedent constraint among operations of different jobs, operations are fixed, each machine is only processing one job at a time, and release time or due dates are specified.
Makespan is the time needed to process all jobs starting from the first process until the end of the process.Good scheduling and sequence of jobs will decrease the makespan.Job Shop Scheduling problems are categorized into combinatorial optimization problems and commonly solved using meta-heuristic methods [3].Those meta-heuristic methods are Ant Colony System, Artificial Immune Systems, Consultant Guided Search, Genetic Algorithm, etc.Based on the research of others [4] in solving a certain job shop scheduling problem, Genetic Algorithm was chosen among the meta-heuristic methods to improve the performance of makespan used in the scheduling problem.
The aim of this research is to propose a new method, i.e. the Genetic Algorithm in creating the job shop schedule in the making of spare parts for the automotive body's process for minimizing makespan.The significance of the proposed model is done by comparing the Genetic Algorithm Scheduling to the current scheduling plan in term of makespan minimization.This case study is taken from an automotive body manufacturer, which is located in Cikarang, with selected jobs and machines.Due to the request of the manufacturer, the company can only be referred to as "the manufacturing company", "the company", or "automotive body manufacturer" to maintain its confidentiality.
The manufacturing company produces spare parts for the automotive bodies, such as SPRT Comp (J1), BU Arm L (J2), BU Arm R (J3), IGP (J4), Stiffener (J5), and Leg RD (J6).As one of the spare part suppliers, the company has to meet customer demand.With several types of customers and quantity of demand, the mentioned company has to cover the orders with the available resources.Based on initial observation, the company cannot meet the demand on time.
Each job goes through several different processes.The machines and processing times are varying and become the obstacle in delivering the product.Due to the lack in scheduling system, to finish 6 jobs with 5 machines requires 11 hours' production process and it causes a delay in some jobs and deliveries.Thus, the selected method is applied to solve the Job Shop problem at the company.The effective approach could optimize the production process while increasing the productivity of the machine and minimizing the makespan.Recently, Genetic Algorithm is well-known as an optimization technique to solve complex problems and has been successfully applied in the Industrial Engineering arena [2].
Many types of problems can be solved using this algorithm including vehicle routing, facility layout, trans-porttation, as well as scheduling and sequencing.Based on the GA process, the algorithm obtains the optimum result from all the possibilities of the population.The genetic algorithm is being proposed to enhance the performance of the current job shop scheduling method used in the company, so the makespan of the job shop scheduling can be minimized.
Genetic Algorithm is defined as a search technique based on natural selection and natural genetics [2].The Genetic Algorithm starts with initial random solutions called population.This population can be done randomly or using algorithm.Each individual in the population represents a solution to the problem, called a chromosome.Later, this chromosome evolves through several iterations, called generations.In the generations, the chromosomes are evaluated using some measures of fitness.Offspring is the next generation or new chromosome, which is obtained by crossover (mating) or mutation (modifying).A new generation is obtained by selecting the parents and offspring and rejecting others, so the population is kept constant.After several generations, the algorithms gather to the best chromosome, which represent the optimum solution.
The six components in Genetic Algorithm are: Coding Technique, Initialization Procedure, Evaluation Function, Selection, Genetic Operator, and Parameters Determination.Mostly, initialization procedures are done randomly.The selection procedure used is the roulette wheel.The genetic operator used is a one-point crossover and job-based mutation.The Breeder's GA (BGA) is used as proposed by Mühlenbein.For building a genetic algorithm, an appropriate representation of solutions together with problemspecific genetic operations should be obtained.This aims to produce feasible schedules on generation of all chromosomes [2].
All of the six components are implemented in a certain application created using MATLAB Software.Therefore, data from the company are processed using our application, and they are compared at the end to the results of the existing job shop scheduling used at the company.

Research Methods
In the Genetic Algorithm, the two types of operations are Genetic Operations and Evolution Operations.Genetic operations consist of crossover and mutation.It creates the new offspring at each generation.While the Evolutions operations (selection) follows the process of Darwinian evolution to create populations from generation to generation [5].Genetic algorithms have several methods in searching procedure [6].These methods are as follows:  Genetic algorithm works with a coding of solution set, not the solutions themselves. Genetic algorithm searches from a population of solutions, not a single solution. Genetic algorithm uses payoff information (fitness function), not derivatives or other auxiliary knowledge. Genetic algorithm uses probabilistic transition rules, not deterministic rules.
The method used for this research is job shop scheduling using the Genetic Algorithm approach.The semi-active scheduling is done as a requirement of the manufacturing company.A schedule is semi-active if no left-shift is evident and the operation sequence is not changed.A dispatching rule that is made a priority to be applied is the First Come First Serve (FCFS) rule.This rule makes the operation which enters the station first a priority.
The priority-ruled-based genetic algorithm is proposed by the following process [7]: A chromosome is encoded as a sequence of dispatching rules for job assignment and the schedule is constructed with priority dispatching heuristics.Genetic Algorithm is used to evolve these chromosomes to produce a better sequence of dispatching rules.
For an n-job and m-machine problem, a chromosome is set by a string of n × m entry (p 1 , p 2 … p nm ).An entry p i represents one rule of priority dispatching rules [2].The entry in i th position says that a conflict in the i th iteration should be resolved using priority rule p i .The following notation is used to generate genetic algorithm for the priority rule: PS t = a partial schedule containing t scheduled operations S t = the set of schedulable operations at stage t, corresponding to a given PS t Ó i = the earliest time at which operation i ϵ S t could be started Ø i = the earliest time at which operation i ϵ S t could be completed C t = the set of conflicting operations in iteration t The procedures to deduce a schedule from given chromosome (p 1 , p 2 … p nm ) are as follows: Step 1: Let t=1, and begin with PS t as the null partial schedule.Initially, S t includes all operations with no predecessors.
Step 2: Determine Ø t * = min i ϵ S t {Ø i } and the machine m* on which Ø t * could be realized.If more than one machine exists, the random choice is obtained.
Step 3: For each operation i ϵ S t that requires machine m* and for which Ó i <Ø i *, calculate a priority index according to the specific rule.Find the operation with the smallest index and add this operation to PS t as early as possible, thus creating only one partial schedule, PS t+1 ,for the next stage.
Step 4: For the new partial schedule PS t+1 , created in step 3, update the data set as follows: a. Remove operation i from S t b.Form S t+1 by adding the direct successor of operation i to S t c.Increment t by one Step 5: Return to step 2 for the PS t+1 created in step 3 and step 4 until a completed schedule is generated.
The population size expected is 30.Table 1 shows the initial population of the proposed model.The population is done randomly with identical order.This means there is no similar job order in the population.In addition, the makespan of each chromosome is computed and the fitness value is shown.Based on Table 1, the maximum and minimum makespan are 550 (Individual 30) and 368 (Individual 17).This means the best fitness for initial population is Individual 17.
Figure 1 shows the flowchart of Genetic Algorithm in the job shop scheduling problem.The initialization of population is random.The objective function is determined to minimize makespan and the fitness function is based on objective function.The selection process is done by using the roulette-wheel selection, thus, the candidates of parents are selected.The operator of genetics is using crossover (one-point crossover) and mutation (order changing mutation).Then, the preservation process is done after the mutation process.The result of the preservation process will be the population of the following generation.The routing of the algorithm is repeated until the optimization (makespan GA < current) and the stopping criteria (number of generation = maximum generation) are achieved.The flowchart shows the procedure in doing genetic algorithm until the model is created.

Current Model
The sample data is taken from Line A of an automotive body manufacturer.This research focuses on Line A, which manufactures piping products.The production order, schedule delivery, and MRP are based on 26 th August, 2015.The delivery time of finished goods is always one day after the production order is released, so the due date term is not used.This research assumes there is no machine breakdown.Also, there is no machine that is specifically used for certain jobs or products.All machines can be used by all products based on its process routing.In addition, the moving time from one machine to another is neglected; it is assumed to be zero.This research is applied to 6 jobs and 5 machines.The operation sequences and processing times are shown in Table 2 and Table 3 respectively.The priority scheduling is based on the first come first serve rule.

Proposed Model using GA
The current data of job shop scheduling is calculated using the genetic algorithm model.The objective of the genetic algorithm model is to find the best job order sequence which gives the minimum makespan.The processing time is the multiplication result of cycle time and customer demand (order quantity).Since each operation is done by particular machines with different processing times, the problem is called a Non-deterministic Polynomial-time hard (NP-hard) problem [8].
The parameter of the current model is being set as recommended by De Jong (1975) [9].The population size expected is 30 and the maximum generation can be produced in amount of 50.The crossover rate, mutation, and preservation are 0.3, 0.1, and 0.1, respectively.The makespan and fitness value of each chromosome on the first generation can be obtained.The maximum and minimum makespan are 550 (Individual 30) and 368 (Individual 17).This means the best fitness of initial population is from Individual 17.The fitness value is calculated using Eq. 1. (1) The selection process is performed using the roulettewheel method.The Roullete Wheel Selection is chosen because it gives the best fitness value compared to the other selection methods, such as: Random Selection and Elitist Selection [10].The probability of fitness (Pb) is obtained by dividing the fitness value with total fitness value.The total fitness value is 0.0634140.The probability of Individual 1 selected is 0.036503 or 3.65%.The probability cumulative (Pbc) is the cumulative score of probability of fitness (Pb).Then, a random number (Rs) is generated.The value range of Rs is between 0 and 1.This random number is compared to the probability of fitness value cumulative (Pbc).The individual or chromosome n is selected if Rs n <Pbc n, n+1, n+2 …, n+k .The new chromosome U is obtained by replacing the initial population with the candidates of parents based on the selection process (roulette-wheel).
The random number of a crossover process (Rc) is generated and compared with the crossover rate (pc).Based on parameter, the pc value is 0.3 which means the individual that has Rc value less than 0.3 will be selected as the Parent of the Crossover.There are eight individuals with an Rc value less than pc, which are: Individual 1, Individual 4, Individual 5, Individual 8, Individual 13, Individual 18, Individual 19, and Individual 26.Another random number is generated to determine the point (Rcp).The new chromosome is obtained after the crossover process named a V.The example of the crossover process is shown in Figure 2.

Figure 2. The Example of Crossover Process
The result of the crossover becomes the target of the mutation process.The random number of Rm is generated as the parameter to select the candidate from chromosome V.If Rm is less than the mutation rate (pm = 0.1), then the chromosome will be selected.Individual 2, Individual 10, Individual 19, and Individual 22 are the mutation candidates.Two random numbers (Rmp) are generated to determine the mutation point.For instance, Individual 2 has Rmp value 1 and 4 which means gene number 1 and gene number 4 in chromosome 2 are switched.
The Breeder Genetic Algorithms or BGA is conducted to select the chromosome that will be replaced by the best fitness among chromosome W.The best fitness among chromosome W is Individual number 13 (2-3-4-6-1-5) with the fitness value of 0.0027778.The random number of the preservation process (Rb) is generated and the preservation rate (kb) is used as the parameter.If the preservation process Rb is less than kb or 0.1, then the chromosome will be replaced by Individual 13 (2-3-4-6-1-5).Individual 2, Individual 21, and Individual 22 are selected and being replaced by Individual 13.The result of the BGA process is symbolized by X.The chromosome among X is the last chromosome for this first generation.An evaluation is needed to determine the best fitness and the worst fitness for the first generation.The best fitness is Individual 2, Individual 13, Individual 21, and Individual 23.One of best individuals is chosen; and then Individual 2 will be the optimum solution for the first generation.Furthermore, the chromosome X is the parent for the second generation and so on.The example of the chromosome on the first generation is shown in Appendix A.
The genetic algorithm process will be repeated from the selection to the BGA after the first generation is obtained.The Maxgen Parameter is used as the stopping criteria.The proposed model sets the maximum generation to 50; this means there will be 50 times looping on the algorithm.It shows the best fitness is 0.0028 starting from the first generation.The worst fitness is fluctuating from 0.0018 to 0.0020.The extreme worst value is shown in generation 19 which is 0.0024.

Discussion
Based on the genetic algorithm results, the job sequence with the lowest makespan is 2-3-4-6-1-5 on Generation 6.This job sequence gives the best fitness score of 0.0028409 or the makespan of 597 minutes.The Gantt Chart of the proposed model using genetic algorithm can be seen in Figure 3.

Figure 3. The Gantt Chart of Our Proposed Method
The current system and the proposed model are compared based on the makespan.The current model requires 637 minutes while the proposed model requires only 597 minutes.This means the makespan can be reduced by 10%.In addition, the lateness of the jobs can be reduced.The current system took 11 hours to produce 6 products, whereas the proposed model only takes 10 hours.It means the production process is faster by 1 hour and will impact the production delivery.It proves the genetic algorithm model is better in terms of computation of the job shop scheduling problem and the output (makespan).
The fitness value of each generation is shown in Figure 4.The graph shows the constant value for the first 6 generations and it increases on Generation 7 until the maximum generation (50).Because of the BGA process, the maximum fitness is obtained faster.The minimum fitness obtained for each generation shows the fluctuate score.In this research, the average value of each generation is neglected.The 50 generations can be seen in Table 4.
The verification and validity test are used to check whether or not the logic function is correct and gives an optimum solution.The validity test is done by using T-test (Paired Difference Test).The makespan of random job order is calculated using current system and software computation, and then these computations are compared.The verification is completed by checking the operation routing of scheduling.The selected job order is checked; if there is no overlapping job order, the model is assumed to be correct.

Figure 4. Fitness Plot of Each Generation
Table 5 shows the makespan result of the current system and numerical computation software after running randomly 10 times.The statistic test is required to validate this system.The hypothesis of the statistic test is: H 0 : μ D = 0; there is no difference between these models H 1 : μ D ≠ 0; there is at least one difference between these models Paired T-Test is being used to test the validity of the model.The p-value of the result is very high (*), which means the null hypothesis should be accepted.To conclude, there is no difference on the current system and the numerical computation software model.The result of the statistical software of the current system and the software model is shown in Appendix B.
The first run is selected to be verified; the job order is 2-4-5-1-3 (Cmax = 105).The makepsan computation is done by Matlab software and shown in Appendix C. It shows that there is no overlapping of the job and the machine.For instance, operation 1 on job 1 (Machine 3) starts at time 54 after operation 2 on job 5 (Machine 3) finishes at time 53.

Conclusion
Since authors were requested by an automotive body manufacturer to find and propose a scientific method which may enhance the performance of its existing job shop scheduling method, we proposed the application of genetic algorithm for minimizing the makespan of the current job shop scheduling method used at the company.
The genetic algorithm model is successfully done and the objectives of the research can be obtained, i.e. to propose a certain new job shop scheduling method to the company, and to prove by using the application of the company's real data that the proposed method is able to minimize the makespan of the current job shop scheduling method.The problem of the current system is that scheduling 6 jobs on 5 machines are done manually.Using semi-active scheduling and the first come first serve priority rule, the current system requires 637 minutes.Meanwhile, the proposed model of genetic algorithm requires only 597 minutes.This means the makespan can be reduced by 10%.It proves the genetic algorithm model is better in terms of output result (makespan).

Fitness
Further research can be done for finding the best combination of GA parameter in order to improve optimally the performance of the current job shop scheduling method viewed from its makespan.The experimental design can be employed to measure the effects of parameters to the model output (makespan).In addition, the factors that influencing time consumption in computing the scheduling can be obtained.

Table 2 .
Operation Sequence

Table 3 .
Processing Time

Table 1 .
Initial Chromosome and Objective Function

Table 4 .
Summary of Each Generation

Table 5 .
Statistic Data for Validity Test