jobshop scheduling We have a set of resources a set of jobs a job - - PowerPoint PPT Presentation

jobshop scheduling we have
SMART_READER_LITE
LIVE PREVIEW

jobshop scheduling We have a set of resources a set of jobs a job - - PowerPoint PPT Presentation

jobshop scheduling We have a set of resources a set of jobs a job is a sequence of operations/activities sequence the activities on the resources An example: 3 x 4 Op1.2 job1 Op1.1 Op1.1 Op1.3 Op1.4 job2 Op2.1 Op2.3 Op2.4


slide-1
SLIDE 1

jobshop scheduling

slide-2
SLIDE 2

We have

  • a set of resources
  • a set of jobs
  • a job is a sequence of operations/activities
  • sequence the activities on the resources
slide-3
SLIDE 3

An example: 3 x 4

  • We have 4 resources: green, yellow, red and blue
  • a job is a sequence of operations (precedence constraints)
  • each operation is executed on a resource (resource constraints)
  • each resource can do one operation at a time
  • the duration of an operation is the length of its box
  • we have a due date, giving time windows for operations (time constraints)

Op1.1 Op1.2 Op1.3 Op1.4 Op1.1 Op2.1 Op2.2 Op2.3 Op2.4 Op3.1 Op3.2 Op3.3 Op3.4 job1 job2 job3

slide-4
SLIDE 4

Op1.1 Op1.2 Op1.3 Op1.4 Op1.1 Op2.1 Op2.2 Op2.3 Op2.4 Op3.1 Op3.2 Op3.3 Op3.4 An example: 3 x 4 Op1.1 Op2.3 Op3.1 Op1.4 Op2.4 Op3.2 Op1.2 Op2.1 Op3.4 Op1.3 Op2.2 Op3.3

slide-5
SLIDE 5

The problem Assign a start time to each operation such that (a) no two operations are in process on the same machine at the same time and (b) temporal constraints are respected The problem is NP complete

slide-6
SLIDE 6

The problem Alternatively … sequence operations on resources This gives a set of solutions, and might be considered a “least commitment approach”

slide-7
SLIDE 7

Op1.1 Op1.2 Op1.3 Op1.4 Op1.1 Op2.1 Op2.2 Op2.3 Op2.4 Op3.1 Op3.2 Op3.3 Op3.4 An example: 3 x 4 Op1.1 Op2.3 Op3.1 On the “green” resource, put a direction on the arrows A disjunctive graph

slide-8
SLIDE 8

Op1.1 Op1.2 Op1.3 Op1.4 Op1.1 Op2.1 Op2.2 Op2.3 Op2.4 Op3.1 Op3.2 Op3.3 Op3.4 An example: 3 x 4 Op1.1 Op2.3 Op3.1 On the “green” resource, put a direction on the arrows A disjunctive graph We do not bind operations to start times We take a least commitment approach Consequently we get a set of solutions!

slide-9
SLIDE 9

7 6 2 1 3 1 6 3 7 5 3 4 6 1 8 2 5 4 1 5 1 1 3 4 2 5 3 4 5 8 9 1 1 4 7 1 5 5 2 5 3 3 4 8 5 9 2 9 1 3 4 5 5 4 3 3 1 1 3 3 3 5 9 1 4 4 2 1 2 4 4 4 2 3 7 5 2 1 3 / / / / a 7 b y 6 j

  • b

s h

  • p

p r

  • b

l e m / / e a c h r

  • w

( t h e r e a r e 7 ) i s a j

  • b

/ / e a c h j

  • b

h a s 6

  • p

e r a t i

  • n

s ( a m a c h i n e / d u r a t i

  • n

p a i r ) / / e a c h

  • p

e r a t i

  • n

r e q u i r e s / /

  • a

m a c h i n e ( t

  • 5

) / /

  • a

d u r a t i

  • n
  • n

t h a t m a c h i n e ( 1 t

  • 1

) / / / / T h e p r

  • b

l e m i s t

  • f

i n d t h e s h

  • r

t e s t m a k e s p a n / / w e r e m a k e s p a n i s t h e t i m e r e q u i r e d t

  • c
  • m

p l e t e a l l j

  • b

s . / / / / m i n i m u m m a k e s p a n i s 5 7

7x6 What is makespan!

slide-10
SLIDE 10

