A Hybrid Genetic Algorithm to Minimize Total Tardiness for Unrelated Parallel Machine Scheduling with Precedence Constraints

The paper presents a novel hybrid genetic algorithm (HGA) for a deterministic scheduling problem where multiple jobs with arbitrary precedence constraints are processed on multiple unrelated parallel machines. The objective is to minimize total tardiness, since delays of the jobsmay lead to punishment cost or cancellation of orders by the clients inmany situations. A priority rule-based heuristic algorithm, which schedules a prior job on a prior machine according to the priority rule at each iteration, is suggested and embedded to the HGA for initial feasible schedules that can be improved in further stages. Computational experiments are conducted to show that the proposed HGA performs well with respect to accuracy and efficiency of solution for small-sized problems and gets better results than the conventional genetic algorithm within the same runtime for large-sized problems.


Introduction
We consider an unrelated parallel machine scheduling problem with arbitrary precedence constraints to minimize total tardiness.Such a problem typically occurs in an office or project management environment, where unrelated machines represent workers who have different skills in office scheduling problem, or represent various types of resources which are allocated to activities in multimode project scheduling problem.Moreover, a task (or project) can be separated into several subtasks (or activities) with precedence constraints between them (e.g., one subtask may have to be finished before another subtask can be started).In many situations, delays of the subtasks (or activities) may lead to punishment cost or cancellation of orders by the clients.Mangers should adopt some methods to select the suitable workers (or resources) to undertake each subtask (or activity) separately, in order to maximize utilization of these workers (or resources), improve productivity, and reduce overall cost.
The remainder is organized as follows.A comprehensive review of the related literature is presented in Section 2. The problem is formulated as an integer programming model in Section 3. In Section 4, a priority rule-based heuristic algorithm (PRHA) is suggested for the feasible schedules.In Section 5, a hybrid genetic algorithm (HGA), taking the solutions of the PRHA as a part of initial population, is proposed for the final solution.In Section 6, two categories of numerical experiments are conducted to evaluate the performance of the proposed HGA.Finally, the paper closes with a general discussion of the proposed approach as well as a few remarks on research perspectives in Section 7.

