Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 1 Petri nets for Process Planning What is a Petri net ? Calculating with Petri nets: the reachability graph Petri nets for process planning Optimising routings with Petri nets
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 2 Petri nets for Process Planning What is a Petri net ? Component CComponent AComponent B Assembly A+B C
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 3 Petri nets for Process Planning How do we model it with Petri nets ? Model manufacturing states Model output buffers & more Model input buffers & more Model manufacturing actions Component B p2 Component A p1 Assembly A+B->C t1 Component C p3 State before assembly State after assembly
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 4 Petri nets for Process Planning What are the constructing elements of a Petri net ? Place Token Arc Transition Enabling Firing-1 Input placeOutput place Arc weight 1 2 Firing-2
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 5 Petri nets for Process Planning Questions : Assembly A+B->C t1 Component C p3 Component B p2 Component A p1 1.What happens if there are no tokens in one or both of the two places p1 and p2 ? 2.What is the meaning of the number of tokens in place p3 ? 3.Can you see the difference between the two states of the Petri net above, before and after the assembly operation? 4.Can you, from your observation, derive a definition for the “state” of a Petri net?
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 6 Petri nets for Process Planning Petri net definitions A Petri net is a four-tuple: P is a finite non-empty set of n=|P| places T is a finite non-empty set of m=|T| transitions where: is the the pre-incidence or input function is the the post-incidence or output function i.e. places and transitions are disjoint sets
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 7 Petri nets for Process Planning Petri net definitions (cont. 1) There is an arc from place p i to transition t j iff There is an arc from transition t k to place p i iff Arc weight: {
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 8 Petri nets for Process Planning A simple Petri net t1 p1p2p3 p4 p P = (p1, p2, p3, p4, p5) T = (t1) I(p1, t1) = 3 I(p2, t1) = 1 I(p3, t1) = 2 O(t1, p4) = 2 O(t1, p5) = 1
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 9 Petri nets for Process Planning Marking t1 p1p2p3 p4 p M(p) : number of tokens at a place p local state of the place ex. : M(p3) = 2 Marking M : vector n = |P| (the state vector) p th component of n = M(p) p1p2p3p4p5 M 40121
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 10 Petri nets for Process Planning Marked Petri net t p1p2p3 p4 p Initial marking N = A Petri net with initial marking i.e. some tokens in some places
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 11 Petri nets for Process Planning You make some practice ! 1.What is the initial marking M 0 of the Petri net shown below ? 2.How many times you may fire transition t1 ? 3.What is the marking after the final firing (final marking M F )? t1 p5 p4 p3 p2 p1 Note: Numbers in places indicate number of tokens
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 12 Petri nets for Process Planning The token game more formally Enabling rule A transition t is enabled at M iff M I(t) Firing rule
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 13 Petri nets for Process Planning Petri net analysis : the reachability graph t1 p3 p2 p1 t5 t4 t3 t2 p5 p4 A Petri net … 1,0,1,0,0 1,1,0,0,00,0,1,0,1 0,0,1,1,0 0,0,0,0,0 0,1,0,0,1 0,1,0,1,0 t1 t3 t5 t4 t5 t2 t3 M0M0 M4M4 M3M3 M5M5 M2M2 M1M1 M6M6 t1 …and its RG
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 14 Petri nets for Process Planning Petri net analysis : the reachability graph construction in detail t3 t4 t1 t3 1,1,0,0,0 M2M2 p4 t1 p3 p2 p1 t5 t4 t3 t2 p5 0,0,1,0,1 M1M1 p3 t3 t1 p2 p1 t5 t4 t2 p5 p4 t5 t3 0,0,1,1,0 M4M4 p5 t1 p3 p2 p1 t5 t4 t3 t2 p4 0,1,0,0,1 M3M3 p4 t1 p3 p2 p1 t5 t4 t3 t2 p5 1,0,1,0,0 M0M0 t1 p3 p2 p1 t5 t4 t3 t2 p5 p4 t5 0,1,0,1,0 M6M6 p3 t3 t1 p2 p1 t5 t4 t2 p5 p4 0,0,0,0,0 M5M5 t1 p3 p2 p1 t5 t4 t3 t2 p5 p4 t2 t1
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 15 Petri nets for Process Planning Dublin Berlin AthensParis London Brussels Arad Geneva Basel Zürich Breadth-first search Expand shallowest unexpanded node Implementation: put successors at end of queue Lsne
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 16 Petri nets for Process Planning Breadth-first-search algorithm to compute the RG 1. Init:RG := { }toDoList := {M 0 } 2.while toDoList not { } do 3. take first element from toDoList: m 4. remove m from toDoList 5. compute transitionFireList(m) 6. foreach t in transitionFireList(m) do 7. m’ := fire(m,t) 8. if m’ not in RG 9. then 10. enter m’ in RG 11. append m’ to toDoList 12. fi 13. enter arc(m,m’) in RG 14. od 15. od
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 17 Petri nets for Process Planning Breadth-first-search algorithm to compute the RG 1)toDoList = {M 0 } RG = {M 0 } take M 0 toDoList = { } transitionFireList(M 0 ) = {t1,t3} fire(M 0,t1) = M 1 M 1 RG toDoList = {M 1 } RG = {M 0,M 1 } arc(M 0,M 1 ) = t1 fire(M 0,t3) = M 2 M 2 RG toDoList = {M 1,M 2 } RG = {M 0,M 1,M 2 } arc(M 0,M 2 ) = t3 t1t3 1,1,0,0,0 M2M2 0,0,1,0,1 M1M1 1,0,1,0,0 M0M0
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 18 Petri nets for Process Planning 0,0,1,1,0 M4M4 0,1,0,0,1 M3M3 t5 t3 Breadth-first-search algorithm to compute the RG take M 1 toDoList = {M 2 } transitionFireList(M 1 ) = {t3,t5} fire(M 1,t3) = M 3 M 3 RG toDoList = {M 2, M 3 } RG = {M 0,M 1,M 2,M 3 } arc(M 1,M 3 ) = t3 fire(M 1,t5) = M 4 M 4 RG toDoList = {M 2,M 3,M 4 } RG = {M 0,M 1,M 2,M 3,M 4 } arc(M 1,M 4 ) = t5 2)toDoList = {M 1,M 2 } RG = {M 0,M 1,M 2 } t1t3 1,1,0,0,0 M2M2 0,0,1,0,1 M1M1 1,0,1,0,0 M0M0
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 19 Petri nets for Process Planning t2 0,0,0,0,0 M5M5 t1 take M 2 toDoList = {M 3,M 4 } transitionFireList(M 2 ) = {t1,t2} fire(M 2,t1) = M 3 M 3 RG toDoList = {M 3,M 4 } RG = {M 0,M 1,M 2,M 3,M 4 } arc(M 2,M 3 ) = t1 fire(M 2,t2) = M 5 M 5 RG toDoList = {M 3,M 4,M 5 } RG = {M 0,M 1,M 2,M 3,M 4,M 5 } arc(M 2,M 5 ) = t2 Breadth-first-search algorithm to compute the RG 3)toDoList = {M 2,M 3,M 4 } RG = {M 0,M 1,M 2,M 3,M 4 } t1t3 1,1,0,0,0 M2M2 0,0,1,0,1 M1M1 t5 t3 0,0,1,1,0 M4M4 0,1,0,0,1 M3M3 1,0,1,0,0 M0M0
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 20 Petri nets for Process Planning t5 0,1,0,1,0 M6M6 Breadth-first-search algorithm to compute the RG 4)toDoList = {M 3,M 4,M 5 } RG = {M 0,M 1,M 2,M 3,M 4,M 5 } take M 3 toDoList = {M 4,M 5 } transitionFireList(M 3 ) = {t5} fire(M 3,t5) = M 6 M 6 RG toDoList = {M 4,M 5,M 6 } RG = {M 0,M 1,M 2,M 3,M 4,M 5,M 6 } arc(M 3,M 6 ) = t5 t1 t3 1,1,0,0,0 M2M2 0,0,1,0,1 M1M1 t5 t3 0,0,1,1,0 M4M4 0,1,0,0,1 M3M3 1,0,1,0,0 M0M0 0,0,0,0,0 M5M5 t2 t1
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 21 Petri nets for Process Planning t4 t3 Breadth-first-search algorithm to compute the RG 5)toDoList = {M 4,M 5,M 6 } RG = {M 0,M 1,M 2,M 3,M 4,M 5,M 6 } take M 4 toDoList = {M 5,M 6 } transitionFireList(M 4 ) = {t3,t4} fire(M 4,t3) = M 6 M 6 RG toDoList = {M 5,M 6 } RG = {M 0,M 1,M 2,M 3,M 4,M 5,M 6 } arc(M 4,M 6 ) = t3 fire(M 4,t4) = M 5 M 5 RG toDoList = {M 5,M 6 } RG = {M 0,M 1,M 2,M 3,M 4,M 5,M 6 } arc(M 4,M 5 ) = t4 t1t3 1,1,0,0,0 M2M2 0,0,1,0,1 M1M1 t5 t3 0,0,1,1,0 M4M4 0,1,0,0,1 M3M3 1,0,1,0,0 M0M0 t5 0,1,0,1,0 M6M6 0,0,0,0,0 M5M5 t2 t1
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 22 Petri nets for Process Planning Breadth-first-search algorithm to compute the RG 6)toDoList = {M 5,M 6 } RG = {M 0,M 1,M 2,M 3,M 4,M 5,M 6 } take M 5 toDoList = {M 6 } transitionFireList(M 3 ) = { } 7)toDoList = {M 6 } RG = {M 0,M 1,M 2,M 3,M 4,M 5,M 6 } take M 6 toDoList = { } transitionFireList(M 6 ) = { } t3 t4 t1t3 1,1,0,0,0 M2M2 0,0,1,0,1 M1M1 t5 t3 0,0,1,1,0 M4M4 0,1,0,0,1 M3M3 1,0,1,0,0 M0M0 t5 0,1,0,1,0 M6M6 0,0,0,0,0 M5M5 t2 t1
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 23 Petri nets for Process Planning Petri nets recall … t1 p3 p2 p1 t5 t4 t3 t2 p5 p4 A Petri net … 1,0,1,0,0 1,1,0,0,00,0,1,0,1 0,0,1,1,0 0,0,0,0,0 0,1,0,0,1 0,1,0,1,0 t1 t3 t5 t4 t5 t2 t3 M0M0 M4M4 M3M3 M5M5 M2M2 M1M1 M6M6 t1 …and its RG
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 24 Petri nets for Process Planning Petri nets for process planning 1F2F3F4F5F 1F 2F x 3F x 4F x 5F x And this is its matrix of anteriorities. This is a simple example part For simplification, consider only one finishing operation per feature.
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 25 Petri nets for Process Planning Let’s construct the process planning Petri net 1F 2F3F 4F 5F p0p0 p9p9 p8p8 p7p7 p6p6 p5p5 p4p4 p3p3 p2p2 p1p F2F3F4F5F 1F 2F x 3F x 4F x 5F x Operations Anteriorities Each operation only once One operation at a time
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 26 Petri nets for Process Planning ControlPlace (with one initial token) Constraint Places Input Places (with one initial token) Transitions (manufacturing operations) Formal definition of the process planning Petri net T1 T2T3 T4 T5 CP 4 CP 3 CP 2 CP 1 IP 5 IP 4 IP 3 IP 2 IP 1 N = [P, T, F, M 0, M F ]
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 27 Petri nets for Process Planning Process planning RG 1,1,1,1,1,1,0,0,0,0 1,0,1,1,1,1,1,1,0,0 1,0,0,1,1,1,1,0,1,01,0,1,1,0,1,0,1,0,1 1,0,1,1,0,0,0,1,0,01,0,0,0,1,1,1,0,0,11,0,0,1,0,1,0,0,1,1 1,0,0,0,0,1,0,0,0,11,0,0,1,0,0,0,0,0,0 1,0,0,0,0,0,0,0,0,0 1F 4F 2F 5F 2F4F 3F 2F 5F3F4F 5F 3F M0M0 M3M3 M8M8 M7M7 M5M5 M4M4 M6M6 M2M2 M1M1 MFMF 1F 2F3F 4F 5F p0p0 p9p9 p8p8 p7p7 p6p6 p5p5 p4p4 p3p3 p2p2 p1p Reachability Graph!
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 28 Petri nets for Process Planning 2F2F 3F3F 1F1F 4F4F 5F5F A process plan in the RG 1,1,1,1,1,1,0,0,0,0 1,0,1,1,1,1,1,1,0,0 1,0,0,1,1,1,1,0,1,01,0,1,1,0,1,0,1,0,1 1,0,1,1,0,0,0,1,0,01,0,0,0,1,1,1,0,0,11,0,0,1,0,1,0,0,1,1 1,0,0,0,0,1,0,0,0,11,0,0,1,0,0,0,0,0,0 1,0,0,0,0,0,0,0,0,0 1F 4F 2F 5F 2F4F 3F 2F 5F3F4F 5F 3F M0M0 M3M3 M8M8 M7M7 M5M5 M4M4 M6M6 M2M2 M1M1 MFMF
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 29 Petri nets for Process Planning How to consider alternative routings in production planning ? The Petri net model –establishes a network of possible routings –defers to a later stage the decision of which path to take –the choice of path may be changed after each operation Alternative routings… –as a function of available resources (machinery, tooling, etc.) –are available in the Petri net model
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 30 Petri nets for Process Planning Process planning Petri net with alternatives F 2F1 3F 4F 5F p0p0 p9p9 p8p8 p7p7 p6p6 p5p5 p4p4 p3p3 p2p2 p1p1 2F2 Assume that operation 2F may be realized in a different alternative machine O 1 = [1F, M 1 (S 11, T 11 )] O 21 = [2F1, M 1 (S 11, T 12 )] O 22 = [2F2, M 2 (S 21, T 21 )] O 3 = [3F, M 2 (S 21, T 21 )] O 4 = [4F, M 1 (S 11, T 12 )] O 5 = [5F, M 2 (S 22, T 22 )]
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 31 Petri nets for Process Planning O22 O3 O1 O4 O5 O1 O4 O21 O22 O5 O21 O22 O4 O3 O21 O22 O3 O5 O3 O5O3 O4 O3 O5 O3 RG with alternatives O4
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 32 Petri nets for Process Planning How to chose the best process plan among all included in the RG ? Four types of cost: –(i) the pure machining cost, –(ii) the cost of moving a part from one machine to another, –(iii) the cost of a setup change in one machine and –(iv) the cost of a tool change in one machine. Optimisation criterion : manufacturing cost !
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 33 Petri nets for Process Planning Recall the manufacturing heuristics ! 1.Keep the same machine as long as possible quality economy 2.Keep the same setup as long as possible quality economy 3.Keep the same tool as long as possible economy
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 34 Petri nets for Process Planning Calculating optimal process plans opCost [1] = 60 opCost [21] = 50 opCost [22] = 20 opCost [3] = 30 opCost [4] = 50 opCost [5] = 35 Machine_change_cost := 600 Setup_change_cost := 400 Tool_change_cost := O1 = [1F, M1(S11, T11)] O21 = [2F1, M1(S11, T12)] O22 = [2F2, M2(S21, T21)] O3 = [3F, M2(S21, T21)] O4 = [4F, M1(S11, T12)] O5 = [5F, M2(S22, T22)]
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 35 Petri nets for Process Planning The optimal solution operationmachinesetuptoolopCosttotalCost O 1 M 1 S 11 T O 4 M 1 S 11 T O 22 M 2 S 21 T O 3 M 2 S 21 T O 5 M 2 S 22 T O1 – O4 – O22 – O3 – O5
Laboratoire des outils informatiques pour la conception et la production en mécanique (LICP) ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE 36 Petri nets for Process Planning PROBLEM ? How to find the optimal solution in such a graph ? O1 O4 O21 O22 O5 O21 O22 O4 O3 O21 O22 O3 O5 O3 O5O3 O4 O3 O5 O3 O4 Source node Final node In other words … How to find the shortest path from the « Source node » to the « Final node » ? O1 – O4 – O22 – O3 – O5