MULTI-SHOP SCHEDULING PROBLEM SOLVED WITH GENETIC ALGORITHM - PDF

Document Sample
MULTI-SHOP SCHEDULING PROBLEM SOLVED WITH GENETIC ALGORITHM - PDF Powered By Docstoc
					       MULTI-SHOP SCHEDULING PROBLEM SOLVED WITH GENETIC ALGORITHM

                            Yanhai Hu1, 2, Dengzhe Ma 2, Feifan Ye 1, Junhe Yu 2
                            1
                              Faculty of Eng., Ningbo Univ., Ningbo, China 315211
                       2
                        Inst. of CIM, Shanghai Jiaotong Univ., Shanghai, China 200030
                                          Email: huyanhai@nbu.edu.cn


Abstract: In production system there often exists more than one kind of basic shops such as open shop (O),
job shop (J), flow shop (F ), hybrid flow shop (H). Traditionally, The scheduling for the different shop is
undertaken separately. If these shops in the same production system could be scheduled together, the
optimization objectives might be achieved better. For this purpose, the concept of multi-shop (M), which
includes H and mixed shop (X) where X covers O, J, and F, is put forward. Genetic algorithm modified with
multi-phase encoding method and virtual code is used for scheduling M. A numerical experiment of M
scheduling adopting data of benchmark instance car7 is tested. The M contains seven machines. The first
two machines are assumed to construct X, while other five machines construct H. Its nearly optimal
makespan computed by modified genetic algorithm is 6016. To assess the performance of M, the least
makespan that shops in M are scheduled separately is computed by enumeration algorithm. When the
completing time of jobs in the X are taken as the ready time of these jobs in the H, the least makespan will be
6602. When completing time of jobs in the X are not brought into H, the least makespan will be 6729. The
results show that the M has advantage to shorten the makespan upon separate shops.

Keywords: multi-shop scheduling; mixed shop; hybrid flow shop; genetic algorithm;


1. Introduction
Traditionally, multi-stage scheduling problem in production system is undertaken by four kinds of basic
shops, such as job shop (J ), open shop (O), flow shop (F ), and hybrid flow shop (H). Scheduling of any shop
aims at optimizing some criteria, while jobs and machines subject to specific restrictions. But in real shop
floor, there often exists more than one kind of basic shops. According to the traditional way, these shops
must be scheduled individually, and the total objective value for the scheduling will be the sum of these
individual objective values. If these shops in the same production system could be scheduled together, the
optimization objectives might be achieved better. Researchers have noticed this situation, and started to
study the scheduling of mixed shop (X) which is combined of O and F or J. Kis & Budapest (2002) studied
the complexity of X scheduling with two jobs where one job has a fixed order of operations and the
operations of the other job may be executed in arbitrary order. This problem is shown to be binary NP
complete with respect to all traditional optimality criteria even if distinct operations of the same job require
different machines. Shakhlevich, Sotskov & Werner (2000) surveyed computational complexity of X under
different situations such as precedence constraints, number of machines, operations of jobs more or less than
number of machines, optimization criteria, etc. Ferrell, Sams & Yellamraju tested some common scheduling
rules in M containing jobs with both J and F.

X combined of O and J covers O, J, and F, since J is the generalization of F. But a real production system may
include O, J, and H. It can be treated as the combination of X and H. The scheduling of such kind of
production system has not been found from literature review. We name it multi-shop (M) scheduling
problem where the X is the mixture of O and J. The purpose of this paper is to find a way to schedule M at the
least makespan. The restrictions for M are as follows. Each job consists of a number of operations; each
operation has to be processed on a specified machine; the processing times of all operations are given; every
job is processed on one machine at a time without preemption, and on one machine at most once; each
machine processes at most one operation at a time; all jobs are ready for processing at time zero. There are
unlimited buffers between machines. Sequence of jobs in H is of permutation. That means the sequence of
any two jobs on machines can’t be inverse to their sequence on adjacent machines within the H, e.g. if job A


    35th International Conference on Computers and Industrial Engineering                                   917
is processed on one machine earlier than job B, job A must be processed earlier than job B on the previous
and following adjacent phase, if only they are processed on the same machine.

2. Genetic algorithm used for M
Since X is NP hard problem, while there are more than two machines in the system (Shakhlevich, Sotskov &
Werner, 2000), H is also NP hard problem, while there are two stages and while the makespan is taken as
criterion (Lina & Liao, 2003), M is NP hard problem too, because it is the integration of X and H. Heuristic
or meta-heuristic algorithms must be employed to schedule M. Genetic algorithm (GA) is used for
scheduling of M in this paper, because of the its outstanding features, which is able to search in whole
solution field, and to compute in parallel way. According to the requirements of M, GA used for M must
have particular methodology in encoding method, and consequent genetic operations.