The Literature Review
There are some studies about multiplemachines and precedence constraints in the literature.The machines may be identical, that is, they have equal speeds, or uniform, that is, each machine has a constant speed, independent of the tasks, or they may be unrelated if the speed of each machine depends on the task it processes.Precedence constraints include chains, out-tree, in-tree, forest, special precedence constraints, and arbitrary precedence constraints.
For identical machine scheduling with precedence-related jobs, Ramachandra and Elmaghraby [1] offered a binary integer program (BIP) and a dynamic program (DP) to solve two-machine problem with arbitrary precedence constraints to minimize total weighted completion time.They have also introduced a genetic algorithm (GA) procedure that is capable of solving any problem size.Queyranne and Schulz [2] presented a 4-approximation algorithm for the identical machine problem with precedence delays to minimize total weighted completion time.In that problem each precedence constraint is associated with a certain amount of time that must elapse between the completion and start times of the corresponding jobs.Kim et al. [3] considered an identical machine problem with s-precedence constraints to minimize total completion time and formulated it as an LP problem with preemption allowed.To solve the LP problem efficiently, they developed a cutting plane approach in which a pseudopolynomial dynamic programming algorithm was derived to solve the involved separation problem.Gacias et al. [4] proposed an exact branch-and-bound procedure and a climbing discrepancy search (CDS) heuristic for the identical machine scheduling problem with precedence constraints and setup times between the jobs.Driessel and Mönch [5] suggested several variants of variable neighborhood search (VNS) schemes for scheduling jobs on identical machines with sequence-dependent setup times, precedence constraints, and ready times.Yuan et al. [6] considered the online scheduling on two identical machines with chain precedence constraints to minimize makespan, where jobs arrive over time and have identical processing times,and provided a best possible online algorithm of competitive ratio ( √ 13 − 1)/2.
For uniform machine scheduling with precedence-related jobs, Brucker et al. [7] considered a problem of scheduling identical jobs with chain precedence constraints on two uniform machines.It was shown that the corresponding makespan problem could be solved in linear time.Woeginger [8] proposed a 2-approximation algorithm for uniform machine problem subject to chain precedence constraints to minimize makespan.Kim [9] derived an LP-based heuristic procedure for scheduling s-precedence constrained jobs on uniform machines with different speeds to minimize the weighted total completion time.van Zuylen [10] proved a randomized (log )-approximation algorithm that is monotone in expectation for scheduling uniform machines with precedence constraints to minimize makespan.
For unrelated machine scheduling with precedencerelated jobs, Herrmann et al. [11] considered chain precedence constraints between the tasks and proposed a number of heuristics to minimize makespan.Kumar et al. [12] presented polylogarithmic approximations to minimize makespan and total weighted completion time when the precedence constraints forming a forest.Nouri and Ghodsi [13] studied a scheduling problem where some related tasks with exponential duration were processed by some unrelated workers so that the total expected time to execute the tasks is minimum and gave a polynomial time algorithm for the problem in the restricted form.
In addition, for unrelated machine scheduling with tardiness related criteria, Chen and Chen [14] considered a flexible flow line scheduling problem with unrelated parallel machines at each stage and with a bottleneck stage on the line and proposed the bottleneck-based heuristics to minimize total tardiness.Zhang et al. [15] addressed a dynamic unrelated machine scheduling problem where the arrival time and the due date of each job are stochastic and applied a reinforcement learning method to minimize mean weighted tardiness.Liaw et al. [16] examined an unrelated machine scheduling problem to minimize the total weighted tardiness and presented a branch-and-bound algorithm incorporating various dominance rules.Kim et al. [17] presented an unrelated machine scheduling problem with sequence dependent setup times and suggested four search heuristics to minimize total weighted tardiness: the earliest weighted due date, the shortest weighted processing time, the two-level batch scheduling heuristic, and the simulated annealing method.
To the best of our knowledge, there is no work on unrelated machine scheduling problem with total tardiness criteria and precedence constraints of the jobs.Motivated from that fact, a hybrid genetic algorithm (HGA) is proposed for the practical scheduling problem.

Problem Formulation
A set  = {1, . . ., } of  jobs has to be processed on  unrelated parallel machines  = {1, . . ., }.Each machine is capable of processing these jobs at different speeds and can process at most one job at a time.Each job is ready at the beginning of the scheduling horizon, processed on only one machine, and nonpreemptive during the processing period.Each job  has an integer processing time  V on machine V and a distinct due date   .There are arbitrary precedence constraints between the jobs.The constraints force a job not to be started before all its predecessors are finished.The objective is to find a feasible schedule that minimizes total tardiness tt = ∑  =1 max(FT  −   , 0), where tardiness of job  is the amount of time its finish time FT  exceeds its due date   .In standard scheduling notation [18], this problem can be denoted as |prec|tt, where  denotes unrelated parallel machines, and prec denotes arbitrary precedence constraints.The problem is NP-hard even for a single machine [19].
The problem can be represented as a mathematical formulation as follows: subject to The input parameters of the model include : the job set,  = {1, . . ., }; : the machine set,  = {1, . . ., }; : the maximum number of positions on each machine that jobs are placed on them.It is computed as follows:  =  −  + 1 (i.e., the maximum machine utilization is met, so that all machines are used); : the position set,  = {1, . . ., };  V : the processing time of job  on machine V;   : the due date of task ,  ∈ ;   : the set of immediate predecessors of job ; : a large positive number.
The decision variables of the model include  V : equals 1 if job  is processed in the position  on machine V and 0 otherwise; FT  : the finish time of job .
The objective function (1) minimizes the total tardiness.Constraints (2) ensure that each job is assigned to one of the existing positions on the machines.Constraints (3) guarantee that at most one job can be assigned to each position.Constraints (4) ensure that until one position on a machine is occupied, jobs are not assigned to subsequent positions.Constraints (5) ensure that the finish time of a job in sequence on a machine is at least equal to the sum of the finish time of the preceding job and the processing time of the present job.Constraints (6) ensure that the finish time of each job is not less than its processing time.Constraints (7) observe precedence relationships.Constraints (8) define the type of decision variables.

