A genetic algorithm for preemptive scheduling of a single machine

Article history: Received November 4 2015 Received in Revised Format February 21 2016 Accepted March 21 2016 Available online March 22 2016 This paper presents a mathematical model for scheduling of a single machine when there are preemptions in jobs. The primary objective of the study is to minimize different objectives such as earliness, tardiness and work in process. The proposed mathematical problem is considered as NP-Hard and the optimal solution is available for small scale problems. Therefore, a genetic algorithm (GA) is developed to solve the problem for large-scale problems. The implementation of the proposed model is compared with GA for problems with up to 50 jobs using three methods of roulette wheel sampling, random sampling and competition sampling. The results have indicated that competition sampling has reached optimal solutions for small scale problems and it could obtain better near-optimal solutions in relatively lower running time compared with other sampling methods. © 2016 Growing Science Ltd. All rights reserved


Introduction
Nowadays, there is a growing trend on shortage of resources, equipment, investments and facilities.Therefore, it is necessary to have optimal allocation of resources using different scheduling techniques (Liao & Cheng, 2007).In fact, a good scheduling plays essential role on development of more efficient production systems.Single machine scheduling has been widely used in different industries such as cement, petrochemical, etc. Earliness and tardiness are two important minimization strategies in most scheduling problems.In fact, these types of penalties are common in industrial settings where early job completion may cause the cash commitment to resources in a time frame earlier than required, giving rise to early completion penalties.Tardiness penalties may occur for different reasons such as loss of customer goodwill, opportunity expenses of lost sales, and direct cash penalties.Earliness expenses may hurt the performance measure, and this non-regularity discourages one from looking for solutions to this type of problem.Davis and Kanet (1993) investigated a single-machine scheduling problem by considering penalties for early and tardy completion of jobs.Szwarc and Mukhopadhyay (1996) presented an efficient technique to solve an earliness-tardiness single machine n job scheduling model where idle times was allowed and the earliness and tardiness penalties were proportional to the processing times of the jobs.Lenstra et al. (1997) showed that a single job scheduling problem is NP-Hard.Ahmadizar and Farhadi (2015) considered a single-machine scheduling problem in which jobs were released in various times but delivered in batches and a due window was related to each job.They aimed to schedule the jobs, to form them into batches and to select the delivery date of each batch to minimize the sum of earliness, tardiness, holding as well as delivery costs.Bülbül et al. (2007) investigated a single machine earliness/tardiness scheduling problem with general weights, ready times and due dates and the method is based on a time-indexed preemptive relaxation of the problem.Hendel et al. (2009) studied the concept of preemption in scheduling, with earliness and tardiness penalties where the earliness costs was dependent on the start times of the jobs.They proposed an efficient representation of dominant schedules to measure the most appropriate schedule for a given representation.Sourd and Kedad-Sidhoum (2003) addressed the one-machine problem where the jobs had distinct due dates, earliness costs, and tardiness costs.Sun et al. (1999) investigated the NP-hard problem of scheduling N independent jobs on a single machine with release dates, due dates, sequence dependent setup times, and no preemption to minimize the weighted sum of squared tardiness.Valente (2008) presented an exact method for the single machine scheduling problem with linear early and quadratic tardy penalties.Valente and Gonçalves (2009) propsoed a genetic algorithm method for the single machine scheduling problem with linear earliness and quadratic tardiness penalties.Khorshidian et al. (2011) is associated with the concept of preemption in just-in-time single machine scheduling problem, with permissible machine idle time.Runge and Sourd (2009) investigated a new technique for the one-machine earlinesstardiness scheduling problem where jobs could be interrupted.They also proposed a timing method and a local search algorithm based on this timing to reach a good feasible solutions.M 'Hallah (2007) proposed a hybrid heuristic to minimize total earliness and tardiness on a single machine.Kazemi et al. (2012) considered preemption and idle time in a single machine scheduling problem with just-in-time (JIT) approach.Wang et al. (2011) considered a single-machine scheduling problem with linear decreasing deterioration in which the due dates were determined by the equal slack method.