2.1 Encoding method
The code of GA used for O, J, F can employ natural numbers (1, 2, …, n) representing jobs (Tang & Zhao,
2002). The sequence of natural numbers refers to the sequence of jobs. But for H, it is difficult to schedule
jobs on parallel machines with natural numbers only. Wang, Yao, Wu & Wu (2002) introduced real numbers
as GA code to schedule H. But computation with real numbers will take much longer CPU time than with
natural numbers. We try to find a way to employ the natural numbers as code of GA. After the concept of
virtual code using number 0 is introduced, it becomes feasible to make use of both natural number code and
virtual code to schedule H. So the GA code for scheduling M uses non-negative integers, including zero and
natural numbers. Natural numbers are used to determine jobs’ sequence, while virtual code is used to adjust
jobs among parallel machines in M.

Chromosome of GA for M will be divided into two parts. Chromosome for X and F before parallel machines
(Fb) in H are scheduled with natural numbers as the first part, while chromosome for parallel machines and F
after parallel machines (Fa) are scheduled with non-negative integers as the second part. For M processing n
jobs, if there are m1 machines belonging to X and Fb, the length of the first part chromosome will be n
multiplying m1. Every n codes represent the sequence of jobs on one machine within the X and Fb. The
sequence of codes referring to the sequence of jobs in J within X must avoid deadlock, since these jobs have
different procedures. Deadlock avoidance can be realized by code correction method (ElMekkawy &
ElMaraghy, 2003). H is treated as multi-phase system where each stage of parallel machines or Fa is called
one phase in this paper. The chromosome code of H will be of multi-phase as well. If there are m2 phases of
parallel machines and Fa, and v virtual codes are used for each phase, the length of the second part
chromosome will be n+v multiplying m2. Every n+v codes represent the sequence of jobs on one phase
(parallel machines or Fa). For L parallel machines, the n+v codes will be divided into L subsections by every
L codes. The natural number codes in the subsection k represent the jobs and their order processed on the
machine k within the parallel machines. Natural number codes in this part chromosome referring to Fa
represent the sequence of jobs.

For instance, there are three phases of parallel machines and Fa in the H, where the first phase is a couple of
parallel machines; the second phase is Fa; and the third phase is three parallel machines. Four jobs will be
processed. Two virtual codes will be used for each phase. The division and the combination of subsections
are as Fig. 1. For the first phase, natural number codes (1,2,3,4) and two virtual codes are queued
stochastically, suppose that first phase codes (2 4 0 3 0 1) are deduced. The codes are divided into two
subsections by every other code, because there are two parallel machines in this phase. The natural numbers
(2) or (4 3 1) in each subsection represent jobs and their orders on each of parallel machines respectively. For
the second phase, two virtual codes will be inserted to the natural number codes of first phase at stochastic
position to deduce new subsections (0 2 0) and (4 3 1). The length of new subsections must be uniform. New
subsections will be combined together by selecting one code in each subsection successively to deduce the
second phase codes (0 4 2 3 0 1). The natural number codes (4 2 3 1) in the second phase represent the
sequence of jobs on the Fa. The second phase codes will be divided into three subsections, (0 3), (4 0), (2 1),
by every three codes in the third phase, since there are three parallel machines. The natural numbers (3), (4),
(2 1) in the three subsections represent the jobs and their orders on each of parallel machines in the third


918                                     35th International Conference on Computers and Industrial Engineering
phase respectively. It can be seen from Fig. 1 that the following codes in the second part chromosome are
related to the first n+v codes in the chromosome. That will ensure the permutation of H.

          First phase                             Second phase                                Third phase
     two parallel machines                  F after parallel machines                   three parallel machines

       2            2                         0           0                         0                   0
       4            0                         2                                                         3                   3
                                2
       0            0                         0           4                         4
       3                                                                4                               4
       0                                                                2                               0                   4
                    4           4             4           2                         2
       1                                                                3
                    3           3             3
                    1           1             1                         1                               2                   2
                                                          3                         3                   1                   1

                    Fig. 1 Encoding method of the second part chromosome

Suppose that M combined of O and J contains four stages where the first two stages construct X, and the other
two stages construct H. In the H there are two phases where the first phase contains two parallel machines,
while the second phase contains only one machine. Four jobs will be processed in the M where the first two
jobs will be processed in the X at the form of J, while the other two jobs at the form of O. Two virtual codes
will be used in the codes referring to the parallel machines. An example of chromosome for M is as Fig. 2.

           First part chromosome                                  Second part chromosome

                                                                  First phase                   Second phase

 1     2    3   4       2   1       4   3     3   0   1       2     0       4   3       2   0       1       0       4

                                    Fig. 2 A sample chromosome for M