Priority Rule-Based Heuristic Algorithm
Heuristics have taken an important position in the research of solutions in many combinatory problems, as it is simple, easy to implement, and can be embedded in more sophisticated heuristics or metaheuristics for determining initial feasible schedules that can be improved in further stages.We develop a priority rule-based heuristic algorithm (PRHA) consisting of several iterations.At each iteration, a prior job is selected according to EDD (earliest due date first) rule and inserted inside a partial schedule on a selected prior machine (respecting the precedence constraints), while keeping the start times of the already scheduled jobs unchanged.The prior machine can be selected according to different conditions.
Then, three job-sets associated with each iteration are defined.Jobs which have been finished up to the schedule time point are in the completion job-set   .Jobs which have been scheduled are in the total scheduled job-set .Jobs which are available for scheduling with respect to precedence constraints but yet unscheduled are in the decision job-set   .
The variables used for the PRHA are summarized as follows: : the counter of iteration; : the total scheduled job-set; : the completion job-set at the th iteration; : the decision job-set at the th iteration,   = { |  ∉ ,   ⊆   };  V : the release time of machine V (i.e., the machine is not occupied after the time point); ( * , V * ): the prior job-machine pair ( * and V * indicate the selected prior job and prior machine, resp.); V : the hypothetical finish time of job  when processed on machine V; : the scheduling time point.
We give a pseudocode description of the priority rulebased heuristic algorithm which consists of  iterations (cf.Algorithm 1).Step 1 initializes some variables , , tt, and  V .In step 2 each job is scheduled at each iteration until  ⩽  does not hold.In step 2.1  is denoted as a set containing the release times of all machines.In step 2.2 the scheduling time point  is determined by the minimum release time of machines.The completion job-set   and the decision jobset   at the time point  are computed in steps 2.3 and 2.4.In step 2.5 the schedule time point  is postponed to the next minimum release time until   is not empty.In step 2.6 an EDD rule is used to determine a prior job that is, the job with minimum due date in   is selected as the prior job  * .Each hypothetical finish time   * V of job  * on machine V of the set  is first computed in step 2.7, and then the prior machine V * is selected in step 2.8.If all hypothetical finish times of job  * are not less than its due date, the machine with minimum hypothetical finish time is selected as the prior machine V * ; otherwise, V * is randomly selected from these machines which process job  * with the associated hypothetical finish times less than its due date.In step 2.9 the start and finish times of job  * and the release time of machine V * are saved.The total scheduled job-set , total tardiness tt, and counter of iteration  are updated in steps 2.10-2.12.
To better illustrate the proposed PRHA, let us consider a simple instance.Nine jobs have to be processed on two unrelated parallel machines.The processing times and due dates of all jobs are given in Table 1, and the precedence constraints are displayed in Figure 1.The solution is reached after nine iterations using the PRHA.Table 2 shows the computational process of each iteration.
When  = 1, the decision job-set   is computed in step 2.5.The selected prior job  * = 1 is processed on the selected prior machine V * = 1, started at time ST  * = 0, and completed    at time FT  * = 3, which are calculated in steps 2.6, 2.8, and 2.9.The total tardiness tt = 0 is computed in step 2.11.The following iterations are similar to the first iteration.The final solution is presented by the Gantt chart in Figure 2.

Proposed HGA and Its Implementation
Genetic algorithm (GA) is a powerful and broadly applicable stochastic search and optimization technique based on principles of evolution theory.In the past few years, GA has received considerable attention for solving difficult combinatorial optimization problems.
We propose a hybrid genetic algorithm (HGA) which combines the PRHA approach with conventional genetic algorithm.In HGA, the PRHA plays an important role in generating good initial solutions to avoid the blind search of GA at the beginning while exploring the solution space.The HGA explores the solution spaces with three genetic operators, including the patching crossover, swap mutation, and "roulette wheel" selection.The principle of HGA is illustrated in Figure 3, and the detailed description is as follows.

