A Genetic Algorithm for Job Shop Scheduling with ... - Semantic Scholar

9 downloads 20 Views 175KB Size Report
School of Computer Science and Information Technology. University of ... In a job shop-scheduling problem, a set of jobs, where each job consists of a chain ..... ficiency of the load balancing algorithm GALB can be probably best proved by ob-.

A Genetic Algorithm for Job Shop Scheduling with Load Balancing Sanja Petrovic and Carole Fayad School of Computer Science and Information Technology University of Nottingham, Jubilee Campus, Wollaton Road, Nottingham NG8 1BB UK {sxp,cxf}@cs.nott.ac.uk http://www.cs.nott.ac.uk/~sxp,~cxf

Abstract. This paper deals with the load-balancing of machines in a real-world job-shop scheduling problem, with identical machines. The load-balancing algorithm allocates jobs, split into lots, on identical machines, with objectives to reduce job total throughput time and to improve machine utilization. A genetic algorithm is developed, whose fitness function evaluates the load-balancing in the generated schedule. This load-balancing algorithm is used within a multi-objective genetic algorithm, which minimizes average tardiness, number of tardy jobs, setup times, idle times of machines and throughput times of jobs. The performance of the algorithm is evaluated with real-world data and compared to the results obtained with no loadbalancing.

Keywords: job shop scheduling, fuzzy logic and fuzzy sets, genetic algorithms

1

Introduction

In a job shop-scheduling problem, a set of jobs, where each job consists of a chain of operations, has to be processed on a set of machines (Pinedo 2002). Each machine can process one operation at a time. Operations need to be processed during an uninterrupted period of a given length on a given machine. There is a good deal of research that considers different issues of theoretical or practical nature that appears in scheduling. This paper is focused on the issue of load balancing. Load-balancing is in use in many scheduling applications, but mostly in those pertinent to parallel, distributed, and network-based computer systems (Kranzlmuller, 2003). However, load balancing in shop scheduling has not been fully investigated yet. The aim is to equally spread the load on machines in such a way as to maximize machine utilization while minimizing the total job throughput time. This can be achieved by transferring jobs from heavily to lightly loaded machines so that no machines are idle while there are other jobs waiting to be processed (Zomaya & Tei 2001). Moon et al ( 2004) investigated assignment of jobs to relevant machines and allocation of machines to operators in order to minimize the unbalance of the workloads among operators. However, regardless of the nature of the application, there seems to be an ongoing interest in genetic algorithms for the implementation of load balancing (Greene, 2001). Lee (2004) developed a genetic algorithm for the load bal-

ancing in a distributed system. Wang & Fu (2002) proposed a genetic algorithm for machine load balancing in advanced manufacturing shop floor. In the research described in this paper, we investigate a complex real-world job shop scheduling problem in the printing company. In order to satisfy customer demands, the company often split jobs into lots and tries to deliver them on time. In this paper, we describe a genetic algorithm, which aims to allocate these lots to machines taking into consideration load balancing of the machines. The developed algorithm is used within the multi-objective fuzzy genetic algorithm for job shop scheduling (Fayad and Petrovic 2005), (Petrovic et al, 2005). The paper gives analysis of the benefits of using load balancing of machines in scheduling. The paper is organized as follows. In Section 2, the job shop problem is introduced together with the objectives and constraints. Section 3 illustrates the job shop scheduling algorithm, while Section 4 describes the genetic algorithm for load balancing. The real-world scheduling problem in a printing company is explained in Section 5 with experimental results obtained on real-world data, followed by conclusions in Section 6.

2

Problem Statement

The job shop scheduling problem considered in this research consists of N jobs J1,…,Jj,…,JN which have to be scheduled on a set of M machines M1,…,Mi,…,MM. Machines are grouped into W working centres W1,…,Wc,…,WN. A working centre Wc consists of identical and non-identical machines. Identical machines denote machines, which have the same characteristics. Each job is assigned a release date r j , i.e., the date when the job can start its processing and a due date d j , i.e., the date when the job is due to finish its processing. The processing of job J j on machine

M i is referred to as operation represented by an order pair (i,j), with the processing time denoted by p . Precedence constraints are imposed on the order of operation ij