2.2 Genetic operations
Genetic operations such as selection, crossover and mutation are applied on the first part chromosomes and
the natural number codes of first phase of the second part chromosomes. The following phase codes of the
second part chromosomes only have mutation operation under some rule, since they are related to the first
phase codes. After crossover and mutation operations are taken, the fitness of new chromosome is computed.
If the fitness of a new chromosome is better than that of original one, the original one will be replaced by the
new one.

          First phase                         Second phase                                Third phase
     two parallel machines              F after parallel machines                   three parallel machines

       2            2                   0         0           4                     4           2               2
       4            0                   2         4                                 0                           0       2
                            2
       0            0                   0         2           0                     2           0
       3                                          3                         4       0                           0
       0                                          0                         2       3                           1       1
       1            4       4           4                     2                                 4
                                                  1                         3       1
                    3       3           3
                    1       1           1                     0             1                   0               4       4
                                                                                                                3       3

           Fig. 3 Mutation of the following codes in the second part chromosome




      35th International Conference on Computers and Industrial Engineering                                                     919
Half of all chromosomes with better fitness will be chosen for the possible crossover operation by selection
operation. All chromosomes will be used for possible mutation operation. Crossover operation of two
chromosomes and mutation operation of single chromosome are undertaken with general way for natural
number codes (Tang & Zhao, 2002). For the first part chromosome crossover and mutation operations will
be taken with codes in the same shop (J or O). For instance, four jobs will be processed in X, and the first two
jobs will be processed in J, so the first two codes in every four codes in the first part chromosome will
always belong to {1, 2}, and each natural number will appear only once. The mutation operation used for the
following phases of the second part chromosomes is performed as Fig. 3 referring to the example illustrated
in Fig. 1. If the codes of the first phase in this part chromosome is (2 4 0 3 0 1) after crossover and mutation
operations, as well as the virtual codes are inserted at random positions. The jobs and their sequence on two
parallel machines of the first phase will be (2) and (4 3 1) respectively as analysed above. Assume that the
second phase codes deduced from the first phase codes are (0 4 2 3 0 1). Mutation operation on the second
phase codes will be exchanging the adjacent two codes, because there are two parallel machines in the
previous phase. Each code will be exchanged at most once to keep the permutation of Fa within the H.
Suppose that the second phase codes after mutation is (0 4 2 3 0 1). The natural numbers (4 2 3 1) in these
codes represent the job order after mutation in the second phase. Mutation operation on the third phase codes
will be exchanging the adjacent three codes, because there are three parallel machines in this phase. Each
code will be exchanged at most once also. The third phase codes after mutation may be (2 0 4 0 1 3).
Natural numbers in three subsections deduced from the codes (2 0 4 0 1 3) by every three codes will be (2),
(1), and (4 3). These natural numbers represent jobs and their orders on the three parallel machines in the
third phase after mutation. It can be concluded that the mutation rule for the following phase codes in the
second part chromosome includes two aspects. The first aspect is that codes for Fa may be exchanged within
LF adjacent positions when there are LF parallel machines in the previous phase, and codes for parallel
machines after Fa may be exchanged within adjacent Lp positions when there are Lp parallel machines. The
second aspect is that each code may be operated at most once.

3. Numerical experiment
    J   1 2 3 4 5 6 7 Stage

 1         ?   ?   ?   ?   ?   ?   ?
 2         ?   ?   ?   ?   ?   ?   ?
 3         ?   ?   ?   ?   ?   ?   ?
 4         ?   ?   ?   ?   ?   ?   ?
 5         ?   ?   ?   ?   ?   ?   ?
 6         ?   ?   ?   ?   ?   ?   ?
 7         ?   ?   ?   ?   ?   ?   ?
 Job


       O     X              Fb      H        M
       Fig. 4 M contains 7 stages and 7 jobs

In order to assess the characteristics of M, the nearly optimal value of makespan for M computed by GA is
compared to the sum of the best values of objective function for shops in M computed by enumeration
algorithm. A small-scale instance is used so that the best values can be computed by enumeration algorithm.
The data in benchmark instance car7 (Beasley, 1990) is employed in this paper as an example. car7 refers to
a seven machine F originally. We assume that becomes seven stage scheduling problem, in which some
stages contain individual machines, while other stages contain identical parallel machines. We suppose that
the first two stages constitute mixed shop, where the jobs (1,2,3,4) are processed on machines (1,2) as J and
the other jobs are processed as O; while other five stages constitute H, where the machines (3,4,5,6)
constitute Fb, and the final stage contains two identical parallel machines. Then we get M as Fig. 4 where the
arrows refer to the procedure of jobs in J.