Coding and Fitness
Function.The first step in the proposed HGA is to consider a chromosome representation or solution structure.Suppose that there are  jobs to be assigned to  machines.A chromosome is modeled by a string of  +  − 1 distinct genes, composed of  job genes, numbered from 1 to , and  − 1 partitioning genes " * " with distinct subscripts to separate the machines [20].Meanwhile, the chromosome may be decomposed as  subchromosomes, and genes of each subchromosome represent unordered jobs on a machine.An example is demonstrated in Figure 4, where the chromosome would assign jobs 9, 1, 5 to machine 1, jobs 8, 6, 2 to machine 2, job 7 to machine 3, and jobs 3, 4 to machine 4. When there are no job genes between two consecutive partitioning genes, the corresponding machine of the second partitioning gene is not occupied in the schedule.Similarly, when there are no job genes after the last partitioning gene, the rest machine is not occupied in the schedule.The HGA manipulates solutions to propagate similarities among the high performance chromosomes to the next population based on fitness values.The fitness function corresponds to the objective function under consideration.Since each job has a constant processing time in its subchromosome, the start and finish times of all jobs can be computed by applying a revised forward recursion algorithm (RFRA) according to the precedence constraints (cf.Algorithm 2).The fitness value of each chromosome can thus be obtained.
We use the instance in Section 4 to illustrate the RFRA.Suppose that jobs 1, 2, 3, 5, 6, and 7 are assigned to machine 1 and jobs 4, 8, and 9 are assigned to machine 2. Figure 5 shows the computational process of the RFRA.At first, the job 1 is randomly selected from the unscheduled job-set  = {1, 2, 3, 4, 5, 6, 7, 8, 9}, and the finish time FT from the set  = {2, 3, 4, 5, 6, 7, 8, 9}.Because the finish time of predecessor 3 of job 6 is not known yet, step 2.2 is executed for job 3 recursively, and the finish time FT 3 = 11 can be calculated.The following iterations are similar to the previous iterations, and the final total tardiness is 157.

Initial Population.
PopSize is the population size or the number of chromosomes at each population that is known in advance.In the HGA, the population is initialized from two subpopulations with identical number of chromosomes: one subpopulation comes from the solutions of the PRHA, so that it can enhance population optimization; the other is generated by randomly assigning all jobs to the machines, so that it can enhance population diversity.

Crossover.
Crossover is the kernel operation in genetic algorithm, which combines two chromosomes to generate next-generation chromosomes preserving their characteristics.In our crossover, all chromosomes in the parent generation are mutually crossed over according to a given crossover probability   .The mechanism is accomplished through the following steps, and Figure 6  (ii) Randomly produce a string of  +  − 1 flags, each with value of either "0" or "1".
(iii) The flags are first matched with Parent1 such that those genes with flag "1" in Parent1 are selected and saved in Selected1 with their original positions unchanged.
(iv) Cross out the same genes as Selected1 from Parent2, and the remainder genes are saved in Selected2.(v) The new offspring is obtained through filling out the remaining empty gene locations of Selected1 with the genes of Selected2 by preserving their gene sequence in Selected2.(vi) The genes of offspring are assigned to the subchromosomes according to the subindexed " * ". (vii) The fitness value of offspring is computed by applying the RFRA algorithm.
An offspring acceptance method is employed to accept the offspring generated by crossover operator [21].If the fitness value of offspring is not greater than the average fitness value of its parent generation, the offspring will be accepted for the new generation and will be thrown otherwise.This method reduces the computational time of the algorithm and leads to convergence toward the optimum solution neighborhood.

Mutation.
Mutation reorganizes the structure of genes in a chromosome randomly so that a new combination of genes may appear in the next generation.It serves the search by jumping out of local optimal solutions.The swap mutation is used as mutation operator according to a given mutation probability   , and all offsprings from the mutation are accepted for the new generation.The mechanism is accomplished through the following steps, and Figure 7   (ii) The genes of new offspring are assigned to the subchromosomes according to the subindexed " * ". (iii) The fitness value of offspring is computed by applying the RFRA algorithm.

