• Aucun résultat trouvé

A genetic algorithm approach to job shop scheduling problems with a batch allocation issue

N/A
N/A
Protected

Academic year: 2021

Partager "A genetic algorithm approach to job shop scheduling problems with a batch allocation issue"

Copied!
9
0
0

Texte intégral

(1)

READ THESE TERMS AND CONDITIONS CAREFULLY BEFORE USING THIS WEBSITE.

https://nrc-publications.canada.ca/eng/copyright

Vous avez des questions? Nous pouvons vous aider. Pour communiquer directement avec un auteur, consultez la

première page de la revue dans laquelle son article a été publié afin de trouver ses coordonnées. Si vous n’arrivez pas à les repérer, communiquez avec nous à PublicationsArchive-ArchivesPublications@nrc-cnrc.gc.ca.

Questions? Contact the NRC Publications Archive team at

PublicationsArchive-ArchivesPublications@nrc-cnrc.gc.ca. If you wish to email the authors directly, please see the first page of the publication for their contact information.

NRC Publications Archive

Archives des publications du CNRC

This publication could be one of several versions: author’s original, accepted manuscript or the publisher’s version. / La version de cette publication peut être l’une des suivantes : la version prépublication de l’auteur, la version acceptée du manuscrit ou la version de l’éditeur.

Access and use of this website and the material on it are subject to the Terms and Conditions set forth at

A genetic algorithm approach to job shop scheduling problems with a

batch allocation issue

Xie, H.

https://publications-cnrc.canada.ca/fra/droits

L’accès à ce site Web et l’utilisation de son contenu sont assujettis aux conditions présentées dans le site LISEZ CES CONDITIONS ATTENTIVEMENT AVANT D’UTILISER CE SITE WEB.

NRC Publications Record / Notice d'Archives des publications de CNRC:

https://nrc-publications.canada.ca/eng/view/object/?id=01ccb97e-b175-4c56-ba51-6e4fe5542a47 https://publications-cnrc.canada.ca/fra/voir/objet/?id=01ccb97e-b175-4c56-ba51-6e4fe5542a47

(2)

http://irc.nrc-cnrc.gc.ca

A G e n e t i c a l g o r i t h m a p p r o a c h t o j o b s h o p

s c h e d u l i n g p r o b l e m s w i t h a b a t c h a l l o c a t i o n

i s s u e

I M T I - X P - 0 1 6

X i e , H .

A version of this document is published in / Une version de ce document se trouve dans: 17th International Workshop on Artificial Intelligence, Seattle, Washington, August 1, 2001, pp. 126-131

The material in this document is covered by the provisions of the Copyright Act, by Canadian laws, policies, regulations and international agreements. Such provisions serve to identify the information source and, in specific instances, to prohibit reproduction of materials without written permission. For more information visit http://laws.justice.gc.ca/en/showtdm/cs/C-42

Les renseignements dans ce document sont protégés par la Loi sur le droit d'auteur, par les lois, les politiques et les règlements du Canada et des accords internationaux. Ces dispositions permettent d'identifier la source de l'information et, dans certains cas, d'interdire la copie de documents sans permission écrite. Pour obtenir de plus amples renseignements : http://lois.justice.gc.ca/fr/showtdm/cs/C-42

(3)

A Genetic Algorithm Approach to Job Shop Scheduling Problems with a Batch Allocation Issue Helen Xie

Integrated Manufacturing Technologies Institute National Research Council of Canada 800 Collip Circle, London ON Canada N6G 4X8

Email: Helen.Xie@nrc.ca

This paper presents a robust genetic algorithm approach to solve job shop scheduling problems with more practical considerations. Considerations have been given not only to job processing time but also to setup time, which leads to a batch allocation for jobs. Incorporating the batch allocation into job shop scheduling promises great potential to reduce work in progress, an essential factor for production planning. The system uses genetic algorithms to evolve an appropriate permutation for dispatching rules and batch sizes with an encode-decode strategy. It then uses a non-delay heuristic algorithm to construct a feasible solution according to the permutation. Testing results show that makespan has been dramatically reduced when the batch allocation is accounted.

