Petri Nets – Lecture 2 - CAPSL Research Laboratories

66
Petri Nets – Lecture 2 Chen Chen Oct. 2 nd , 2011 2011/10/5 \course\867-11F\Topic-A.ppt 1

Transcript of Petri Nets – Lecture 2 - CAPSL Research Laboratories

Page 1: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Petri Nets – Lecture 2

Chen ChenOct. 2nd, 2011

2011/10/5 \course\867-11F\Topic-A.ppt 1

Page 2: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Outline

• Sub-class of Petri Nets• Timed Petri Nets

2011/10/5 \course\867-11F\Topic-A.ppt 2

Page 3: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Liveness and Safeness Problem

2011/10/5 \course\867-11F\Topic-A.ppt 3

p1 p2

Deadlock

t

Not safe

t1 t2p

Page 4: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Sub-class of Petri Nets

2011/10/5 \course\867-11F\Topic-A.ppt 4

MarkedGraph

StateMachine

Free-choice Petri Nets

Simple Petri Nets

Petri Nets

Page 5: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Summary of Complexity Results for Petri Nets

Petri Net classes Reachability Liveness DeadlockArbitrary decidable

EXPSPACE-harddecidable EXPSPACE-hard

decidable EXPSPACE-hard

1-safe PSPACE-complete PSPACE-complete PSPACE-complete

Acyclic NP-complete linear time linear time

1-safe acyclic NP-complete constant time constant time

Conflict-free NP-complete polynomial time polynomial time

1-safe conflict-free polynomial time polynomial time polynomial time

Free-choice decidable EXPSPACE-hard

NP-complete NP-complete

1-safe free-choice PSPACE-complete polynomial time polynomial time

2011/10/5 \course\867-11F\Topic-A.ppt 5

— Allan Cheng, Javier Esparza, and Jens Palsberg. 1995. Complexity results for 1-safe nets. Theor. Comput. Sci. 147, 1-2 (August 1995), 117-136.

Page 6: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Relation Among Complexity Classes

2011/10/5 \course\867-11F\Topic-A.ppt 6

NL

PNP

PSPACE

EXPTIME

EXPSPACE

EXPSPACE Space 2poly(n)

EXPTIME Time 2poly(n)

PSPACE Space poly(n)

NP Time poly(n)Non-deterministicTuring machine

P Time poly(n)

NL Space O(log n)Non-deterministicTuring machine

From Wikipedia

NP-Complete

E.g. Livenessof normal PN

Page 7: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Example of Marked Graph

2011/10/5 \course\867-11F\Topic-A.ppt 7

• 3 users try to repeatedly access the same CS• Only one user can access CS each time

Critical Section

3 tokens = 3 users 1 token = lock

t2

p2

p3

p1

t1Marked Graph

Each place has one input arc.Each place has one output arc.

Page 8: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Relation Between Marked Graph and Dataflow

2011/10/5 \course\867-11F\Topic-A.ppt 8

Critical Section

3 tokens = 3 users

1 token = lock

t2

p2

p4

p1

t1

t3

p3

Entr.

CS

Exit

Marked GraphDataflow (extended)

Multiple tokens per arc

??

Page 9: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Features of Marked Graph

• Each place has one input arc and one output arc

• Polynomial time to decide liveness and safeness problemsThere exists a live and safe marking iff the marked

graph is strongly connected [Murata80]• Can be converted to dataflow graph and vice

versa in particular conditions

2011/10/5 \course\867-11F\Topic-A.ppt 9

[Murata80] Murata, T.; Koh, J.; , "Reduction and expansion of live and safe marked graphs," Circuits and Systems, IEEE Transactions on , vol.27, no.1, pp. 68- 71, Jan 1980

Page 10: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Outline

• Sub-class of Petri Nets• Timed Petri Nets

2011/10/5 \course\867-11F\Topic-A.ppt 10

Page 11: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Example: Production Line

2011/10/5 \course\867-11F\Topic-A.ppt 11

Robot Arm(R1)

Robot Arm(R2)

Machine(M1)

Machine(M2)

Conveyor(C1)

Conveyor(C2)

3 slots (raw materials)

2 slots (empty)

1 sec load from C11 sec unload to C2