The proposed study
In this paper, we propose a single machine job preemptive scheduling with earliness tardiness constraints.In addition, we also consider the cost of work in process.Assumption 1. Preemption and interruption are permitted.2. At any time up to one work can be assigned to each machine.3. Processing time of each job is deterministic.4.There are certain number of jobs at each time. 5. Work in process and its cost are considered during the scheduling.6. Start time, processing time and due dates are known in advance.7. If operations of a job is interrupted, a cost of work in process is considered.8.There is machine breakdown.9.There is a cost for job preemption., , , , , " , 0

Indices
The objective function given in Eq. ( 1) consists of five parts of earliness, tardiness, job preemption, work in process, the number of earliness and the number of tardiness.Eq. ( 2) and Eq. ( 3) are associated with jobs with earliness and tardiness, respectively.According to Eq. ( 4), in each period, only one job needs to be processed and according to Eq. ( 5), each job is divided into Pi process in each period.Eq. ( 6) and Eq. ( 7) indicate the number of earliness and tardiness for each job.Eq. ( 8) shows the time the process of each job ends.Eqs.(9-11) demonstrate the starting time of jobs.Eq. ( 12) determines the relationship between and and finally Eq. ( 13) determines the nature of variables in terms of binary/continuous.Note that max , ∑ , which makes the set of feasible solution to be non-empty and Table 1 presents the input data used for the next section.

Table 1
The input data

Genetic algorithm
As explained earlier, the proposed model of this paper is formulated as mixed integer programming and is classified as an NP-Hard problem (Lenstra et al., 1997).Therefore, we use genetic algorithm (GA) to solve the resulted model for problems in large-scales.GA is known as the most famous metaheuristic algorithm in the world.Holland (1992) is believed to be the first who introduced GA and it has been widely implemented in different classes of problems.GA is considered as a metaheuristic search, which mimics the process of natural selection.The processed is routinely implemented to generate useful solutions to optimization and search problems.It belongs to the bigger class of evolutionary algorithms (EA), which create solutions to optimization problems based on techniques inspired by natural evolution, including inheritance, mutation, selection, and crossover.The chromosome of the proposed GA method is a string where each cell represents a job as follows,

Parameter setting
The proposed study of this paper uses GAMS software package to solve the problems in small and medium sizes and GA method is implemented for large scale problems.In this paper, problems with 4, solution are also presented in the last two columns in terms of objective function and CPU time.All times are given in minutes and hours.

Table 2
The results of the implementation of GAMS and GA As we can observe from the results of Table 2, both GA and GAMS could solve the problems in small and medium sizes, successfully and they reached optimal solutions.However, for large-scale problems, only GA could solve the problem.The other observation from the results of Table 2 is that competition method used in GA to generate intial population could reach better solution in less amount of time compared with other two samplying techniques.

Conclusion
In this paper, we have presented a mathematical model for scheduling of a single machine when there were preemptions in jobs.The primary objective of the study was to minimize different objectives such as earliness, tardiness, work in process, etc.The proposed mathematical problem was NP-Hard and the optimal solution was available for small scale problems.Therefore, a genetic algorithm (GA) has been developed to solve the problem for large-scale problems.The implementation of the proposed model was compared with GA for problems with up to 50 jobs using three methods of roulette wheel sampling, random sampling and competition sampling.The results have indicated that competition sampling has reached optimal solutions for small scale problems and it could obtain better near-optimal solutions in relatively lower running time compared with other sampling methods.

Fig. 4 .
Fig. 2. one-point crossover Tardiness permitted for job i A binary variable, which is one if job i is processed at period j, and zero, otherwise A binary variable, which is one if 1 and zero, otherwise A binary variable, which is one if there is earliness on job i, and zero, otherwise A binary variable, which is one if there is tardiness on job i, and zero, otherwise N: Number of jobs, i = 1, …, N J: Number of periods, j = 1, …, J " Starting time of job i j = 1 Starting time of job i Earliness permitted for job i