Selection.
Selection is an operation to choose good chromosomes for the next generation.It is important in regulating the bias in the reproduction process.Let    denote the selection value of the th chromosome in generation  before selection.It is computed as where    is the fitness value of the th chromosome in generation ,  is the number of chromosomes in generation  before selection, and  is a small constant (say 3).Obviously, the less the fitness value of chromosome, the greater its selection value (i.e., the selection value and fitness value of the chromosome have an inverse relationship).Generally, it is better that the solution with minimum fitness value (i.e., maximum selection value) in the current generation has more chance to be selected as parent in order to create offspring.The most common method for the selection mechanism is the "roulette wheel" sampling.Each chromosome is assigned a slice of the circular roulette wheel and the size of the slice is proportional to the selection value of chromosome.The wheel is spun PopSize times.On each spin, the chromosome under the wheel's marker is selected to be in the pool of parents for the next generation.

Stopping Rules.
The HGA is stopped with satisfying either of the following conditions: (1) the number of current generation () is greater than the maximum number of generation ( max ), and (2) the standard deviation of the fitness values of chromosomes in the current generation (  ) is not greater than an arbitrary constant () [22].  implies a degree of diversity or similarity in the current population in terms of the fitness value.It is computed as where   is the mean fitness value of all chromosomes in generation  that is computed as .

Computational Experiments
To evaluate the performance of the proposed HGA, the following two categories of numerical experiments for small and large-sized problems are conducted.The small-sized problems are solved by the branch-and-bound approach (B&B) under the CPLEX software and the proposed HGA.The largesized problems are solved by the HGA and the conventional genetic algorithm (CGA) which is not combined with the priority rule-based heuristic algorithm, since they cannot be optimally solved by the CPLEX in a reasonable CPU time.Through referring to [23] and preliminary tests, the appropriate parameters of the HGA are determined and listed in Table 3.The CGA is stopped when its runtime reaches the HGA's.The processing times of the jobs are randomly generated in DU[, ] which represents a discrete uniform distribution with a range from  to .The due dates are randomly obtained by [24] where  is the delay coefficient and RD is the relative range of due dates.To produce the precedence relations, let  = density of precedence constraints = Pr{arc(, ) exists in precedence constraints}, and let   = Pr{arc(, ) exists in the immediate precedence graph}, for 1 ⩽  <  ⩽ , where ,  are different jobs and Pr is abbreviation of probability.Hall and Posner [25] have proved that For a given , each precedence relation of jobs  and  can be determined by   .
The experiments have been performed on a Pentiumbased Dell-compatible personal computer with 2.30 GHz clock-pulse and 2.00 GB RAM.The HGA and CGA algorithms have been coded in C++, compiled with the Microsoft Visual C++ 6 compiler, and tested under Microsoft Windows 7 (64-bit) operating system.
The first category of experiments is conducted for the small-sized problems.We generate nine groups of problem instances (each group including 10 instances), given the density of precedence constraints  = 0.5, the delay coefficient  = 0.5, the relative range of due dates RD = 0.1, and the processing times  V ∼ [1,10].Each instance is solved by the HGA; meanwhile, its exact solution is achieved by the B&B under the CPLEX 12.2 software.Let  BB and  HGA denote the mean objective function values (i.e., total tardiness) of the problem group using the B&B and HGA, respectively, and let Gap denote the relative distance between  BB and  HGA ; that is, Gap = ( HGA − BB )/ BB ×100%.The computational results are shown in Table 4.It can be observed that for the smallsized problems, the HGA is able to get good results (the average Gap is only 0.3%) and to obtain exact solutions (i.e., Gap = 0) for most of the problems.In addition, it also can be seen from the average of mean CPU time of the B&B and HGA (24.5 s and 3.1 s) that the runtime of the B&B is not obviously comparable with the one of HGA. Figure 8 shows a typical convergence of the HGA during 27 successive generations related to a single run.
The second category of experiments is conducted for the large-sized problems.The performance of the HGA is compared with the CGA by use of six impact factors including number of jobs (), number of machines (), density of precedence constraints (), delay coefficient (), relative range of due dates (RD), and processing times ( V ).Here, six sets of subexperiments are conducted.In the first set displayed in Table 5,  is allowed to vary to test its impact effect, given  = 10,  = 0.6,  = 0.5, RD = 0.1, and  V ∼ DU [1,10].The other five sets displayed in Tables 6-10 test    6, so  CGA may show an obvious down trend for the solutions using the CGA are not exact results, and  HGA may show an approximate down trend for the solutions using the HGA are very near to exact results.Table 10 shows the same situation for the reason of randomly generated instances.Moreover, Δ GA decreases as the density of precedence constraints () increases in Table 7, because as  increases, the precedence relations of all jobs become tighter, the schedule of these jobs tends to be more deterministic, and the advantage of the HGA over CGA will decrease.