1 1 4 1 8 7 2 1 9 4 1 2 4 5 3 3 8 8 5 5 8 4 6 2 9 1 2 3 8 2 8 5 7 5 1 6 1 5 2 7 7 4 2 3 8 3 5 4 6 6 2 9 3 7 4 5 4 5 2 2 3 4 7 9 3 6 8 1 6 1 8 1 1 6 8 9 7 8 9 8 1 9 8 1 5 5 7 9 1 8 8 3 3 3 7 5 5 5 2 2 2 4 3 2 6 8 4 1 6 6 9 2 4 9 4 7 4 1 9 8 7 6 8 3 2 6 4 5 5 6 3 5 4 7 8 1 3 9 3 9 1 2 6 4 5 4 6 3 7 9 8 4 7 4 8 6 1 1 6 6 4 2 9 1 5 1 8 7 3 9 8 2 4 3 7 5 4 7 5 5 6 6 4 4 2 6 2 8 7 9 2 2 1 1 5 7 4 3 2 2 1 2 8 2 6 6 6 1 3 7 9 9 2 2 5 8 4 8 2 6 2 3 9 6 4 2 2 9 5 6 3 6 3 3 7 1 8 1 8 1 3 6 5 4 1 9 6 8 9 5 6 4 3 9 5 9 2 3 7 1 8 8 1 5 2 6 4 6 3 8 4 8 L a w r e n c e 1 x 1 i n s t a n c e ( T a b l e 6 , i n s t a n c e 2 ) ;

For a long time, unsolved

slide-11
SLIDE 11

Why bother?

  • Minimise makespan
  • what is makespan?
  • Maximise start
  • JIT, minimise inventory levels
  • minimise idle time on resources
  • maximise ROI
  • ...
slide-12
SLIDE 12

Op1.1 Op1.2 Op1.3 Op1.4 Op1.1 Op2.1 Op2.2 Op2.3 Op2.4 Op3.1 Op3.2 Op3.3 Op3.4 start end Find the smallest value for end minimise makespan

slide-13
SLIDE 13

How can we view this as a csp? Each operation is a variable domain is set of start times there are precedence constraints between operation in a job

  • perations on a resource have disjunctive constraints

Op1.1 Op1.2 Op1.3 Op1.4 Op1.1 Op2.1 Op2.2 Op2.3 Op2.4 Op3.1 Op3.2 Op3.3 Op3.4 start end

slide-14
SLIDE 14
slide-15
SLIDE 15
slide-16
SLIDE 16

What is the complexity of this problem?

  • Assume we have m resources and n jobs
  • on each resource we will have n operations
  • we can order these in n! ways
  • therefore we have O(n!m) states to explore