processing. Operation processing times are imprecise due to machine and human factors. For example, we can estimate that the processing time of an operation is not shorter than a, not longer than c, but most likely it takes b time units. Due dates are also imprecise, allowing the scheduler to express his/her dissatisfaction with the jobs that are tardy, i.e., jobs that cannot meet their due dates. Jobs are of different types and are grouped into F families on the basis of their processing requirements. Changing of operations that belong to different families of jobs to be processed on the machine incur reconfiguration and/or cleaning of the machine which leads to setup time/cost. Batching refers to scheduling of operations that belong to the same family, one after the other, in order to minimize the setup time/cost. Very often it is not possible to meet the due date for all the jobs. In order to deliver at least part of the job to the customer, the scheduler can decide to split up the job into lots. In addition, it is allowed to overlap processing of lots of the same opera-

tion on the machines of the same work-centre, which reduces throughput time, i.e., time that the job spends on the shop floor. Each operation is allocated to a machine from the specified work-centre, before the sequencing of operations on the machine takes place. Different objectives can be used in machine allocation, for example to load mostly one machine, to balance the load of the machines, to randomly allocate the machines, etc,… The scheduling problem is formulated as the problem of generating a nonpreemptive sequence of operations of N jobs on M machines with the following objectives: (I) to minimise the average tardiness of jobs in a schedule s 1 N (1) AT (s) = ∑ w jT j n j =1

where T j = max ( C j - d j , 0) is the tardiness of job J j , C j is the completion time of job J j and w j is the importance of job J j . (II) to minimise the number of tardy jobs in schedule s N 1 if T j > 0 NT (s) = ∑ u j , where u j =  j =1 0 otherwise

(2)

(III) to minimise the total setup time in schedule s T

F

ST (s) = ∑ ∑ aX ft ,

(3)

t =1f =1

where T is a total number of periods within the planning horizon 1 if processing of the operation of the family f in period t requires setup X ft =  otherwise 0 where a is a parameter with a constant value that represents time units required for the setup. (IV) to minimise the total idle time of machines where the idle time is defined as time within the planning horizon during which the machines are used neither for processing of jobs nor for setup T F  M N  (4) IT (s) = T ⋅ M −  ∑ ∑ aX ft  −  ∑ ∑ pij   t =1 f =1   i =1 j =1  (V) to minimise the total throughput time defined as the total time that jobs spend on the shop floor N

TT (s) = ∑ (C j − s j ) ; j =1

j = 1,...., N

where s j is the time when job J j starts its processing.

(5)

3

Job Shop Scheduling Algorithm

A sequential algorithm consisting of three phases is developed for the described job shop scheduling problem. Phase 1. Lots determination: for each job a decision whether to split it up into lots is made together with the size of lots. Phase 2. Machine allocation: a machine is allocated to each operation/lot of each job. Phase 3. Sequencing of each machine: for each machine, a sequence of operations/lots allocated to it is determined. The focus of this paper is on phase 2. Phases 1 and 3 will be described briefly in the remainder of this section while the description of machine load balancing will be given in Section 4. A fuzzy if-then rule-based system was developed which decides on splitting-up of jobs and the size of each lot. Initially, lots are of the same size. Fuzzy if-then rules determine the change of the lot expressed by the linguistic variables, (Large Negative, Medium Negative, Small, Medium Positive and Large Positive) using the values of linguistic variables workload of the shop floor, size of the job, and the urgency of the job. The developed rule-based system for lot sizing is given in detail in (Petrovic et al, 2005). A fuzzy multi-objective genetic algorithm was developed for sequencing of jobs on machines, where each operation/lot has predefined machines to be operated on (Fayad & Petrovic, 2005). Imprecise processing times of operations and due dates are modeled by fuzzy sets. Satisfaction grades are introduced for each objective to reflect the decision maker preferences to the achieved values of the objectives. Values of the objectives are mapped into satisfaction grades, which take values from the interval [0, 1], where 0 represents full dissatisfaction and 1 full satisfaction with the achieved objective value. An average of the satisfaction grades of all objectives is used as the fitness function F in the developed genetic algorithm to evaluate the quality of solutions (schedules).

4

Genetic Algorithm for Load Balancing

