SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for...

19
Petri nets Chapter 1: systems 1. Compare continuous systems and discrete event systems. 2. Compare discrete systems and discrete event systems. 3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata 1. Represent the following state-transition diagram as an automaton (E, X, f, x 0 , F): 2. Find the set of event sequences of length less than or equal to 5 of the automaton of exo 1. What do you conclude? 2.6 Construct an automaton that marks to the following language { s {a, b}* : each a in s is immediately preceded and followed by b}

Transcript of SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for...

Page 1: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

Petri netsChapter 1: systems1. Compare continuous systems and discrete event systems.2. Compare discrete systems and discrete event systems.3. Give 5 examples of discrete event systems with, for each, the states and the events.see also Ch1exoSupp

Chapter 2: Language and automata1. Represent the following state-transition diagram as an automaton (E, X, f, x0, F):

2. Find the set of event sequences of length less than or equal to 5 of the automaton of exo 1. What do you conclude?

2.6 Construct an automaton that marks to the following language { s {a, b}* : each a in s is immediately preceded and followed by b}

Page 2: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata
Page 3: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

Chapter 3: Petri nets3.A: Basics1. Consider the following PN with initial marking M0 = [1,1,2,1].

a) What is the marking after firing the sequence s = < t1, t2, t3, t4>?b) Let sn be the n-time repetition of the sequence s. Starting from M0, is it possible to fire sn for any n? If yes, what is the marking? If not, what is the maximal value of n for which the firing of sn is possible?c) Determine the incidence matrix and verify the above results with the state equation.d) Determine the marking obtained with sequence s=t1t2t4t1t3t1t3t1t4 if it is firable. What do you conclude?

2. Assume that, in a PN of a manufacturing system, a transition represents an operation and a place represents a stock keeping unit.What the following PNs represent? Give the signification of the tokens and the types of operations modeled. (assembly-disassembly-transformation).

3. Are the following graphs Petri nets? If yes, which transitions are firable? What are the resulting markings? What are the transitions firable at the new markings?

Page 4: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

4. Are above PN belong to some elementary PN?

5. Explain the process modeled by the following PNs.

PN model of a vending machine Readers-writers system for k processes

Dataflow computation for x = (a+b)/(a-b)

Page 5: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

3.B. Dynamic behaviors and analysis1. Prove the theorem of monotonicity of the sequence of transitions. The state equation might be used.

Theorem : Given a firable sequence s of transitions of a Petri net (P, T, A, W, M0), then s is firable in PN (P, T, A, W, M0') for all M0' ≥ M0.

2. Show the properties of the following PN.

3. Give a PN with unavoidable deadlock, a PN with avoidable deadlocks, a PN without deadlock but non live, a quasi live but not live PN (quasi live = any transition can be fire at least once).

4. Consider the following PN. (i) Show that M = (0, 0), M0 and Y = (1, 2) satisfy the state equation but there is no firable sequence with counting vector Y. (ii) Show that M = (n, 0) with n > 0, M0 and Y = (n, 1) satisfy the state equation but M is not reachable. (iii) What do you conclude?

5. Show that, if there exists a sequence s of transitions transforming M0 into M such that M ≥ M0 and M(p) > M0(p) for at least one place p, then s can be repeated any time and places p such that M(p) > M0(p) are not bounded.6. Construct the coverability tree of the following Petri nets. Verify their liveness. What do you observe?

Page 6: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

7. Are the following PNs bounded, live, deadlock-free and reversible?

8. Build the coverability tree of the following PN? What do you conclude?

9. Determine the properties of the following PN with M0 = (1, 0, 0, 0, 0, 0), (2, 0, 0, 0, 0, 0), (1, 1, 0, 0, 0, 0).

10. Consider the following production system. (i) model its operation with a PN with the initial state corresponding to the figure. (ii) Does it belong to an elementary PN class? (ii) Determine a firable sequence that contains each transition once. Determine

Page 7: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

the resulting marking. What do you conclude? Is the sequence firable with an initial marking M0' ≥ M0?

11. Problem of dining philosophers: four silent philosophers sit around a table with four chopsticks b1 to b4. Each philosopher has two states: think or eat.(i) model with PN the following protocol: when a philosopher wants to eat, he first takes the chopstick on his right, then that on his left and then eat. When he finishes, he puts back the right chopstick and then that of left and start thinking.Indicate the invariants of the PN. Is the PN live? If there is a deadlock, give a sequence of transitions leading to it and explain why the deadlock occurs.(ii) Define a protocol without deadlock.

12. Consider the following protocol for management of cabins and baskets of a swimming pool. Upon his arrival, a customer enters any free cabin and changes and leaves his clothes in the cabin. He then asks for a basket to fill his clothes before release the cabin. After the swim, he enters a cabin with his basket, empty the basket and release the basket. He then dresses and releases the cabin.Let Nc be the number of cabins and Nb the number of baskets.i) Model the protocol with PN. Is the PN bounded and deadlock-free?(ii) Define a protocol that is deadlock-free for all Nc and Nb. Verify with its PN model.