Complexity

) ! (

m

n O

slide-17
SLIDE 17

But we want to optimise, not satisfy How do you optimise with CP? A sequence of decision problems

  • Is there a solution with makespan 395?
  • Yip!
  • Is there a solution with makespan 300?
  • Let me think about that ...
  • Yes
  • Is there a solution with makespan 299?
  • Hold on, … , hold on
  • NO!
  • Minimum makespan is 300.
slide-18
SLIDE 18

When optimising, via a sequence of decision problems, will all decisions be equally difficult to answer? What does branch and bound (BnB) do ?

slide-19
SLIDE 19

Who cares about jobshop scheduling? Manufacturing inc.

slide-20
SLIDE 20

Variants of jsp

  • openness:
  • variety of resources can perform an operation
  • processing time dependant on resource used
  • set up costs, between jobs (transition cost)
  • consumable resources
  • such as gas, oil, etc
  • pre-emption
  • can stop and restart an operation
  • resource can perform multiple operations simultaneously
  • batch processing
  • secondary resources
  • people, tools, cranes, etc
  • etc

Chris Beck (2006) “The jssp has never been spotted in the wild.”

slide-21
SLIDE 21

Why might CP be technology of choice for scheduling?

  • can model rich real-world problems
  • addition of side constraints etc
  • incorporate domain knowledge
  • in the form of variable and value ordering heuristics
  • powerful reasoning/inference allied to novel search techniques

We can get a solution up and running quickly

slide-22
SLIDE 22
slide-23
SLIDE 23

Operation

slide-24
SLIDE 24

Operation

slide-25
SLIDE 25

Operation Operation has

  • a duration
  • a scheduled start time
  • is on a resource
slide-26
SLIDE 26

Operation

slide-27
SLIDE 27

Operation

slide-28
SLIDE 28

Operation see next slides

slide-29
SLIDE 29
  • p1.before(op2)

earliest start latest end duration Picture of an operation

slide-30
SLIDE 30
  • p1.before(op2)

earliest start latest start duration Picture of an operation Constrained integer variable represents start time

slide-31
SLIDE 31
  • p1.before(op2)

Picture of an operation

  • p1
  • p2
  • p1.before(op2)
  • p1.start() + op1.duration() ≤ op2.start()
slide-32
SLIDE 32
  • p1.before(op2)

Picture of an operation

  • p1
  • p2
  • p1.before(op2)
  • p1.start() + op1.duration() ≤ op2.start()

propagate Update earliest start of operation op2

slide-33
SLIDE 33
  • p1.before(op2)

Picture of an operation

  • p1
  • p2
  • p1.before(op2)
  • p1.start() + op1.duration() ≤ op2.start()

propagate Update latest start of operation op1 No effect on this instance

slide-34
SLIDE 34
  • p1.before(op2)

Picture of an operation

  • p1
  • p2
  • p1.before(op2) OR op2.before(op1)
  • p1 and op2 cannot be in process at same time

Not easy to propagate until decision made (disjunction broken)

slide-35
SLIDE 35
slide-36
SLIDE 36
slide-37
SLIDE 37

Operation Test

slide-38
SLIDE 38

Operation Test

slide-39
SLIDE 39

Job

slide-40
SLIDE 40

Job

slide-41
SLIDE 41

Job Job is a sequence of operations

slide-42
SLIDE 42

Job Creating/building a job as a sequence of

  • perations each one before the other
slide-43
SLIDE 43

Decision

slide-44
SLIDE 44
  • p1.before(op2)

Picture of an operation

  • p1
  • p2

d[i][j] = 0  op[i]1.before(op[j]) Use a 0/1 decision variable d[i][j] as follows d[i][j] = 1  op[j]1.before(op[i])

slide-45
SLIDE 45
  • p1.before(op2)

Picture of an operation

  • p1
  • p2

d[i][j] = 0  op[i]1.before(op[j])

  • p1 before op2
slide-46
SLIDE 46
  • p1.before(op2)

Picture of an operation

  • p1
  • p2

d[i][j] = 0  op[i]1.before(op[j])

  • p1 before op2
slide-47
SLIDE 47
  • p1.before(op2)

Picture of an operation

  • p1
  • p2

d[i][j] = 1  op[j]1.before(op[i])

  • p2 before op1
slide-48
SLIDE 48
  • p1.before(op2)

Picture of an operation

  • p1
  • p2

d[i][j] = 1  op[j]1.before(op[i])

  • p2 before op1
slide-49
SLIDE 49

Decision

slide-50
SLIDE 50

Decision A decision is essentially a triple:

  • a zero/one variable (this)
  • an operation op_i
  • an operation op_j

Value decides relative order of the two operations (before or after)

slide-51
SLIDE 51

Resource

slide-52
SLIDE 52

Resource

slide-53
SLIDE 53

Resource Resource is a collection of operations and decisions that will be made on their ordering/sequencing on this resource

slide-54
SLIDE 54

Resource Add an operation to a resource and then constrain it …

slide-55
SLIDE 55

Resource

decision = 0 implies op_i before op decision = 1 implies op before op_i

slide-56
SLIDE 56

JSSP

slide-57
SLIDE 57

JSSP

slide-58
SLIDE 58

JSSP Ouch!

slide-59
SLIDE 59

JSSP A jssp is a collection of jobs and resources

slide-60
SLIDE 60

JSSP

slide-61
SLIDE 61

JSSP

slide-62
SLIDE 62

JSSP

slide-63
SLIDE 63

JSSP

slide-64
SLIDE 64

JSSP

slide-65
SLIDE 65

JSSP

slide-66
SLIDE 66

JSSP

slide-67
SLIDE 67

JSSP

slide-68
SLIDE 68

DecisionProblem

slide-69
SLIDE 69

DecisionProblem

slide-70
SLIDE 70

Optimize

slide-71
SLIDE 71

Wot!? No heuristics!?!!!