A genetic algorithm was developed to search for machine allocations of each workcentre to lots of jobs, which balances work-loads of machines. A genetic algorithm is an iterative search procedure, which was successfully used in a variety of combinatorial optimization problems (Reeves, 1995). A genetic algorithm maintains iteratively a population of solutions, each solution being represented by a chromosome. The fitness of the solution is determined by the value of the objective function achieved by the solution. The solutions with higher fitness have better chances to survive to the next iteration called generation. The solutions are changed from iteration to iteration by applying crossover operators, which combine two chromosomes to obtain offsprings and mutation operator, which modifies a single chromosome. The main characteristics of the developed genetic algorithm are described below.

Initialisation: The algorithm which generates initial solutions distinguishes two cases: when the number of lots of a job is smaller or equal, and larger than the number of machines. In the first case, lots of a single job to be processed in the work-centre are allocated in a random order to the identical machines in such a way so that no machine processes more than one lot of the same job. In the second case, the lots are allocated to the different identical machines. When all machines are used in allocation, then for each remaining lot, the current workload of the machines are calculated and the machine of the lowest workload is chosen. Chromosome representation: Each chromosome represents allocation of lots to machines using two layers, shown in Figure 1. First layer contains job identification number and the number of lots the job is split into. The number of lots determines the number of elements in the second layer. Each element in the second layer consists of 2 parts: identification of the lot and the machine the lot is allocated to.

J1 /4 J6 /2

l11/M2

l13 / M3

l14 / M3

J1

l12 / M2

l62 / M3

l61 / M2

J6

Figure 1 sample of a two-layered chromosome in the load balancing GA

Fitness function: The quality of the allocation of the machines represented by chromosomes. It measures the dispersion of the load of machines from the average load. It is calculated as the total square differences between the workload of each machine in the work-centre and the average of load of all machines. 2

TSD = ∑ ( AWc − WLi ) Pc

c

i =1

(6)

where Pc is the number of identical machines in the work-centre Wc, AWc is the average load of the machines in this work-centre, while WLi is the workload of machine Mi in the work-centre Wc. The rational behind this definition of the fitness function is that if all the machines have the load equal or close to the average load then the machines in the work-centre are well balanced. Mutation operator: It modifies the solution, i.e., allocation of lots of randomly chosen jobs to machines. If the job is split into lots, then the mutation operator chooses randomly a point in the sub-chromosome in the second layer representing the machines and swaps the two machines across the selected point. If the job is not split into lots (i.e., number of lots is equal to 1), then the allocated machine is replaced with a randomly chosen identical machine. Crossover operator: The combination of two chromosomes produces an offspring which does not preserve the existence of all the machines from the parent chromo-

somes and it would require a complex repair. Therefore, the crossover operator is not implemented. Selection operator: A roulette-wheel-selection technique is used for selection of chromosomes to survive to the next iteration.

5

A Real-World Scheduling Problem

The developed algorithm for job shop scheduling with lots, batching and load balancing was tested on real-world data provided by a printing company Sherwood Press Ltd. There are 18 machines on the shop floor, grouped in 8 work-centres, for Printing, Cutting, Folding, Card-inserting, Embossing and Debossing, Gathering and Finishing which contains Stitching and Trimming, Packaging and Handwork. Although, all the jobs have to be processed in pre-determined work-centres, the route of processing is not the same for all of them. Each job is described by the following data: identification of the job, the processing route of the job, processing times of all the operations of the job on required machines, that is uncertain, required quantity of the items, family of the job, release date, due date, that is uncertain, and the priority of the job described by linguistic terms. The planning horizon T is in terms of minutes. In order to satisfy customers, the company splits up large jobs into lots. Setup time/cost occurs only on the printing machines when the jobs of different families, which require different colours are scheduled for printing one after the other. Therefore batching can take place only on these machines. Each work-centre has a number of machines, some of them being identical. Workcentres are listed in Table 1 together with their machines. Single machines in the work-centre and identical machines (shaded in grey in Table1) are given respectively in the upper and lower parts of the row representing the work-centre. Table 1 Work-centres and their machines Work-centre Printing Cutting Folding

Card-inserting Embossing and debossing Gathering and finishing and trimming Packaging Handwork