Page 8: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

13. Show with coverability tree the properties of the following PN: (L = live, B = Bounded, R = Reversible)

, , , , R , L,

B, , , V, R B, , R

B, V, B, V, R

Page 9: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

3.C. Structural properties1. Prove the following theorem :

Theorem: Any p-invariant is a non negative linear combination of minimal p-invariants.

2. The following PN represents a machine subject to failures. t1 represents the loading of a product on the machine, t2 the end of production, t3 the downloading of the product. The machine can fail when it is producing. Your task: (i) give the incidence matrix, (ii) construct the coverability tree, (iii) determine the invariants and their interpretation.

3. Consider a connected event graph. Show that (i) each elementary circuit is a p-invariant, (ii) there exists a single minimal t-invariant Y with all entries equal to 1, (iii) the PN is conservative and consistent if it is strongly connected.4. Consider a connected state machine. Show that (i) each elementary circuit is a t-invariant, (iii) there exists a single minimal p-invariant X with all entries equal to 1, (iii) the PN is conservative and consistent if it is strongly connected.5. Consider the following PN. You are asked to: (i) determine the set of p-invariants, the set of t-invariants, and explain their signification; (ii) show their structural properties; (iii) interpret these properties.

6. Consider the following PNs. (i) Show their structural properties, (ii) prove the behavior properties that can be directly derived from (i).

7. Are PN of problem 7 of chapter 3.B conservative, repetitive, consistent, structurally bounded?

Page 10: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

8. Is the following PN conservative? Is there a p-invariant? Prove your answers and give an intuitive explanation.

9. Determine intuitively the p- and t-invariants of the following PN and then prove your results.

3.E. : Timed Petri nets

1. Consider the PN given below. It represents a production system composed of two machines M1 and M2 and producing two types of products S1 and S2. Products are transported in the system with dedicated pallets that are represented by tokens in places p1 and p4.The firing of t1 (resp. t3) represents the loading of a S1 (resp. S2) product on machine M1. The firing of T2 (resp. t4) the loading on machine M2;Elementary circuit (Q1, t1, Q2, t3, Q1), containing initially on token in Q1, ensures alternative firing of t1 and t3, i.e. consecutive production of S1 and S2 on M1. Elementary circuit (Q3, t2, Q4, t4, Q3) plays a similar role for products on M2. When a product S1 (resp. S2) finishes, the pallet transporting it is released and reused for a new product of the same type. This is ensured by elementary circuits (p1, t1, p2, t2, p1) and (p4, t3, p3, t4, p4). Firing times (or processing times) are given in parenthesis.

a) Give the incidence matrix. What class of PN it belongs to?b) Build the coverability graph or marking graph.c) Is the PN live, bounded, reversible. Why?d) What is the input sequence of products into the system? What is the throughput rate?

Page 11: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

Problem 2 (Kanban controled system)The PN given below represents an assembly system composed of three machines M1, M2, and M3. M1 and M2 produce two different components that are assembled on machine M3. Two types of products S1 and S2 are assembled. S1 is obtained by assembly on M3 of a component produced by M1 and another one produced by M2. S2 is obtained by assembly on M3 of a component produced by M2 and other components not considered here. The production of the components is controlled by Kanbans represented by tokens of places p2, p4 and p6. A free kanban is needed to start the production of a component and the kanban is released at the end of the assembly operation.

Firing t1 (resp. t2, t3) implies the production of a component on M1 (resp. M2, M2). Firing t4 (resp. t5) implies the assembly of a S1 (resp. S2). Elementary circuits élémentaires (t1p1t4p2t1), (t2p3t4p4t2) and (t3p5t5p6t3) are kanban-loops of the corresponding components. Place Q1 represents the availability of M1 dedicated to S1. Elementary circuit (Q2, t2, Q3, t3, Q2), initially with a token in Q2, implies successive firing of t2 and t3 and hence the input sequence of components in machine M2. Elementary circuit (Q4, t4, Q5, t5, Q4) models the input sequence of S1 and S2 in the assembly station M3. At the completion of a product S1 (resp. S2), the related kanbans are released to start the production of another product of the same type. Firing times are given in parenthesis.