Conclusions
In this paper, an intuitive priority rule-based heuristic algorithm (PRHA) is first developed for the unrelated machine scheduling problem to construct some feasible schedules.The PRHA can schedule a prior job on a prior machine according to the priority rule at each iteration.Then, a hybrid genetic algorithm (HGA) is proposed to improve the final solution.
We design subindexed genes, genetic operators, and add the standard deviation of the fitness values as stopping criterion to the traditional genetic algorithm.The fitness values can be computed through the revised forward recursion algorithm.In order to evaluate the effectiveness and efficiency of the proposed HGA, two categories of numerical experiments are conducted.The obtained results show that the HGA performs accurately and efficiently for small-sized problems and can obtain exact solutions for most cases.Moreover, it gets better results than the conventional genetic algorithm within the same runtime for large-sized problems.However, the advantage of the HGA over CGA will decrease if the due dates of all jobs are identical or large enough, because the selection method for the prior job and machine in the PRHA algorithm may be ineffective.
The HGA can be applied to the just-in-time production systems considering penalties for tardy jobs.An important research direction that might be pursued in the future is extension of the developed priority rule in this work.The other potential interest would be to consider lower bound and exact algorithms for the complex problem.

Figure 1 :
Figure 1: Project precedence constraints graph of the instance.
demonstrates an example.(i) Choose two chromosomes, named Parent1 and Par-ent2, from the parent population.
demonstrates an example.(i)Randomly select two genes from two different subchromosomes in a selected chromosome and swap their places.

Table 1 :
Problem data of the instance.

Table 2 :
Summary of iterations.
1 = 3 is computed in step 2.2.2.Then, the job 6 is randomly selected Mathematical Problems in Engineering Initialize unscheduled job-set  = {1, . . ., } and the release times of all machines  V = 0, ∀V ∈ . 2. Repeat the following steps until  is empty: 2.1.randomly select a job  from . 2.2.Assign job  to machine  ( is known for job  according to the chromosome).2.2.1.If the finish time of predecessor  of job  is not known, execute step 2.2 for job  recursively.2.2.2.Let   denote the maximum finish time of the predecessors of job .Compute the start time and finish time of job : ST  = max(  ,   ), FT  = ST  +   .2.2.3.Update the unscheduled job-set and the release time of machine :  :=  \ {},   = FT  .3. tt = ∑  =1 max(FT  −   , 0).

Table 3 :
Parameters of the HGA.

Table 4 :
Performance of the HGA for small-sized instances.

Table 5 :
Comparison between HGA and CGA for large-sized instances with different number of jobs ().
the effects varying , , , RD, and  V , respectively.Each table entry represents 10 randomly generated instances.Let  HGA and  CGA denote the mean objective function values using the HGA and CGA, respectively, and let Δ GA denote

Table 6 :
Comparison between HGA and CGA for large-sized instances with different number of machines ().

Table 7 :
Comparison between HGA and CGA for large-sized instances with different density of precedence constraints ().

Table 8 :
Comparison between HGA and CGA for large-sized instances with different delay coefficients ().

Table 9 :
Comparison between HGA and CGA for large-sized instances with different relative range of due dates (RD).=30 HGA  CGA Mean CPU time (s) Δ GA (%)

Table 10 :
Comparison between HGA and CGA for large-sized instances with different processing times ( V ). = 60  HGA  CGA Mean CPU time (s) Δ GA (%)