1. Introduction

The job shop scheduling problem (JSSP) is critical and practical in the production and process control. It involves schedule optimization with n jobs and m machines and is referred as a NP-completion problem. Industries need effective and fast solutions to resolve the practical scheduling problem. The classical job shop scheduling theory ensures optimality, but only deals with a limited number of jobs and machines, as the computing time increases exponentially with the problem size. The approximate approaches cannot always ensure optimality, but provide near-optimal solutions in a reasonable time (Ghedjati, 1999). Genetic algorithm is one of the approximate approaches that could provide a fast solution to scheduling problems because of its distributing calculation characteristics.

It has been recognized that, in addition to operation sequences, a job batch size also affects a completion time on the scheduling optimization. Although a processing time for operations is fixed, the set up time depends on the operation sequences. By considering the job batch size and set up time, the problems is further complicated (Maccarthy 1993). A genetic algorithm approach is developed for this problem, in which the job batch size and operation sequences are considered as two variables to achieve an optimal objective, the job completion time.

Genetic algorithms have been applied to scheduling problems since Davis (1985) first suggested and demonstrated the feasibility of using a GA on a simple JSSP (Michalewicz 1994). The main idea of Davis's approach is: (1) to encode the representation of a schedule in such a way the genetic operators would operate in a meaningful way and (2) a decoder would always produce a legal solution to the problem. This encode-decode strategy can be extended to dispatching rule based GA and other methods.

Another approach to the job shop scheduling problem uses a non-standard representation to avoid the coding of infeasible solutions. If ordinary genetic operators destroy the scheme structure of the representation, new operators (at least crossover operators) preserving this structure have to be developed. The sequencing problem-specific crossover operators can be order crossover, partially mapped crossover, cycle crossover, enhanced edge recombination, order-based crossover, and position-based crossover. This approach may be good at the fixed number of tasks in a machine. However, if the batch size is considered, the number of tasks varies, thus it is difficult to apply above crossover operators to a length variable chromosome.

In the approach to solve the schedule problem with the consideration of batch sizes, the encode-decode strategy is applied to batch sizes and dispatching rules in genetic algorithms. The genetic algorithms are used to evolve an appropriate permutation. A non-delay heuristic algorithm is then used to construct

(4)

feasible solutions according to the permutation. In the section 2, the job shop scheduling problems is described with our specific concerns, the job batch size issue. In the section 3, the approach is presented for both genetic algorithms and a non-delay heuristic algorithm. The section 4 reports the experimental results. The conclusion is made in the last section.

2. Overview of Job Shop Scheduling Problems

A job shop scheduling problem (French, Conway) may be stated as: n jobs {J1, J2, ... Jn} have to be

processed through m machines {M}={M1, M2, ... Mm}. Each job has its own routes and must pass through

each machine. Each job i consists of a set of gi operations oij. Each operation of jobs should be processed

in sequence on certain machines mi,j with set up time si,j and processing time pi,j. The time required to

transport the job to the machine is ignored. An example is shown in Table 1 with 4 jobs, 4 machines and 4 operations in a sequence of mij, sij, pij.

Table 1. 4 * 4 job shop scheduling problem in a sequence of mij, sij, pij

operation 1 operation 2 operation 3 operation 4 items

job 1 1, 30, 5 2, 40, 3 3, 20, 7 4, 10, 1 60

job 2 2, 50, 8 4, 49, 6 3, 53, 2 1, 13, 5 70

job 3 2, 47, 3 4, 79, 6 3, 37, 4 1, 42, 4 80

job 4 1, 55, 2 3, 29, 2 2, 75, 7 4, 32, 3 90

In addition to the assumptions that appear frequently in scheduling theory literature(French, Conway), following assumption are made in this project to extend the scheduling theory to a more practical situation:

(1) For each job Ji, a job size ai may further be divided into several small batches bi. The number of

batches is defined by Nbi, which is ai/bi. The batch number can be 1, 2, ... Nbi.