1 sec load from C21 sec unload to final

Output of final products

10 sec process 16 sec process

Page 12: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Example: Production Line

2011/10/5 \course\867-11F\Topic-A.ppt 12

Robot Arm(R1)

Robot Arm(R2)

Machine(M1)

Machine(M2)

Conveyor(C1)

Conveyor(C2)

3 slots (raw materials)

2 slots (empty)

4 sec load from C14 sec unload to C2

1 sec load from C21 sec unload to final

Output of final products

10 sec process 16 sec process

Question: What’s the bottleneck of the production line?

Page 13: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem

• Each component works in eager mode• Figure out bottleneck with timed Petri Net

modelingThe problem can be efficiently solved if the

timed Petri Net is a timed Marked Graph

2011/10/5 \course\867-11F\Topic-A.ppt 13

Page 14: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 14

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Page 15: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Definition of Timed Petri Nets (Self-reading)

2011/10/5 \course\867-11F\Topic-A.ppt 15

Page 16: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 16

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

InitialMarkingTime = 0

Page 17: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 17

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 0Firing of t1 is initiated

Page 18: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 18

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 1Firing of t1 is terminated

Page 19: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 19

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 1Firing of t2 is initiated (will be done at 11)

Page 20: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 20

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 11Firing of t2 is terminated

Page 21: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 21

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 11Firing of t3 is initiated

Page 22: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 22

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 12Firing of t3 is terminated

Page 23: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 23

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 12Firing of t1 is initiatedFiring of t4 is initiated

Page 24: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 24

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 13Firing of t1 is terminatedFiring of t4 is terminated

Page 25: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 25

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 13Firing of t2 is initiatedFiring of t5 is initiated (will be done at 29)

Page 26: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 26

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 23Firing of t2 is terminatedFiring of t5 is executing (will be done at 29)

Page 27: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 27

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 23Firing of t3 is initiatedFiring of t5 is executing (will be done at 29)

Page 28: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 28

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 24Firing of t3 is terminatedFiring of t5 is executing (will be done at 29)

Page 29: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 29

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 24Firing of t1 is initiatedFiring of t5 is executing (will be done at 29)

Page 30: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 30

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 25Firing of t1 is terminatedFiring of t5 is executing (will be done at 29)

Page 31: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 31

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 25Firing of t2 is initiated (will be done at 35)Firing of t5 is executing (will be done at 29)

Page 32: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 32

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 29Firing of t2 is executing (will be done at 35)Firing of t5 is terminated

Page 33: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 33

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 29Firing of t2 is executing (will be done at 35)Firing of t6 is initiated

Page 34: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 34

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 30Firing of t2 is executing (will be done at 35)Firing of t6 is terminated

Page 35: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 35

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 30Firing of t2 is executing (will be done at 35)Firing of t4 is initiated

Page 36: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 36

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 31Firing of t2 is executing (will be done at 35)Firing of t4 is terminated

Page 37: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 37

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 31Firing of t2 is executing (will be done at 35)Firing of t5 is initiated (will be done at 47)

Page 38: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 38

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 35Firing of t2 is terminatedFiring of t5 is executing (will be done at 47)

Page 39: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 39

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 35Firing of t3 is initiatedFiring of t5 is executing (will be done at 47)

Page 40: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 40

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 36Firing of t3 is terminatedFiring of t5 is executing (will be done at 47)

Page 41: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 41

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 36Firing of t1 is initiatedFiring of t5 is executing (will be done at 47)

Page 42: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 42

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 37Firing of t1 is terminatedFiring of t5 is executing (will be done at 47)

Page 43: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 43

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 37Firing of t2 is initiated (will be done at 47)Firing of t5 is executing (will be done at 47)

Page 44: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 44

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 47Firing of t2 is terminated Firing of t5 is terminated

Page 45: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 45

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 47Firing of t3 is initiatedFiring of t6 is initiated

Page 46: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 46

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 48Firing of t3 is terminatedFiring of t6 is terminated

Page 47: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 47

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 48Firing of t3 is terminatedFiring of t6 is terminated

Page 48: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 48

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 48Firing of t3 is terminatedFiring of t6 is terminated

