Three Algorithms for Flexible Flow-shop Scheduling

.


INTRODUCTION
Scheduling is an important process widely used in manufacturing, production, management, computer science, and so on. In simple flow-shop problems, each machine center has just one machine [1,3,4,[9][10][11] . If at least one machine center has more than one machine, the problem is called a flexible flow-shop problem. Flexible flow shops are thus generalization of simple flow shops [2] . Scheduling jobs in flexible flow shops is considered an NP-hard problem [8,12] .
The problem addressed in the paper is a special case of the flexible flow shop problem. We assume each machine center has the same number of parallel machines which to the best of authors' knowledge is the first of its kind. This paper specifically focuses on minimizing the total completion time of flexible flow shop. Three algorithms have been developed to solve flexible flow-shop scheduling problems with more than two machine centers. The first one extends Sriskandarajah and Sethi's method by combining both the LPT [5] and the search-and-prune approaches to get a nearly optimal makespan. The LPT approach is first used to assign jobs to each machine group (flow shop). The search-and-prune approach is then used to deal with job sequencing. The second one is an optimal algorithm, entirely using the search-and-prune technique. The third one is similar to the first one except that it uses Petrov's approach (PT) [11] to deal with job sequencing instead of search-and-prune. Experimental results show that the third proposed algorithm can save much computational time when compared to the other two although its makespans may be a little larger. Particularly, the third one has the polynomial time complexity, avoiding the intractable problems occurring in the other two algorithms. In addition, the time complexities and makespans by the first algorithm lie between those by the other two. A trade-off for these three algorithms can thus be achieved between accuracy and time complexity.
In the past, Johnson first proposed an efficient algorithm which guaranteed optimality in a twomachine flow-shop problem [6] . Palmer, Petrov and Gupta then respectively proposed their algorithms for solving the flow-shop problems of more than two machines [4,10,11] . The three scheduling algorithms could process the job data in only one pass. Campbell, Dudek and Smith (CDS) then proposed a heuristic algorithm for achieving the same purpose [1] . It, however, needed to process the job data in multiple passes. Logendran and Nudtasomboon also proposed a multi-pass algorithm to solve it [7] . Sriskandarajah and Sethi then presented a heuristic algorithm based on the Johnson algorithm for solving flexible flow-shop problems of two machine centers with the same number of machines [12] . Many researches in this field are still in progress.
As mentioned above, flexible flow-shop problems are NP-hard. No algorithms can find the optimal solutions in polynomial time. In the past, Sriskandarajah and Sethi proposed a heuristic algorithm to solve the problem of two machine centers, and the completion time of the derived schedules was close to the optimum. In this paper, we generalize it and propose three algorithms to solve the flexible flow-shop problems of more than two machine centers. Some related scheduling algorithms are first introduced as follows.
The discovery of scheduling algorithms for a set of independent tasks with arbitrary execution time and an arbitrary number of processors is a classic sequencing problem of wide interest and application. Among the proposed scheduling algorithms, the LPT (Longest-Processing-Time-first) scheduling algorithm is the simplest one and is widely used in many real-world situations.
Given a set of n independent tasks (T 1 to T n ), each with arbitrary execution time (t 1 to t n ), and a set of m parallel processors or machines (P 1 to P m ), the LPT scheduling algorithm assigns the task with the longest execution time (among those not yet assigned) to a free processor whenever this processor becomes free. For cases when there is a tie, an arbitrary tie-breaking rule can be assumed. The finishing time by the LPT scheduling algorithm is in general not minimal. The computational time spent by the LPT scheduling algorithm is, however, much lower than that by an optimal scheduling algorithm.
The PT algorithm [11] was proposed by Petrov to schedule job sequencing for a flow shop with more than two machines. Given a set of n flow-shop jobs, each having m (m>2) tasks (T 11 , T 21 , … , T m1 , T 12 , T 22 , …, T (m-1)n , T mn ) that must be executed in the same sequence on m machines (P 1 , P 2 , …, P m ), the PT scheduling algorithm seeks a nearly minimum completion time of the last job. It transforms the flow shop problems with more than two tasks into the ones with exactly two tasks and uses the Johnson algorithm to solve them.
Sriskandarajah and Sethi [12] proposed a heuristic algorithm for solving the flexible flow-shop problem of two machine centers and the completion time of the derived schedules was close to the optimum. Sriskandarajah and Sethi decomposed the problem into the following three subproblems and solved each heuristically: Part 1: Form the machine groups, each of which contains a machine from each center. Part 2: Use the LPT method to assign jobs to each machine group (flow shop). Part 3: Deal with job sequencing and timing using the Johnson algorithm.
In this paper, we will extend above approaches to solve the flexible flow-shop problems of more than two machine centers.
Assumptions and Notation: Assumptions and notation used in this paper are described in this section.

Assumptions:
1. Jobs are not preemptive 2. Each job has m (m > 2) tasks with processing times, executed respectively on each of m machine centers. 3. All machine centers have the same number of parallel machines.
The Search-And-Prune Scheduling Procedure For Job Sequencing: The search-and-prune procedure proposed in this paper is used to schedule jobs sequencing for a flow shop with more than two machines. An upper bound is used to increase the performance of the procedure. The procedure will act as the third part in the first two algorithms proposed later. Given a set of n flow-shop jobs, each having m (m>2) tasks (T 11 , T 21 , …, T m1 , T 12 , T 22 , …, T (m-1)n , T mn ) that must be executed in the same sequence on m machines (P 1 , P 2 , …, P m ), scheduling seeks the minimum completion time of the last job. The procedure is stated as follows. Step 2: For each possible permutation of task sequence, do the following steps.
Step 3: Set the initial completion time d i of the machine i M (i = 1 to m, m is the number of tasks in a job) to zero.
Step 4: Assign the first job j J in its schedule sequence generated in Step 2 to the machines such that j J 's first task T 1j is assigned to 1 M , Step 5: Add the processing time t 1j to the completion time d 1 of the first machine 1 M ; that is: Step 6: If d 1 is larger than max v , go to Step 2 for trying another permutation.
Step 7: Set Step 8: Step 2 for trying another permutation; otherwise, do the next step.
Step 9: Remove job j J from the sequence.
Step 10: Repeat Step 4 to 9 until the job sequence is empty.
Step 11: Set the completion time d as the completion Step 13: Repeat Step 2 to Step 12 until all possible permutations have been tested.
Step 14: Set max v as the final completion time of the job scheduling and save the schedule that gives the minimum total completion time.

After
Step 14, scheduling is finished and an optimal completion time for a flow shop has been found.
The first algorithm for scheduling on a flexible flow shop with more than two machine centers: A heuristic algorithm for solving flexible flow-shop problems of two machine centers is proposed by Sriskandarajah and Sethi in 1989 [12] . In this paper, we generalize it to solve flexible flow-shop problems of more than two machine centers. The proposed flexible flow-shop algorithm is based on the LPT and the proposed search-and-prune approaches to manage job scheduling. The algorithm is decomposed into three parts as Sriskandarajah and Sethi's method was. The first part forms the machine groups, each of which contains a machine from each center. The second part uses the LPT method to assign jobs to each machine group (flow shop). The third part deals with job sequencing and timing using the search-and-prune procedure for a flow shop. The proposed algorithm is stated below.

The proposed LPT_ Search-and-prune flexible flowshop algorithm:
Input: A set of n jobs, each having m (m > 2) tasks, to be executed respectively on each of m machine centers with p parallel machines.
Output: A schedule with a suboptimal completion time. Part 1: Forming the machine groups Step 1: Form p machine groups, each of which contains one machine from each machine center. Each machine group can be thought of as a simple flow shop F 1 , F 2 , …, F p .
Step 2: Initialize the completion time f 1 , f 2 , …, f p of each flow shop F 1 , F 2 , …, F p to zero. Part 2: Assigning jobs to machine groups Step 3: For each job J j , 1≤ j ≤ n, find its total execution time tt j = t 1j + t 2j +…+ t mj .
Step 4: Sort the jobs in descending order of processing time tt j ; if any two jobs have the same tt j values, sort them in an arbitrary order.
Step 8: Remove job J j from the job list.
Step 9: Repeat Steps 5 to 8 until the job list is empty. After Step 9, jobs are clustered into p groups and are allocated to the p machine flow shops.

After
Step 12, scheduling is finished and a total completion time ff has been found.

An Example For The Proposed Heuristic Algorithm:
Assume five jobs, J 1 to J 5 , each having three tasks (t 1j , t 2j , t 3j ), are to be scheduled via three operations. Each operation is executed by a machine at the corresponding machine center. Each machine center includes two parallel machines. Assume the execution times of these jobs are listed in Table 1. The algorithm proceeds as follows.
Part 1: Forming the machine groups: Step 1: Form two machine groups, F 1 and F 2 , each of which is thought of as a three-machine flowshop. Without lose of generality, we may assume the flowshops are constructed as follows: Step 2: Part 2: Assigning jobs to machine groups: Step 3: For each job J j , j = 1 to 5, find its total execution time tt j = t 1j + t 2j + t 3j . For example, the total processing time of job 1 is calculated as: The total processing times of the other jobs can be similarly found and the results are listed in Table 2. Step 4: Sort the jobs J 1 to J 5 in a descending order of the total processing time ( tt j ). The following results are obtained: Job list = {J 5 , J 1 , J 3 , J 4 , J 2 }.
Step 5: Find the minimum f i between the two flowshops F 1 and F 2 . Since both the total processing times of the two flowshops are equal to zero, any arbitrary flowshop can be chosen. Without lose of generality, assume F 1 is chosen.
Step 6: Assign the first job J 5 in the sorted list to the chosen flowshop F 1 .
Step 7: Add the total processing time tt 5 of job J 5 to the needed total time of the chosen flowshop F 1 . Thus: f 1 = f 1 + tt 5 = 0 + 16 = 16.

After
Step 7, the results of allocating J 5 to the flowshop F 1 are shown in Table 3.
Step 8: Remove the job J 5 from the job list. After J 5 is removed, the job list is then as follows: Step 9: Repeat Steps 5 to 8 until the job list is empty. After Step 9, jobs are clustered into two groups and are respectively allocated to the two flowshops. Results are shown in Table 4.  Part 3: Dealing with job sequencing in each flow shop: Step 10: In each flow shop F i , set the initial completion time of the machines f ji = 0 (j = 1 to 3, i=1 to 2). ff has been found ff is then output as the final total completion time. The schedule obtained by the above steps is shown in Fig. 1. The Second Algorithm: In the first algorithm, the LPT method is used to assign jobs to machine groups. The job sequencing and timing in each group is then done by the search-and-prune procedure. The tasks in a set of clustered jobs are executed in the same machine group. The makespans obtained in the above way do not guarantee to be optimal. For getting an optimal schedule, the tasks in a set of jobs may be executed in different machine groups. In this section, we thus propose another scheduling algorithm based on the search-and-prune technique to get the optimal solutions, which can also be used to measure the performance of the first algorithm. The proposed optimal algorithm is stated below.

The proposed optimal flexible flow-shop algorithm:
Input: A set of n jobs, each having m (m > 2) tasks, to be executed respectively on each of m machine centers with p parallel machines. Output: A schedule with an optimal completion time.
Step 1: Set the initial upper bound v max of the final completion time as ∞ .
Step 2: For each possible combination of task allocation and permutation of task sequence, do the following steps.
Step 3: In each machine center, set the initial completion time of each machine to zero.
Step 4: Set the variable g to one, where g represents the number of the current machine center to be processed.
Step 5: Schedule the first tasks of all jobs in the machines of the first machine center. That is, for each task T 1i of the i-th job allocated to the j-th machine D j1 in the first machine center, do the following substeps according to the scheduling order in the permutation and combination generated: (a)Add the processing time t 1i to the completion time d j1 of the machine D j1 . That is: d j1 = d j1 + t 1i, and c 1i = d j1.
(b)If d j1 is larger than v max , neglect all the permutations and combinations with this sequence in the first machine center and go to Step 2 for trying another permutation and combination.
Step 7: Schedule the g-th tasks of all jobs in the machines of the g-th machine centers according to the permutation and combination generated. For each task T gi of the i-th job allocated to the j-th machine D jg in the g-th machine center, do the following substeps in the scheduled order: Step 10: If d m is smaller than v max , then set v max = d m.
Step 11: Repeat Steps 2 to 10 until all the possible permutations and combinations have been tested.
Step 12: Set the optimal final completion time of the job scheduling ff = v max .

After
Step 12, a globally optimal completion time ff has been found. In the above two algorithms, the permutations and combinations of task sequences or machine centers must be tested, causing the execution time is intractable in the worst case. Below, we propose another heuristic algorithm to reduce the computation time.
The Third Algorithm: The third algorithm is based on the PT approach to manage job scheduling. The algorithm is decomposed into three parts as the first algorithm. The first part forms the machine groups, each of which contains a machine from each center. The second part uses the LPT method to assign jobs to each machine group (flow shop). The third part deals with job sequencing and timing using the PT procedure for a flow shop. The proposed algorithm is stated below.

The proposed LPT_PT flexible flow-shop algorithm:
Input: A set of n jobs, each having m (m > 2) tasks, to be executed respectively on each of m machine centers with p parallel machines. Output: A schedule with a nearly completion time. Part 1: Forming the machine groups: The same as in the first algorithm. Part 2: Assigning jobs to machine groups: The same as in the first algorithm. Part 3: Dealing with job sequencing in each flow shop: Step 10: For each flow shop F i , set the initial completion time of the machines f ji (j = 1 to m, i=1 to p) to zero.
Step Step 13: For each flowshop F i , assign the first job J j in Q Fi to the machines such that J 1j is assigned to F 1i , J 2j is assigned to F 2i , …, and J mj is assigned to F mi .
Step 16: Remove job J j from Q Fi .
Step 17: Repeat Steps 13 to 16 until Q Fi is empty. Step

After
Step 19, scheduling is finished and a total completion time ff has been found.

Experiments:
This section reports on experiments made to show the performance of the proposed scheduling algorithms. They were respectively implemented by Visual C++ at an AMD Athlon(tm) XP 1800+ PC. In the first part of the experiments, five sets of problems were tested, respectively for 3 to 7 jobs. Each job has three tasks and each machine center has two parallel machines. The execution time of each task was randomly generated in the range of 5 to 50. Each set of problems was executed for 20 tests and the makespans and computation times were measured. The proposed optimal approach did not work for more than seven jobs in limited time of 10 hours in our environments due to the large amount of computation time.
The optimal approach considered all possible combinations and used a pruning technique to increase its efficiency. The makespans obtained in this way were optimal. The makespans for problems of three to seven jobs by the three proposed methods are shown in Fig. 2 to 4. , it is easily seen that the makespans by the proposed three algorithms have the following relation: Algorithm 3 > Algorithm 1 > Algorithm 2. It is totally consistent with our expectation. The deviation percentages for the first and the third algorithms from the optimal algorithm for processing different numbers of jobs are shown in Table 5. The average deviation percentage for the first and the third proposed heuristic algorithm from the optimal algorithm is respectively 5.05% and 6.19%. Note that the deviation rate for the second algorithm is 0% since it is an optimal approach. In the second part of the experiments, we extend the job number to 25. The average makespan for problems with three to twenty-five jobs are shown in Fig. 5 for comparison. Note that the optimal approach can process no more than seven jobs in this environment.
The average CPU times for problems of three to twenty-five jobs are shown in Fig. 6. The optimal algorithm proposed cannot run over seven jobs in ten hours due to its high time complexity.
From Figs. 5 and 6, it is easily seen that the first and the third algorithms got a little larger makespans than the second one did. The computational time needed by the second algorithm was, however, much larger than that needed by the other two approaches, especially when the job number was large. Actually, since the flexible flow-shop problem is an NP-hard problem, the second approach can work only for a small number of jobs.
As to the first and the third algorithms, the latter got a little larger makespan but used less computational time than the former one. The former can be applied for solving a medium-sized problem.
At the last part, experiments for large job numbers ranging from 3 to 8000 were executed for verifying the efficiency of the third approach. The average CPU times for different jobs are shown in Fig. 7. It can be observed that all the execution times are less than 0.8 seconds. Hence, the third approach is feasible and efficient even for a large number of jobs. It is thus more suitable than the other two proposed approaches for real applications.

CONCLUSION
Appropriate scheduling cannot only reduce manufacturing costs but also reduce the material handling cost and time. Finding good schedules for given sets of jobs can thus help factory supervisors control job flows and provide for good job sequencing. Scheduling jobs in flexible flow shops has long been known an NP-hard problem. In this paper, we propose three algorithms to solve flexible flow-shop problems of more than two machine centers. The first one extends Sriskandarajah and Sethi's method by combining both the LPT and the search-and-prune approaches to get a nearly optimal makespan. It is suitable for a mediumsized number of jobs. The second one is an optimal algorithm, entirely using the search-and-prune technique. It can work only when the job number is small. The third one is similar to the first one, except that it uses Petrov's approach (PT) to deal with job sequencing instead of search-and-prune. It can get a polynomial time complexity, thus being more suitable for real applications than the other two. Experimental results show that the computational times by the proposed three algorithms have the following relation: Algorithm 3 < Algorithm 1 < Algorithm 2, and the makespans have the following relation: Algorithm 3 > Algorithm 1 > Algorithm 2. It is totally consistent with our expectation. A trade-off can thus be achieved between accuracy and time complexity. The choice among the three proposed approaches to solve a flexible flow-shop problem thus depends on the problem size, the allowed execution time and the allowed error. In the future, we will consider other task constraints, such as setup times, due dates and priorities.