You are on page 1of 6

Solving Job-Shop Scheduling Problems

by Genetic Algorithm
Mitsuo GEN, Yasuhiro TSUJIMURA and Erika KUBOTA
Department of Industrial and Systems Engineering
Ashikaga Institute of Technology, Ashikaga, 326 Japan
Email: { gen tsujimr}@genlab.ashitech.ac.jp

ABSTRACT the Traveling Salesman Problem (TSP), hence


the JSP is much harder than the TSP.
Job-shop Scheduling Problem (JSP) is one of
extremely hard problems because it requires very The JSP has N jobs t o be processed on M
large combinatorial search space and the prece- machines and we assume the following:
dence constraint between machines. T h e tradi- 1. No machine may process more than one job
tional algorithm used t o solve the problem is the at a time;
branch-and-bound method, which takes consid-
2. No job may be processed by more than one
erable computing time when the size of problem
machine at a time;
is large. W e propose a new method for solving
JSP using Genetic Algorithm ( G A ) and demon- 3. The sequence of machines which a job visit
strate its efficiency by the standard benchmark is completely specified and has a linear
of job-shop scheduling problems. Some impor- precedence structure;
tant points of G A are how t o represent the sched- 4. Processing times are known;
ules as an individuals and t o design the genetic 5. All jobs must be processed in each machine
operators for the representation in order t o pro- only one time.
duce better results. The JSP is t o find a schedule which minimizes
the total elapsed time. The branch-and-bound
Keywords: job-shop scheduling, genetic algo- method for solving JSP can produce good re-
rithm, genetic representation, genetic operators. sults, but takes considerable computer time even
for the 10 x 10 problem. Thus, it becomes nec-
I. INTRODUCTION essary to use an alternative algorithm, such as
Genetic Algorithm (GA) t o solve the problem,
Job-shop Scheduling Problem (JSP) is among though did not improve the best results from this
the hardest combinational problems and it has method. Davis [6] suggested and demonstrated
been the subject of a significant amount of lit- the feasibility of using a GA in a simple JSP.
erature in the Operations Research areas[l]-[5]. Whitley [7] defined a new edge recombination
The Flow-shop Scheduling Problem (FSP) is a operator for the TSP, although noted that per-
restricted JSP, in which machine sequences are formance degraded when applied to more typical
identical for all jobs. The FSP is identically as scheduling problem. Recently, Bagchi [8] used

0-7803-2129-4/94 $3.00 Q 1994 IEEE

-
problem-specific information in the representa- one undertakes the burden of developing com-
tion and genetic operators and addressed a lim- plicated genetic operators, this scheme has the
ited form of JSP in which certain batches of tasks advantage of being very direct.
must be scheduled continuously. Also, Nakano The indirect representation needs interpreting
[9] used a conventional GA for the JSP, supple- program to translate it to valid schedule. The
mented with algorithms for interpreting and re- advantage of this scheme is the simplicity of the
pairing genomes[l0][12][13][14]. individual structure and the operators, and the
In this paper, we introduce our implementa- drawback is that the genetic algorithm is con-
tion of GA t o solve JSP and discuss its efficiency strained to search only in the space of all possi-
comparing results of numerical experiments us- ble permutation of individual’s genes.
ing GA and branch-and-bound method. We adopt the indirect approach t o represent
the individual. The representation can be viewed
11. GENETIC ALGORITHM as a kind of enlarged job-list, which contains
N x M genes, where N is the number of jobs and
,4Genetic Algorithm is based on the evolution M is the number of machines. Because every job
system and hereditary[ll]. In the evolution pro- is assumed to be processed in each machine only
cess the population undergoes sexual recombina- one time, so every job appears in the job-list ex-
tion (crossover), mutation and natural selection actly M times. As a valid schedule, the process-
that select the best individuals for the next gen- ing order of jobs is given for each machine and
eration, and so on. the indirect individual then can be translated
into a valid schedule according to the predeter-
The components of GA are as follows: mined processing order of machines.