920                                     35th International Conference on Computers and Industrial Engineering
                                Table 1 Beginning and ending time of jobs at different stages
                           X                                                                H
 Stage          1                     2                 3                 4                 5                 6                 7
  Job      t         C           t         C       t         C       t         C       t         C       t         C       t         C
   1     1359       2051       2051       2361   3247       4079   4260       4890   4890       5148   5614       5761   5761       6016
   2     778        1359       196        778    1484       1498   2269       2483   2594       2741   3159       3912   3912       4718
   3     219        694        778        1253   1884       2669   2719       3297   3637       4489   4810       4812   4812       5511
   4     196        219        0          196    219        915    915        1129   1129       1715   1715       2071   2071       2948
   5     796        954        0          325    954        1484   1484       2269   2269       2594   2594       3159   3159       3571
   6     0          796        796        1670   1670       1884   2483       2719   2741       3637   3912       4810   4810       5112
   7     954        1496       325        530    2669       3247   3297       4260   4489       4814   4814       5614   5614       5734



The criterion of scheduling for this M is to minimize the makespan, which is marked as Cmax. In traditional
scheduling, the Cmaxes for H and X should be computed separately. The best value of Cmaxes for H and X
computed by enumeration algorithm are 4958 and 1771. The sum of these Cmaxes forms the total Cmax of
the M, which is 6729. If the finishing time of job in M is treated as ready time of the job in the following H,
the total Cmax will be 6602. When the M is scheduled as integrity, its nearly optimal value of Cmax
computed by the proposed GA algorithm is 6016. It can be seen that the nearly optimal value for M is less
than the sum of the best value of H and M, so the methodology put forward in this paper has advantage to
shorten the makespan of M. The beginning and ending time of jobs at different stages for the nearly optimal
value of M is listed in table 1.

4. Conclusions
In real shop floor, jobs often need to be processed on many stages, which may include job shop (J), flow
shop (F), open shop (O), and hybrid flow shop (H). In traditional way, these kinds of shops are scheduled
separately, but it may be better to schedule the shops together when there are several shops in one production
system. Some researchers proposed the scheduling of mixed shop (X), which is the combination of O and J or
F, but H still cant be scheduled together with other shops when there is H in the production system as well.
We propose the concept ‘multi-shop (M)’, which is the combination of X and H, in this paper to schedule all
above-mentioned shops together. The numerical experiment shows that the scheduling methodology with M
has advantage to shorten the makespan of production system.

Acknowledgements:
The authors gratefully acknowledge the support of the National Natural Science Foundation, China (Grant
No. 70171042); Zhejiang Provincial Natural Science Foundation, China (Grant No. Z604342, M703100).




    35th International Conference on Computers and Industrial Engineering                                                                  921
References
1. Beasley, J. E., (1990). OR-Library: distributing test problems by electronic mail, Journal of the
   Operational Research Society, 41(11), 1069-1072.
2. ElMekkawy, T. Y. & ElMaraghy, H. A., (2003). Real-time scheduling with deadlock avoidance in
   flexible manufacturing systems. International Journal of Advanced Manufacturing Technology, 22, 259-
   270.
3. Ferrell W., Sale, J., Sams, J. & Yellamraju, M, (2000). Evaluating simple scheduling rules in a mixed
   shop      environment       Computers     &      Industrial    Engineering,     38,      (1),    39-66.
   Kis, T. & Budapest, (2002). On the Complexity of Non-preemptive Shop Scheduling with Two Jobs.
   Computing, 69, 37 49.
4. Lina, H. T. & Liao, C. J., (2003). A case study in a two-stage hybrid flow shop with setup time and
   dedicated machines. International Journal of Production Economics, 86, 133-143.
5. Tang H. & Zhao C. A., (2002). Introduction about Sequencing (in Chinese). Beijin, Scientific Press.
6. Shakhlevich, N. V., Sotskov, Y. N. & Werner, F., (2000). Complexity of mixed shop scheduling
   problems: A survey . European Journal of Operational Research, 120(2), 343-351.
7. Wang, W., Yao, M., Wu, Y. & Wu, Q., (2002). Hybrid Flow-shop Scheduling Approach Based on
   Genetic Algorithm (in Chinese). Journal of System Simulation, 14(7), 863-865.




922                                  35th International Conference on Computers and Industrial Engineering