(2) The set up times are sequence dependent of the schedules. Since the batch size is considered, set up time should be ignored if the same operations except for a different batch are continually processed on the same machine.

A schedule is an assignment of operations over time on machines, which is compatible with the technological constraints. To be more specific, it is to determine when each operation of each job should be done. Objectives in scheduling optimization could be based on several criteria, such as completion times, due dates, and inventory and utilization. In this project, the maximum completion time Cmax is

considered as the criteria. Minimizing Cmax means that schedule's cost depends on how long the shop is

devoted to the entire set of jobs.

In job shop scheduling problems, set up time and batch sizes has important impacts on the completion time. On one hand, it might be beneficial to process each job type in a single batch, as the set up time decrease when the job type remains the same. On the other hand, since a given job type has different processing times on different machines, it may create imbalance workloads in the shop resulting in increasing waiting time. From this point of view, it might be beneficial to break the jobs into smaller batches to bring work-in-progress down. Because of above opposing impacts, optimal batch size can be found for each job, which give the best performance. Therefore, the scheduling optimization problem depends not only on operation sequence but also on the number of batches. Operation sequence and the number of batches should be considered as solution variables concurrently to obtain a global optimal scheduling. The solution to this combination optimization problem will be described in following section.

3. Approach to Job Shop Scheduling Problems with a Batch Allocation Issue

(5)

A genetic algorithm and a non-delay heuristic schedule algorithm are developed to solve the job shop scheduling problem with a batch allocation issue. The genetic algorithm module evolves populations of dispatching rules and the number of batches, compares their fitness function, and eventually generates the near optimal solution. Instead of taking operation sequence over machines as chromosome directly, the genetic algorithm module generates permutation by encoding dispatching rules which are easily applied by standard GA operators (crossover and mutation). The schedule module uses non-delay heuristic algorithms (Askin) to obtain job schedules on each machine. The job schedules with batch size are developed using dispatching rules. The schedule module decodes dispatching rules generated from the genetic algorithm module for job schedule and gains the fitness function. In following two sections, the genetic algorithm and schedule algorithm will be described in details.

3.1 Genetic Algorithms

Genetic algorithm is a search technique for solving optimization problems based on the mechanics of natural selection. The genetic algorithm module searches the two-dimension solution space of dispatching rules and the number of batches, passes evolved solutions to scheduling module and evaluates fitness function back from the schedule module, and eventually obtains an optimal solution.

3.1.1 Solution Representation

It is recognized that there are two strategies for chromosome representation in a scheduling problem. One is an encode/decode method, in which sequences are represented in such a way that standard genetic operator can apply. Another one is to directly use a sequence of operations as a chromosome.

In this project, the two-dimensional solution space with combination of operation sequence and batch size is to be searched. Moreover, the number of tasks to be sequenced depends on the number of batches. Therefore, it is difficult to construct special genetic operator for the direct representation method. Instead, the encode/decode method is used for sequence representation. The operation sequence is encoded as dispatching rules.

A composite chromosome is constructed to represent the 2D solution space. It includes two sub-chromosomes to represent dispatching rules and the number of batches respectively. The dispatching rules and batch size have a common characteristic. They can be represented as discrete values with a limited range. Therefore, the binary representation is used for both dispatching rules and batch size.

A 3D binary string representation is used for the dispatching rules. Since eight dispatching rules will be applied in non-delay algorithm, they can be represented by three bit binary alphabets from (0 0 0) to (1 1 1), which is in x coordination (width). The dispatching rules are applied when operations compete on the same machine. So each machine has to follow different dispatching rules, which is in y coordination. The height of the 3D binary string is the number of machines. To ensure that each competing has its own dispatching rules, a set of dispatching rules should be placed on each machine, which is in z coordination. The depth of the 3D binary string is the maximum number of operations to be processed on a machine.

A 2D binary string representation is used for the batch size. In x coordination, the batch size is encoded as a binary string. For example, if the maximum batch size is 16, 4 bit binary string will be applied. Since each job may have its own number of batches, the number of batches for each job can be represented in y coordination. The height of the 2D binary string is the number of jobs.