1. a symbolic representation of a solution; Table 1 Ordering of Machines


2. an evaluation function rating solutions in
terms of their fitness; Job No. Ordering of Machines
Job 1 3124
3. genetic operators which alter the composi-
Job 2 2314
tion of offsprings through reproduction and
Job 3 3412
recombination; Job 4 1243
4. a way t o create an initial population of so-
lutions; For example, in the 4 x 4 problem shown in
5 . values of the parameters in GA. Table 1, the list (3,1,2,4,2,1,2,4,3,1,3,4,3,2,1,4)
means that assignment of machine is (3,3,2,1,3,
1,1,2,4,2,1,4,2,4,4,3) and the assignment of jobs
11.1 Representation in each machine is shown in Table 2.

There are two different approaches used to Table 2 Ordering of Jobs


tackle the problem of represent at ion: the direct
represent at ion and the indirect represent at ion. Machine No. Ordering of Jobs
In the direct representation the schedule it- M1 4123
self is used as an individual. No decoding pro- M2 2413
cedure is therefore necessary, but requires com- M3 3124
plicated recombination operators which should M4 3421
ensure that the individuals will be feasible. If

1578
11.2 Evaluation Function o1 = 3 2 i 2 3 4 i 3 2 1 3 4 4 1 3 4 1 2 3
02 = 4 1 2 4 1 2 3 4 2 1 2 3 4
During each iteration, the individuals in the
current population are evaluated, using some
The order of genes in the partial schedule is
measure of fitness. There is a number of charac-
important in the structure of the building block.
teristics of the evaluation function that enhance
Thus, we must try to maintain its orders as sim-
or hinder a evolution program's performance. In
ilar as possible with the original schedule.
the most optimization applications, fitness is cal-
In schedule ol, we must delete two "3" and one
culated based on the natural objective function.
"1". In the schedule p2, the first "3" of the par-
In our case, the fitness of each individual is eval-
tial schedule is the first "3" in the entire sched-
uated as the following total elapsed time of the
ule. Then two "3", the first and second "3" of
corresponding schedule:
o1 can be deleted. At the same form, the "1"
of partial schedule in p2 is the first "1'7 in en-
tire schedule, then the first "1" in ol has been
deleted .
where ft(j) is the finishing time of job j. In schedule 0 2 , we must add two "3" and one
"1". The "1" in the partial schedule of pl is the
11.3 Crossover second "1" in the entire schedule, then one '71"
before as partial schedule in o2 has bee added.
Because our representation is not the permu- We must add two "3" at any position in 02,that
tation of jobs, the well-known PMX (Partially is, these can be placed before or after the partial
Mapped Crossover), CX (Cycle Crossover), OX schedule of 02.
(Order Crossover) or ER( Edge Recombination)
01 ~ 2 2 143 2 1 3 4 4 1 3 4 1 2 3
crossover operators are not suitable for it due to
02 =1 4 1 2 43 123342 1234
the complex mapping relationship.
We propose a partial schedule of exchanging
crossover. First, the partial schedules are picked 11.4 Mutation
out randomly in the parents respectively. The
partial schedule is identified with the same job in Although the crossover tries t o improve the
the first and last positions of the partial schedule. fitness in its offsprings, the chances of offsprings
And then we exchange the two partial schedules. converged in a local solution are existing. Re-
Usually, the partial schedules have the different pairing this situation, there is an escape mecha-
length (contains the different number of genes). nism called mutation, which changes genes in the
The offsprings generated after exchange may be same list randomly with little probability. We
larger or shorter than the determined length, it is define a mutation operator as follows: generate
necessary to delete relatively excessive genes or randomly two positions in the list and exchange
to add relatively necessary genes to make them their genes, and if the two genes are same one,
become to the legal offsprings. retry t o select new positions.

Examp le: Example:


p1= 3 2 1 2 3 4 1 2 4 4 1 3 4 1 2 3 ,pl=1243 21422314 1433
p2=4 1 3 2 1 3 4 1 2 3 4 2 1 2 3 4 01=1244 21422313 1433

1579
11.5 Selection step 1: Generating of the Initial Population
Produce pop-size individuals Si (i=l,. *

The selection procedure used here is the eli- pop-size) that contain M x N genes between
tist selection. After the population undergoes 1 and N , and each job must exactly appeaI
crossover and mutation at rates p , and p , re- M times.
spectively, the size of population increases as
+ +
(1 p,) x (1 p,) x pop-size. Within the pop- step 2: Calculation of the Evaluation Func-
tion and Keeping the Best Individual
ulation, we select the best pop-size individuals
conforming their fitness for next generation. step 2.1

11.6 Keeping the best individual begin


for j = 1 to n do
jobnum= list b] ;
At each generation, it is presumed that the
execute the job jobnum in respective
fitness of population is improved on the average.
machine with assumptions in Sec-
However, the genetic operators may destroy the
tion 1;
best individual appeared up still now. To elim-
calculate the finishing time f t of this
inate this inconvenience, the best individual is
job;
kept at each generation, that is, all individuals
end
are compared with the best one which had been
kept at the previous generation, and if an indi- f(S;)=max{ f t 1;
end
vidual which is better than the current best in-
dividual, the individual is kept as the new best
one. where n is the length of job-list, list [j] is the
Keeping the best individual is performed as array where the jobs are kept and f(S;) is
follows: the finishing time of individual 5’;.

s* = argmin{f(Si)} (2) step 2.2


si

where arg of a r g m i n is the abbreviation of if mjn{ f( Si)} < ftmin,


t
a r g u m e n t , and means the variable of minimum f t m i n = mjn{f(S;)}
value of f(S;). a

In the last generation the kept individual is


given as the best solution.
If g e n = m a s - g e n , stop and output the
111. ALGORITHM earliest finishing time f t m i n and the sched-
ule S*.
We introduce the algorithm which described
in previous section. step 3: Crossover
step 0: Setting of Parameters begin
Specify pop-size as number of individuals, i= 0;
p , as the rate of mutation, p , as the rate while i < pop-size x p , do
of crossover and m a x - g e n as the maximum select a pair of unmatched parents;
number of generations . Set g e n = 0 and identify two partial schedules;
f t m i n = 9999. exchange partial schedules;

1580
legalize the offsprings; rat.e is 0.4. Figures 1, 2 and 3 show the results of
i=i+2; 20 x 5 job-shop scheduling problems with differ-
end ent parameters of crossover, mutation and pop-
end ulation size.
Table 4 hluth and Thompson’s benchmark
step 4: Mutation
begin Papers (GA)
.a=@
, Nakano (1991)
6x6
55
10x10
965
20x5
1215
while i < pop-size x p , do Yamada (1992) 55 930 1184
pick two positions in the job-list; This method (1994) 55 962 1175
exchange their genes;
i=i+l;
end
end

step 5: Elitist Selection


Select the best pop-size individuals for next
generat ion.

step 6: Update the Generation


+
Set g e n = g e n 1 and return to step 2.

1 I50 I.
IV. NUMERICAL EXPERIMENTS 0 10000 20000 30000 40000 50000
generation
Muth and Thompson’s benchmarks consist of
three problems: 6 x 6, 10 x 10, 20 x 5. The Figure 1 Evolution process with different pa-
historical progress in branch-and-bound method rameters of crossover p,.
and GA together with the results are shown in
Table 3 and Table 4.
1650 i
Table 3 Muth and Thompson’s benchmark
1550 i
I /
0.1

Papers 6x6 10x10 20x5


3
Balas (1969) 55 1177 1231 1450 0.5
McMahon (1975) 55 972 1165 FT
Barker (1985) 55 960 1303 1350
Carlier (1989) 55 930 1165
1250

In our experiment, the algorithms are coded


1150 L
with Turbo C language on Personal Computer
0 10000 20000 30000 40000 50000
configurations. The parameters for genetic algo-
generotion
rithms are selected for all trials as follows: the
number of maximum generation is 50000, popu- Figure 2 Evolution process with different. pa-
lation size is 60, mutation rate is 0.3, crossover rameters of mutation p,.

1581
[4] Barker J.R. and G.B. McMahon: Scheduling
the general job-shop, Manage. Sci., 31, 5, pp.
594-598, 1985.
[5] Carlier J. and E. Pinson: An algorithm for solv-
80 40 ing the job-shop problem. Manage, Sci., 35, 2,
/ 60
pp- 164-176, 1989.
[6] Davis L.: Job shop scheduling with genetic al-
gorithm, Proc. of 1st ICGA and their Applica-
tions, Pittsburgh, pp. 136-140, 1985.
1150 7[7] Whitley D., T. Starkweather, D’Ann Fuquay:
0 10000 20000 30000 40000 50000
Scheduling problems and traveling salesmen:
generation
The genetic edge recombination operator, Proc.
Figure 3 Evolution process with different pa- of 3rd ICGA and their Applications, San Ma-
rameters of population size pop-size. teo, pp. 133-140, 1989.
[8] Bagchi S., S. Uckun, Y. Miyabe, K. Kawamura:
Exploring problem-specific recombination op-
V. CONCLUSION erators for job shop, Proc. of 4th ICGA, San
This paper proposed the new approach for Mateo, pp. 10-17, 1991.
solving Job-shop Schedulig Problem (JSP). JSP [9] Nakano R.: Conventional Genetic Algorithms
is among the hardest combinational problems for Job-Shop Problems, Proc. of 4th ICGA,
and its resolution with conventional method, as San Mateo, pp. 477-479, 1991.
branch-and-bound method, spent a computa-
tional time reIatively. In this paper, some modi- [lo] Yamada, T. and R. Nakano: A Genetic Al-
fications have bee performed with a Genetic Al- gorithm Applicable to Large-scale Job-Shop
gorithm(GA) in order t o solve JSP effectively. In Problems, Parallel Problem Solving from Na-
ture 2, Manner and Manderick(ed), pp. 281-
using GA we demonstrate that choosing suitable
290, 1992.
representation of individuals, genetic operators
and parameters of evolutional system are an im- [ll] Michalewicz, 2.: Genetic Algorithms + Data
portant step to get better results. Also, we have Structures = Evolution Programs, Springer
shown its efficiency by results on graphics which Verlag, 1992.
are obtained with implemetation in Turbo C. [12] Gen. M., Y. Tsujimura, E. Kubota, C. Inseong:
REFERENCES A Genetic Algorithm for Flow Shop Problem.
Proc. of JIMA Fall Meeting, pp. 43-44, 1993
[l] Muth, .J.F. and G.L. Thompson: Industrial (in Japanese).
Scheduling, Prentice Hall, Englewood Cliffs,
Ney Jersey, 1963. [13] Gen. M., Y. Tsujimura, E. Kubota: Solving
Job-Shop Scheduling Problem Using Genetic
[a] Balas, E.: Machine sequencing via disjunctive Algorithm, Proc. of 16th International Confer-
graphs: an implicit enumeration algorithm, ence on Computers & Industrial Engineering,
Oper. Res., 17, pp. 941-957, 1969. Japan, pp. 576-579, 1994.
[3] h4cMahon G. and M. Florian: On scheduling [14] Gen. M., Y. Tsujimura, E. Kubota: Genetic
with ready times and due dates to minimize Algorithm for hlultiprocessor Scheduling Prob-
maximum lateness, Oper. Res., 23, 3, pp. 475- lems. Proc. of 10th Fuzzy System Symposium,
482, 1975. pp. 43-46, 1994 (in Japanese).

You might also like