Page 49: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 49

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 48Firing of t1 is initiatedFiring of t4 is initiated

Page 50: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 50

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 49Firing of t1 is terminatedFiring of t4 is terminated

Page 51: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 51

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 49Firing of t2 is initiated (will be done at 59)Firing of t5 is initiated (will be done at 65)

Page 52: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 52

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 59Firing of t2 is terminatedFiring of t5 is initiated (will be done at 65)

Page 53: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 53

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 59Firing of t3 is initiatedFiring of t5 is initiated (will be done at 65)

Page 54: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 54

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 60Firing of t3 is terminatedFiring of t5 is initiated (will be done at 65)

Page 55: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 55

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 65Firing of t5 is terminated

Page 56: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 56

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 65Firing of t6 is initiated

Page 57: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 57

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 66Firing of t6 is terminated

Page 58: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Solution of Production Line Problem (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 58

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

Time = 66Firing of t6 is terminated

Same marking as time = 48Go to time = 48

Page 59: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Process Pattern

2011/10/5 \course\867-11F\Topic-A.ppt 59

0

Starting of process

48 66 84

Starting of stable cycle

Starting of 2nd cycle

Starting of 3rd cycle

Time (sec)

Minimum Cycle Time = 18

18 seconds per product

Page 60: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Minimum Cycle Time

• If the Timed PN is a strongly connected Timed Marked Graph

• Min Cycle Time = max {Di / Ni}• i indicates the i-th simple loop. Di = total delay time in the i-th loop Ni = # of tokens in the i-th loop

2011/10/5 \course\867-11F\Topic-A.ppt 60

Page 61: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Figure Out Bottleneck

2011/10/5 \course\867-11F\Topic-A.ppt 61

C1

C2R1 R2

M1 M2

t1 t2

t3 t4

t5 t6

t1: R1 load from C1 (1s)t2: M1 process (10s)t3: R1 unload to C2 (1s)t4: R2 load from C2 (1s)t5: M2 process (16s)t6: R2 unload to final (1s)

loop1 (12) loop3 (1)

loop2 (12)

loop4 (18)

loop5 (18)

loop6 (10)

Page 62: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Understanding of Minimum Cycle Time

2011/10/5 \course\867-11F\Topic-A.ppt 62

t1(5s)p1

Time = 0Initial marking

Min Cycle Time = max {Di / Ni}=2.5

Correct?

Page 63: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Understanding of Minimum Cycle Time (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 63

t1(5s)

Min Cycle Time = max {Di / Ni}=2.5

p1

Time = 0Initial marking

t1(5s)p1

Time = 0Firing of t1 is initiated(twice)

t1(5s)p1

Time = 5Firing of t1 is terminated(twice)

Same marking appears every 5 seconds!!

Page 64: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Understanding of Minimum Cycle Time (cont.)

• Minimum Cycle TimeAverage time to fire the same transitionSi(m): Time when transition ti initiates its m-th

firing. O(n3) algorithm

2011/10/5 \course\867-11F\Topic-A.ppt 64

mmSC i

m

)(lim∞→

=

C. V. Ramamoorthy and G. S. Ho. 1980. Performance Evaluation of Asynchronous Concurrent Systems Using Petri Nets. IEEE Trans. Softw. Eng. 6, 5 (September 1980), 440-449.

Page 65: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Understanding of Minimum Cycle Time (cont.)

2011/10/5 \course\867-11F\Topic-A.ppt 65

t1(5s)p1

Time = 0Initial marking

t1(5s)p1

Time = 0Firing of t1 is initiated(twice)

t1(5s)p1

Time = 5Firing of t1 is terminated(twice)

t1 is fired twice per every 5 seconds

5.225)(lim 1 ===

∞→ mmSC

m

Min Cycle Time = max {Di / Ni}=2.5

Page 66: Petri Nets – Lecture 2 - CAPSL Research Laboratories

Deep Thinking

• Relation between production line problem and loop scheduling problem

• An alternative way to think about minimum cycle time Concept of “Computation Rate” The average number of firings of a transition in unit time Maximum computation rate = minimum cycle time -1

Ramchandani (1973) Ph.D thesis

2011/10/5 \course\867-11F\Topic-A.ppt 66