Above 3D binary string and 2D binary string is combined together to form a composite chromosome which will be used in the genetic algorithm.

3.1.2 Evaluation Function

The evaluation function can greatly enhance or hinder a genetic algorithm's performance. When a raw result direct from objective function is used for evaluation, for example, a very good individual may score 1020 and a poor one may score 1000, it may take time to distinguish descendants of the good one. To avoid this situation, a linear scaling process is used in this project. It converts the objective score (value

(6)

returned by the objective function) to a fitness score (value used to determine fitness for mutation) using following formula:

f = a * o + b;

The parameters a, b are selected so that the average objective score o is mapped to itself and the best objective score is increased. The parameters a, b are fixed and are not problem dependent.

3.1.3 Genetic Operators

Crossover operator:

The function of the crossover operator is to generate child chromosomes from two parent chromosomes by combining information extracted form the parents. The single point crossover is used for this purpose. The crossover site is first generated randomly. Two child chromosomes are formed by swapping the first part of the parents with one another. When a random number generated between 0 and 1 is less than the probability of crossover, a crossover operator is applied to two parent chromosomes.

The high crossover rate allows more exploration of the solution space, and reduces the chances of a local optimum. However, if the rate is too high, it will result in the unnecessary efforts in exploring infeasible solution space. In this project, the crossover probability is 0.95 with population size of 50. Mutation operator:

When mutation is applied to a chromosome, new information is introduced into the chromosomes by changing the value of one bit. In this project, the flip mutator is applied. The flip mutator change 1 to 0 and 0 to 1. If the mutation probability is small, then we must call random on each bit in the chromosome. When a random number generated between 0 and 1 is less than the probability of mutation, a bit in the chromosome will be mutated. If the mutation probability is high, we can simply mutate a known number of bits (based on the mutation rate). Which bit to be changed depends on a random number.

The frequency of the mutation operation will affect the performance of GA. If the frequency is too high, excessive new information is introduced and valuable "old" information may be destroys in the chromosomes. On the other hand, if the frequency is low, the chromosomes remain unchanged and little information will be added to assist the search in GA. In this project, the probability of mutation is 0.005 with population size of 50.

Selection operator:

The selection operator picks up chromosome from a population for mating. In this project, the roulette wheel method is used. This selection method picks an individual based on the fitness score relative to the rest of the population. The higher the score, the more possibility an individual will be selected. Any individual has a probability p of being chosen where p is equal to the fitness of the individual divided by the sum of the finesses of each individual in the population.

3.1.4 Procedures for the Steady State Genetic Algorithms

The steady state genetic algorithms use overlapping populations with a replacement probability. The replacement probability parameter indicates the percentage of the population that should be replaced each generation. In this project, we use 0.9 as the replacement probability.

The procedures of the steady state genetic algorithm is briefly described as following: step 1: initializing a chromosome randomly;

step 2: evaluating the fitness function (call scheduling algorithms);

step 3: based on the roulette wheel method, selecting individual from population for mating; step 4: crossover applied for each pair of selected individuals based on the probability; step 5: mutation based on the probability;

step 6: 90% of old generation is replaced by new generation;

step 7: if satisfy the terminal condition, stop; otherwise, go to step 2.

(7)

3.2 Scheduling Algorithms

Non-delay heuristic scheduling algorithm is used to generate feasible solutions for evaluation of objective function. It decodes chromosome for dispatching rules and batch sizes for every population.

An important concept in schedule generation procedures is the set of schedulable operations. When the batch size is considered, the buffer {A1} is initialed with the first operation on all batches of each ready

job. At any moment t, after the operation of certain a job is selected, the operation is removed and the next operation

o

with the same batch no l and the same job type i is added in {A

o

ijl i j

l

,+1 t+1}. In this way, there

are always different operation and different batch of the same job competing to be processed. Whenever the last operation of a job is selected and scheduled, there is no replacement in {At} and the size of the set

is reduced by one. The schedule is completed whenever {At} becomes empty.

The set of schedulable operations {At} is partitioned by machines, into m subsets, each denoted