Non-identical machines Identical machines K3 K4 & K5 Polar1 and Polar2 H&H Folder Longford1 and Lognford2 MBO1 and MBO2 Hunkler Sanwa, Propak Platen 1 and Platen 2 Muller GST Flowrapper

Operations/lots can be allocated to machines in different ways. We run experiments using four ways of allocations:

SP: Using the Sherwood Press allocation of lots that usually loads one machine in the work-centre. Raw data are used without taking into consideration changes of machine allocation that occasionally take place on the shop floor. GALB: Using the developed genetic algorithm which performs load balancing with the described initialization GALBR: Same as GALB but using random initialization of the genetic algorithm RD: Random allocation of lots to appropriate machines

The algorithm was developed using Visual C++ and the testing was performed in a Windows XP environment on a PC Pentium 2 GHz with 512 MB of RAM. Parameters of the GA are given in Table 2. The algorithm was run 5 times and the results obtained using real-world data for one month planning horizon discretised homogeneously into one minute unit time periods, are given in Table 3. This specific month was chosen because it was considered to be rather busy with 158 jobs and a workload of 5120125 required items. Table 2. Parameters of the genetic algorithm for load balancing Population size Length of the chromosome

Mutation probability Termination condition

50 Two layers: The first layer has the number of jobs to be processed in one work-centre The second layer has the number of lots to be processed in the work-centre 0.4 500 iterations

Table 3 presents best values of the fitness function (the average satisfaction grades of all objectives) of the genetic algorithm for scheduling using 4 different ways of machines loading and the corresponding values of the satisfaction grades of the objective functions given in (1)-(5) together with the makespan Cmax which is the time when the last job finishes its processing. Table3 Performance of schedules using 4 different ways of machine loading Machine allocation methods SP (Best) SP (Average) GALB (Best) GALB (Average) GALBR (Best) GALBR (Average) RD (Best) RD (Average)

F 0.54 0.53 0.6 0.59 0.61 0.6 0.59 0.58

Cmax (minutes) 31614 31854 27150 27639 27974 28056 28718 29262

SAT

SNT

SST

SIT

STT

0.43 0.42 0.46 0.45 0.46 0.45 0.45 0.45

0.74 0.62 1 0.96 0.68 0.89 0.87 0.9

0.26 0.35 0.22 0.22 0.29 0.29 0.32 0.29

0.38 0.37 0.45 0.45 0.39 0.43 0.43 0.44

0.85 0.85 0.9 0.88 0.87 0.87 0.86 0.87

The results show that load balancing (both GALB and GALBR) does improve objectives related to tardiness (AT, NT) because jobs do not wait to be processed on a single machine, but all identical machines are used equally. In addition, idle time of machines and total throughput time of jobs are reduced by load balancing. Although the best and average values of fitness function of GALB were slightly worse than those of GALBR, it obtained better value of both objectives idle times of machines and total throughput time of jobs and produced schedules of better (shorter) makespan. Also, GALB algorithm has produced a schedule with no tardy jobs. Figure 2 and Figure 3 represent Gantt charts of the best schedule obtained by GALB and by SP respectively. Good load balancing algorithm of machines (GALB) lead to similar completion times of jobs on all machines within each work-centre. Consequently, the achieved makespan of the GALB schedule is better (27150 minutes obtained using GALB as opposed to a considerably larger makespan of 31614 minutes obtained using SP). Moreover, the conclusion can be drawn that when lots of single jobs are processed in parallel on identical machines, it leads to a better overall utility of machines as shown in Figure 4, when compared to the machine utility in Figure 5 where no load balancing has been applied. Figure 4 and Figure 5 show on average the utility of machines over the given planning horizon (in minutes), where the height of the bar shown next to the machines refers to their average load. The efficiency of the load balancing algorithm GALB can be probably best proved by observing the change in the workload of all identical machines and notably the minimization of the workload of Polar 1 and K5 (balanced by an increase in the workload of Polar 2 and K4 respectively).

Figure 2 Schedule obtained by using GALB algorithm

Figure 3 Schedule obtained by using SP algorithm

Figure 4 Average machine utility for the best solution obtained using GALB

Figure 5 Average machine utility for the best solution obtained using SP

6

Conclusion

