application of nature inspired genetic algorithms for job shop scheduling bhuvan sharma research...

27
Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision Making Group University West of England, Bristol, UK [email protected] School of Computer Science University of Birmingham

Upload: madalyn-doggett

Post on 14-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

Application of Nature Inspired Genetic Algorithms For

Job Shop Scheduling

Bhuvan Sharma

Research AssociateAdvanced Computation in Design and Decision Making Group

University West of England, Bristol, [email protected]

School of Computer Science

University of Birmingham

Page 2: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

2

Aim of Presentation

Understanding job shop scheduling

Why Nature Inspired Algorithms

Issues in GA, when applied to job shop problems

Review of various approaches within GA

Practical Problem from Rolls Royce

My approach

Page 3: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

3

Job Shop Scheduling

Job : A piece of work that goes through series of

operations.

Shop : A place for manufacturing or repairing of

goods or machinery.

Scheduling : Decision process aiming to deduce the

order of processing.

Page 4: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

4

A typical Job Shop Problem

Objectives Minimization of make span

Minimization of cost

Minimization of delays

Parameters Number of jobs

Number of operations within each job

Processing time of each operation within each job

Machining sequence of operations within each job

Page 5: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

5

A 3 job 3 machine problem

J1 M1 M2 M3

J2 M1 M3 M2

J3 M3 M2 M1

Machining Sequence

Jobs Operations

Processing time

Jobs Operations

J1 6 5 3

J2 4 3 4

J3 10 5 2

Page 6: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

6

Why Nature Inspired Algorithms

• Evaluation on a set of points. Better search.

• Better chances for global optimal solution.

• Suitable for Multi-objective optimisation.

• Flexibility, because constraints can be taken care of.

• Evaluation on a point each time.

• Often terminate into local optima.

• Not suited for multi-objective optimisation.

• Not flexible, driven by heuristics, constraints not handled easily.

GA’s vs Other methods

Page 7: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

7

Issues in Genetic Algorithms when applied to job shop problems

Representation of schedule(phenotype) by suitable genotype.

Conversion of genotype to phenotype

Choice of Schedule Builder

Type of Crossover and Mutation to be used

Avoiding Premature convergence.

Page 8: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

8

Schedule Builder!! What’s That

J1 M1 M2 M3

J2 M1 M3 M2

J3 M3 M2 M1

J1 6 5 3

J2 4 3 4

J3 10 5 2

Page 9: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

9

Representation schemes for schedules in job shop

Conventional Binary representation

Job Based Representation

Permutation Representation (Partitioned)

Permutation Representation (Repetitive)

Priority Rule Based Representation (Random /

guided)

Page 10: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

10

1. Binary Representation

Genotype is binary matrix of

Rows = Number of job pairs

Columns = Number of machines

Interpretation

Mij = 0 / 1 depending on whether job1

is executed later or prior to job2.

Page 11: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

11

Job 1 M1 M3 M2

Job 2 M2 M3 M1

Job 3 M2 M1 M3

Job1 & 2 1 1 0

Job1 & 3 1 1 0

Job2 & 3 0 1 0

(b) Binary Representation

(a) Machine Sequence

M/c 1 J1 J3 J2

M/c 2 J3 J2 J1

M/c 3 J1 J2 J3

(c) Symbolic Representation

Page 12: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

12

Crossover

The crossover applied is simple one point

crossover.

Demerits

Redundancy in representation.

2mj(j-1)/2 bits are required for (!j)m schedules.

Forcing techniques required for replacement of

illegal schedules.

Page 13: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

13

2. Job Based Representation Typical chromosome [ Ji Jj Jk ]

For [ J2 J1 J3 ]

All operations of job 2 folllowed by 1 and then by 3 are scheduled in the available processing times.

Page 14: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

14

Demerits

Approach is very constrained

Not many possibilities are explored

Merits

Scheduling is very easy

Always yields a feasible schedule, hence forcing

not required.

Page 15: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

15

3. Permutation Representation (Partitioned)

Chromosome is set of permutation of jobs on

each machine. M1 M2 M3

1 3 2 3 2 1 3 1 2

Cross Over (SXX) Subsequence Exchange Crossover

Searches for exchangeable subsequence pairs

in parents, and swaps them.

Job sequence matrix for 3 X 3 problem

Page 16: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

16

Subsequence Exchange Crossover

M1 M2 M3

P0 1 2 3 6 4 5 3 2 1 5 6 4 2 3 5 6 1 4

P1 6 2 1 3 4 5 3 2 6 4 5 1 6 3 5 4 2 1

C0 2 1 3 4 6 5 3 2 5 1 6 4 2 6 3 5 1 4

C1 6 1 2 3 4 5 3 2 6 4 1 5 3 5 6 4 2 1

Page 17: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

Merits

Demerits

GA operators used for TSP can be applied here

Simple representation

Does not always give active schedules

Robust Schedule builder is required

SXX does not always guarantee a crossover

Page 18: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

18

4. Permutation Representation (Repetitive) Also known as operation based representation

Typical genotype is a unpartitioned permutation

with m repetitions for each job.

1 2 2 3 1 3 2 1 3

M1 1 3 2

M2 2 3 1

M3 2 1 3

Page 19: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

19

Crossover (PPX)

Precedence Preservation Crossover (PPX)

The offspring inherits partial characteristic

of both parents

P0 3 2 2 3 1 1 3 1 2

0 1 1 1 0 0 1 0 1

P1 2 3 3 2 1 3 1 1 2

C1 3 2 3 2 1 1 3 1 2

Page 20: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

20

Merits Very simple representation

All decoding leads to active schedules

Schedule building is straightforward

Crossover results in passing of characteristics from

both parents in most cases.

Demerits

Problem of Premature convergence

This is often case with long chromosomes

Page 21: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

21

5. Priority(Random/Guided)Rule Based Representation

Characteristics Use of GT Algorithm, with one of priority rule

used in ith iteration to select ith operation

Priority rules could be assigned randomly, or

guided by heuristics.

Representation [ SPT, LPT, MTPT, LTPT, MLFT, ….. ]

Page 22: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

22

Crossover

Both PPX and SXX can be used

Merits

Always give feasible active schedules

Incorporates heuristics to an extent

Demerits Problem of fast, premature convergence of

first few genes in the chromosome

Page 23: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

23

Practical Problem from Rolls Royce

Parameters 17 batches of jobs

10 operations per job

4 identical machines, each can perform any

operation subject to tool set

Constraints Only one tool-set for each operation

Opn. 2 must not begin until opn 1 is complete

Opn 3-9 can be performed in any sequence

Opn 10 should be the last for each batch of job

Page 24: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

24

Basic Scenario

Operation Time (min)

1 120

2 288

Leave Shop 24hrs

3 180

4 90

5 288

6 120

7 60

8 60

9 90

Leave Shop 24 hrs

10 60

Page 25: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

25

My Approach

Representation

Permutation based

The catch here is that it is permutation of machines

not jobs

For eg. [ 3 5 9 6 : 7 4 8 | 10 ]

Crossover Precedence Preservation Crossover (PPX)

Page 26: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

26

Start with heuristics

Schedule builder

Identify conflicting set of jobs

Selection of one from conflicting set based on

one of heuristic priority rules

Change toolset for machine as it finishes requisite

jobs. Change is guided by time factor.

Select a set of jobs out of 17 to process first. (random)

Page 27: Application of Nature Inspired Genetic Algorithms For Job Shop Scheduling Bhuvan Sharma Research Associate Advanced Computation in Design and Decision

27