{

A

tk} (k = 1, 2, ..., m) and consisting of the operations "schedulable " on each particular machine at the given moment. Each subset consists of operations waiting before that machine, and of operations all of whose direct predecessors are in process on other machines. Particular subsets can alternate between empty and nonempty status until eventually all the subsets are empty and the schedule is completed.

There is non-delay method of selecting the subset {

A

tk}, from which the next assignment is to be made, which provide the basis for the dispatching procedures. Consider the set of operations which are "in process," denoted {Sip}. An operation is placed in { Sip} as soon as it is removed from {At}. The set

{Sip} is partitioned by machine into m subsets, and there is exactly one operation in each of these subsets.

When an operation is placed in one of the subsets, denoted by { }, the pervious occupant is removed from the set.

Sipk

Let Ck be the process completion-time of the operation in {Sip}, s k

jk be the potential starting-time of

operation j in {

A

tk} (this is the completion-time of the previous operation or zero if this is an initial operation of a job), be jth operation on lth batch of job i. If { } is a nonempty subset, the next operation

o

to be scheduled is selected based on following criteria:

o

ijl Atk ij l eij k M j Atk k jk * { } { } min{min[max( , )]} = ∈ ∈ C s and l = min {bi |

o

ij ∈{ }} bi A t k

where

e

ij*is the earliest available starting-time of the operation o

ij, and bi is the batch number.

If more than one operation in {

A

tk} to be processed on the same machine k meet above criterion, in this situation, dispatching rules are used to decide which operation goes first. Sometimes after a dispatching rule is applied to operations, there are still more than one operation competing on the same machine. In this case a dispatching rule with random selection is applied.

After we get a complete schedule, the completion time Ck on each machine can be obtained. The maximum completion time Cmax on certain a machine can be evaluated as an objective function.

obj = min Cmax =min{max(k {M} )}

k

C

4. Experimental Results

The job shop scheduling optimization system consists of scheduling algorithm and genetic algorithm modules. The scheduling algorithm module is implemented in C++ in Linux environment. The genetic algorithm module is a public domain software GAlib implemented by Massachusetts Institute of Technology. Some experiment results have been obtained for different benchmarks. It is shown that the completion time of job shop scheduling can be reduced if the batch size is considered.

(8)

Three job shop scheduling problems have been tested. The first one is a 10 * 10 benchmark problem (Muth). The second one is a 20 * 5 benchmark problem (Muth). The last one is a 4 * 4 problem (Askin) in which the batch allocation issue has been accounted.

4.1 10 * 10 problem

This is a benchmark problem provided by Muth (1963). There is only one item for each job so that we do not have to consider the set up time separately with processing time. The purpose of solving this problem is to verify our idea and system efficiency. The schedule result with completion time 972 is achieved. In this case, 40 population and 100 generation are applied. The probability of crossover is 0.95, and the probability of mutation is 0.005. The best result using GA is 930 for this problem.

There are two reasons why our result is not as good as the best one:

(1) The performance of the genetic algorithm depends on many factors including the population size, probability of crossover and mutation, and their quantity relationship. Although many trials have been done, good combination is not found. Even in published results, the average objective function has some differences against the best one using the same algorithm.

(2) The non-delay scheduling algorithm are not supposed to try all possible solutions. It selects a job based on some criteria such as the earliest available job and dispatching rules. This method may not get the optimal solution, but it definitely gets good one with less computing time consuming. So it is able to deal with large size job shop scheduling problem. Using genetic algorithm to evolve the dispatching rules and the number of batches will improve the scheduling results generated by the non-delay algorithm. However, it does not search all solution space. In the future work, we can try to trade off the computing time consuming and search space and get better solution.

4.2 20 * 5 problem

This is another benchmark problem of Muth (1963). The best result reported is 1165 in completion time. Our result is 1228 in completion time. We also noticed that one of the published result by using dispatching rule based GA is 1249 (Bierwirth). That confirms with our previous inference about the dispatching rule based scheduling algorithms.

4.3 4 * 4 problem