This paper deals with the problem of load-balancing of identical machines in a job shop scheduling problem, where jobs are split into lots. A genetic algorithm was developed which allocates lots to machines, with the objective to minimize the difference between the load of each machines. This genetic algorithm generates a machine allocation, which serves as an input to the fuzzy multiobjective genetic algorithm for job shop scheduling. The objectives considered are to minimize average tardiness, number of tardy jobs, setup times, idle times of machines and throughput times of jobs. The performance of the algorithm is evaluated with numerical experiments provided by the printing company. The experiments prove that the load balancing improves the relevant objectives, namely the objectives related to tardiness, better utilization of the machines and better throughput of the jobs.

Acknowledgments The authors would like to thank the Engineering and Physics Science Research Council (EPSRC), UK, Grant No. GR/R95319/01 for supporting this research. We also acknowledge the support of our industrial collaborator Sherwood Press Ltd, Nottingham, and Martin Geiger for supplying the software for the visualization of the schedule.

References Fayad, C. and Petrovic, S., “A Genetic Algorithm for Real-World Job Shop Scheduling”, to appear in the Springer Verlag, Lecture Notes in Artificial Intelligence: IEA/AIE 2005, LNAI3533: the 18th International Conference on Industrial and Engineering Applications of Artificial Intelligence and Expert Systems, 22-25 June, Bari, Italy (2005). Greene, W, “Dynamic Load-Balancing via a Genetic Algorithm,” 13th IEEE International Conference on Tools with Artificial Intelligence (ICTAI’01), Dallas, US, (2001) 121-129. Kranzlmuller, D., ‘Scheduling and Load Balancing,’ Fifth International Conference on Parallel Processing and Applied Mathematics, Czestochowa, Poland, LNCS-3019, Springer Verlag, (2003), Lee, S. and Lee, D., (2004) “GA based adaptive load balancing approach for a distributed system“, in Zhang, J. and HeJ-H; FuY. (Eds), Computational and Information Science, Kralov, Poland, LNCS 3314, Springer-Verlag, (2004) 182-7. Moon, D.H., Kim, D.K. and Jung J.Y., An Operator Load-Balancing problem in a SemiAutomatic Parallel Machine Shop, Computers & Industrial Engineering 46 (2004) 355-362. Petrovic S., Fayad C. and Petrovic D., "Job Shop Scheduling with Lot-Sizing and Batching in an Uncertain Real-Wold Environment," to appear in MISTA 2005: The 2ND Multidisciplinary Conference on Scheduling: Theory and Applications, 18-21 July, NY, USA (2005). Pinedo, M., Scheduling Theory, Algorithms, and Systems, Prentice Hall, Second Edition, (2002). Ponnambalam, S.G. and Reddy, M., “A GA-SA Multiobjective Hybrid Search Algorithm for Integrating and Sequencing in Flow-Line Scheduling”, International Journal of Advanced manufacturing technology, 21 (2003) 126-137. Reeves, C., Genetic Algorithms and Combinatorial Optimisation: Applications of Modern Heuristic Techniques, In V.J. Rayward-Smith (Eds), Alfred Waller Ltd, Henley-on-Thames, UK (2005). Zomaya, A. and Teh, Y.H., Observations on Using Genetic Algorithms for Dynamic LoadBalancing, IEEE Transactions on Parallel and Distributed Systems, 12 9 (2001) 899-911. Wang, T and Fu Y., “Application of An Improved Genetic Algorithm for Shop Floor Scheduling,“ Computer Integrated Manufacturing Systems, 8 5 (2002) 392-420. Karapapilidis N., Pappis C. and Adamopoulos G., “Fuzzy Set Approaches to Lot Sizing”, in Slowinski R. and Hapke M. (Eds), Scheduling Under Fuzziness, Physica-Verlag, Heidelberg, (2000) 291-304. Yang, H.H. and Wu, Z.M., “Research on the capacitated lot sizing problem with fuzzy demands”, Shanghai Jiaotong Daxue Xuebao, 36 8 (2002) 1121-6. Giri, B.C. and Moon, I., “Accounting for Idle Capacity Cost in the Scheduling of Economic Lot Sizes”, International Journal of Production Research, 42 2 (2004) 677-691.

Suggest Documents