a) Give the incidence matrix. What class of PN it belongs to?b) Determine the set of elementary circuits.c) With the given initial marking, is the PN liven bounded and reversible? Why?d) With the given initial marking, what are the input sequences of products in different machines? What is the cycle time of the system? What is the utilization ratio of each machine?e) If place p2 contains initially two tokens, what is the cycle time of the system and the resource utilization ratios? Is it possible to further increase the productibity of the system, i.e. reduce the cycle time, by adding more kanbans?

Page 12: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

3. Consider the following repetitive manufacturing system. (i) Give its timed event graph model, (ii) determine the cycle time and the machine utilization ratios, (iii) determine an initial marking to reach the maximum throughput rate, (iv) determine the minimal number of tokens in process circuits (i.e. minimal WIP) to reach maximum throughput rate, (v) is it possible to reduce the minimal WIP by changing the input sequences?

System: a job-shop system with 3 machines and three types of jobsManufacturing process:

R1: M1 (1), M2 (3), M3 (3)R2: M3 (1), M2 (2) ( ) processing timesR3: M1 (2), M3 (1)

Production mix: 2 jobs type R3 for 1 job type R1 and 1 job type R2Input sequence into the system: (R1, R2, R3, R3)Input sequence into the machines:

M1: (R1, R3, R3)M2: (R2, R1)M3: (R1, R2, R3, R3)

Page 13: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

3.F. : Time Petri nets

1. (Verification of communication protocols by time Petri nets) Consider message transmission between two entities: a server and a client. The transmission is not full reliable and the loss of messages is possible. A "time-out" mechanism is used. The time Petri net given below represents the communication protocol.

where t1 = send message, t2 = resend message, t3 = receive Ack, t4 = receive and save message, t5 = send Ack, t6 = reject message, t7 = lost message, t8 = loss Ack.

(i) Explain the communication protocol, (ii) Build the state class graph, (iii) Check the liveness of the PN and whether the protocol is well-designed fulfilling the following properties: each message is received and saved, a copy of each message is saved and there is at most one on-going message or a on-going acknowledgement in transmission.(iv) Is it possible to propose a well-designed protocol?

Problem 2 (Data exhange protocol) The PN below represents a protocol for data exchange between two entities: a producer and a consumer. Places and transitions are explained as follows:

Places Transitionsp1 : Ready to produce a message or data t1 : Sending a messagep2 : Waiting acknowledgement t2 : Receipt of acknowledgementp3 : Ready to consume t3 : Reading a messagep4 : End of message reading t4 : Sending an acknowledgementp5 : Message in transmission t5 : Message transmissionp6 : Arrival of message at consumer sitep7 : Acknowledgement in transmission t6 : Acknowledgement transmissionp8 : Arrival of acknowledgement at producer site

Firing times are given in parenthesis.

a) ) Give the incidence matrix. What class of PN it belongs to?

Page 14: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

b) Build the marking graph by neglecting timec) For the given initial marking, is the PN live, bounded, reversible? why?d) Check that X1 = [1, 1, 0, 0, 0, 0, 0, 0]T, X2 = [0, 0, 1, 1, 0, 0, 0, 0]T, X3 = [1, 0, 0, 1, 1, 1, 1, 1]T

are p-invariants and Y1 = [1, 1, 1, 1, 1, 1]T is a t-invariant. Explain their physical meaning.e) Is the PN conservative and consistebt?f) What is the cycle time and frequency of message sending?

Problem 3 (Communication protocol with message loss) Consider the message transmission between a producter and a consumer. The protocol is similar to the previous one. The transmission is not reliable and messages can be lost. A time-out mechanism is used to resend lost messages. The PN model of the protocol is the following one:

Significance of places and transitions:

Places Transitionsp1 : Ready to produce a message t1 : Sending a message

Page 15: SYSTEMES A EVENEMENTS DISCRETS · Web view3. Give 5 examples of discrete event systems with, for each, the states and the events. see also Ch1exoSupp Chapter 2: Language and automata

p2 : Waiting acknowledgement t2 : Resending lost messagep3 : Acknowledgement received t3 : Receipt of acknowledgement

p4 : Ready to consume t4 : Receipt and saving the message

p5 : Message received t5 : Envoi de la confirmation,p6 : Acknowledgement sent t6 : Rejecting message

p7 : Message in transmission t7 : Message lossp8 : Acknowledgement in transmission t8 : Acknowledgement loss

t9 : Reset procedure

(a) Explain the communication protocol(b) Build the state graph(c) Show the correctness of the the protocol, i.e. the PN is live, each message is received and saved (i.e. t4 fires after each firing of t1), a single copy of a message is saved (i.e. each firing of t1 leads to one firing of t4), and there is simultaneously message sending and acknowledgement sending (i.e. p7 and p8 are not simultaneously marked).