Askin (1993) provided a schedule result using the non-delay scheduling algorithm for this 4 * 4 problem. In this problem, only one item for each job type is considered so that setup time is not necessary to be considered separately. In Oscine’s solution, only SPT dispatching rule is applied when multiple jobs compete on the same machine. In this way, the schedule with completion time of 28 can be obtained. In this test, the genetic algorithm evolves various dispatching rules to aim at an optimal solution. A schedule with completion time of 27 is achieved. The population size 10 and generation size 10 is used in the calculation.

For the purpose of comparing the schedule results with and without batch size consideration, the size of each job and set up time are added to the Askin’s 4 * 4 problem (Table 1). With 10 generation, the completion time is 2047 if the batch size is considered, while the completion time of 2199 is obtained without considering the batch size. We can see the great improvement with the batch size consideration.

It can be concluded that the algorithm proposed here is good for job shop scheduling problem with batch size consideration from above experiment results.

5. Conclusions

In this project, a theoretical job shop schedule problem is expended to a more practical situation in which the batch allocation issue is considered. A genetic algorithm is applied to solve this problem. The encode/decode strategy is used to represent the chromosome specific to our optimization problem. The non-delay schedule algorithm has been modified to adapt to the batch size consideration. The experiment

(9)

results show that this method is able to greatly improve the job shop scheduling if considering job batch size.

Acknowledgement

The author appreciates a financial support for this project from the Department of Mechanical Engineering, the University of Saskatchewan.

References

Askin, R. G. and Standridge, C. R., Modeling and Analysis of Manufacturing Systems, Jone Wiley & Son, Inc., 1993, pp. 113-121

Bierwirth, C., A Generalized Permutation Approach to Job Shop Scheduling with Genetic Algorithms, Department of Economics, University of Bremen, Germany

Davis, L., Job shop Scheduling with Genetic Algorithms, in Grefenstette, J. J. (Editor), Proceedings of the First International Conference on Genetic Algorithms, Lawrence Erlbaum Associates, 1985, pp. 136-140 French, S., Sequencing and Scheduling, Ellis Horwood Limited, 1982

Ghedjati, F., Genetic algorithms for the job-shop scheduling problem with unrelated parallel constraints: heuristic mixing method machines and precedence, Computers & Industrial Engineering, 1999, Vol. 37 (1), pp. 39-42

Maccarthy, B. L. and Liu, J., Addressing the gap in scheduling research: a review of optimization and heuristic methods in production scheduling. INT. J. PROD. RES., 1993, Vol. 31 (1), pp. 59-79

Michalewicz, Z., Genetic Algorithms + Data Structure = Evolution Programs, Springer-Verlag, 1994 MIT, GAlib: A C++ Genetic Algorithm Library, 1995

Muth, J. F. and Thompson, G. L., Industrial Scheduling, Prentice Hall, Englewood Cliffs, 1963, pp. 236-238

Références

Documents relatifs

Table 4 reports the size of the critical tree for five branching rules (two static rules Forward, Alternate, and three dynamic strategies MaxSum, MinMin and MinBranch) and two

We have compared the pro- posed approach (denoted as f-NSGA2-LS) against the single-objective genetic algorithm (GA) that works only on the modal value of TFNs (denoted as crisp-GA),

The simulation model corresponds to a possible organisation of a hybrid flow shop with five produc- tion stages and is briefly described in below. As input, the simulation receives

To summarize, the problem dealt with here is the minimization of the weighted number of tardy jobs in a re-entrant flow shop with precedence constraints, release

With respect to the CUDA framework, our parallel GA consists of two levels, a fine-grained GA at the lower level and an island GA at the upper level, as presented in Fig. At the

x Each anchor node is composed of two sensors ( a bar containing two microphones), installed in such a manner that the bars of the different adjacent anchors are

commandes de pharmacie. Ceci représente bien sûr un soulagement pour les IDE qui jugent bien souvent cette activité fastidieuse à réaliser. Malheureusement, le gain de temps lié

The pro- posed methodology relies on a simple indirect binary representation of the chro- mosome and simple genetic operators (one-point crossover and bit-flip muta- tion),