Presentation is loading. Please wait.

Presentation is loading. Please wait.

Generalized stochastic Petri nets (GSPN)

Similar presentations


Presentation on theme: "Generalized stochastic Petri nets (GSPN)"— Presentation transcript:

1 Generalized stochastic Petri nets (GSPN)
Chapter 5 Generalized stochastic Petri nets (GSPN) Learning objectives : Introduce generalized stochastic Petri nets (GSPN) Model manufacturing systems using GSPN Able to evaluate the steady-state performances Textbooks : M. Ajmone Marsan, G. Balbo, G. Conte, S. Donatelli, and G. Franceschinis, Modelling with Generalized Stochastic Petri Nets. J. Wiley, 1995 G. Chiola, M. Ajmone Marsan, G. Balbo, and G. Conte. Generalized stochastic Petri nets: A definition at the net level and its implications. IEEE Transactions on Software Engineering, 19(2): , 1993

2 Introduction to stochastic Petri nets by examples
Plan Introduction to stochastic Petri nets by examples Petri nets with inhibitors and priority Generalized stochastic Petri nets Applications Extensions

3 Example 1 Consider an unreliable machine with:
1/l : mean time between failures (MTTF) 1/m : mean time to repair (MTTR) 1/p : mean processing time Markov chain Stochastic Petri net model

4 Example 1 Reachability graph Stochastic Petri net model
Removing transient states leads to an isomorphic CTMC :

5 Example 1 Results • p0001 = l / (l+m), p0100 = m / (l+m)
• Failure rate (frequence of t4) : p0100 * l = m l / (l+m) • Production rate (frequence of t2) : p0100 * p = m p / (l+m) Remark : The conflict between t2 and t4 is solved by competition of clocks (failure models)

6 Example 2 Two types of products P1 and P2 are produced.
The production of each product requires two operations with the first operation on a shared flexible machine the second operation on a dedicated machine. P1 has priority to the shared machine but cannot preempt on- going operations There is at most one product of each type in the system at all moment When the production of a product is finished, a new one of the same type is dispatched into the system

7 Example 2 Stochastic Petri net model :
P1 has priority to the shared machine

8 Example 2 Reachability graph : Markov chain :
Convention : Immediate transitions have priority over timed transitions

9 Example 2 Results for the case li = l : • p2 = p4 = p5 = p7 = p8 = 1/5
• Utilization ratio of the shared machine: p2 + p4 + p5 + p7 = 4/5 • Production rate of P1 (frequence of t3) : p4 l3 + p8 l3 = 2/5 l • Production rate of P2 (frequence of t6) : p7 l6 + p8 l6 = 2/5 l (!!!)

10 Remarks It is not obvious to build directly the Markov chain
Stochastic Petri nets offer an elegant tool for generation of correct Markov chain models of complex systems Immediate transitions seem a good way for representation of conflicts and priorities

11 Introduction to stochastic Petri nets by examples
Plan Introduction to stochastic Petri nets by examples Petri nets with inhibitors and priority Generalized stochastic Petri nets Applications Extensions

12 Definition PN = (P, T, I, O, M0, H, P) where : P set of places
T set of transitions I : P  T  IN : PRE function, i.e. arcs from places to transitions and their weights O : P  T  IN : POST function, i.e. arcs from transitions and places their weights M0 : P  IN : initial marking H : P  T  IN : generalized inhibitor arcs P : T  IN : priority degrees of transitions

13 Example Effect of inhibitor :
Transition t5 is not firable if M(p6) ≥ 2 . Effect of priority : Transitions t1, t6 and t7 are not allowed to fire if at least one transition of higher priority is firable.

14 tj  G(M) and pj ≥ pk, " tk  G(M)
Firing rules R1 : A transition t is said to have concession in marking M if M(p) ≥ I(p, t), "p •t and M(p) < H(p, t), "p °t. Let G(M) the set of transitions that have concession in M R2 : A transition tj is said firable if tj  G(M) and pj ≥ pk, " tk  G(M) R3 : Firing a transition t leads to the following marking : M' = M + O(t) - I(t) •t set of input places of transition t t• set of output places of t °t set of places linked to t by inhibitor arcs

15 Structures of conflicts
• (Without priority) : A transition tm is said in effective conflict with tl at marking M if - tm has concession in M - tl is firable - tm no longer has concession in M' such that M(tl > M'. Example : t2, t3 and M1 obtained after firing t1.

16 Structures of conflicts
(with priority) : A transition tk is said in indirect effective conflict with tl having the same degree of priority in M if tk is firable in M, tl is firable in M, firing tl leads to a sequence s of higher priority transitions such that, after s, no transition of priority higher than pk is firable, tk is not firable in M' such that M(tl s> M'. Example :

17 Structural properties of PN
If the Markov chain of a stochastic Petri net has a finite state space and is ergodic, then - it is consistent : - and it is conservative : where C = O - I.

18 Introduction to stochastic Petri nets by examples
Plan Introduction to stochastic Petri nets by examples Petri nets with inhibitors and priority Generalized stochastic Petri nets (GSPN) Applications Extensions

19 Definition GSPN = (P, T, I, O, M0, H, P, W) where
PN = (P, T, I, O, M0, H, P) is a Petri net with inhibitors and priority composed of: transitions of priority 0 that are timed transitions with exponentially distributed firing times (timed transitions) transitions of priority n ≥ 1 that are immediate transitions (n-immediates transitions) W : T  IR+ : is a function such that W(t) is the rate of the exponential distribution, i.e. inverse of the mean firing time, if t is timed W(t) is a weight associated with t if t is immediate

20 Tangibles and intangibles markings
A marking M is said tangible if no immediate transition is firable. It is said intangible if at least one immediate transition is firable.

21 Dynamics of GSPN To each timed transition is associated a clock initiated with the corresponding exponential distribution For a tangible marking, clocks of all firable transitions tick down at the same speed the next transition to fire is that whose clock reaches zero first

22 Dynamics of GSPN For an intangible marking,
a firable transition ti fires next with probability : where E(M) is the set of firable transitions. All transitions in E(M) are immediate transitions of the same degree. Firing ti leads to a new marking If the new marking is till intangible, the above is repeated. Otherwise, clocks of new transitions are generated and the system evolves from the new tangible marking

23 Impacts The sequence of tangible markings is a CTMC.
the average sojourn time in a tangible marking M is exponentially distributed with mean where E(M) is the set of transition firable at M, and W(t) is the parameter of the exponential distribution of t the probability of firing a firable transition tk in a tangible marking M is:

24 Generation of the isomorphic CTMC
The CTMC can be derived from the reachability graph (RG) : (i) by establish a one-to-one correspondence between the states of the CTMC and tangible markings CTMC Reachability graph

25 Generation of the isomorphic CTMC
(ii) by introducing an arc (or a state-transition) u for all arc t of RG connecting two tangible markings. The rate of u is W(t) CTMC Reachability graph

26 Generation of the isomorphic CTMC
(iii) by introducing an arc v for all path t1t2…tk of RG connecting two tangible markings M and M* via intangible markings M1, M2, …, Mk-1. The rate of v is : W(t1) P(t2 / M1) .P(t3 / M2) … P(tk / Mk-1) where CTMC Reachability graph

27 Performance evaluation
Steady state distribution : pj : probablity of being in tangible marking Mj Firing frequency of a timed transition tk where lk(Mj) is the firing rate of tk in Mj Average number of tokens in place p : Average sojourn time of tokens in a place p (Little's law):

28 Methodology Construction of the GSPN model
Validation of the model. For example, the verification of the consistency and conservativeness. Definition of performance measures Generation of the reachability graph Derive the isomorphic CTMC Verification of the ergodicity of the CTMC Compute the steady state distribution of the CTMC Computation of the performance measures Remark : Softwares are available for automatic generation and solution of CTMC (GreatSPN, …)

29 Introduction to stochastic Petri nets by examples
Plan Introduction to stochastic Petri nets by examples Petri nets with inhibitors and priority Generalized stochastic Petri nets Applications Extensions

30 Failure-prone production line
Assumption : idle machines cannot fail Parameters : li : failure rate mi : repair rate pi : production rate H : buffer capacity

31 Failure-prone production line : GSPN model

32 Failure-prone production line structural properties
Conservative as the GSPN is covered by three p-invariants : {p1, p2, p3, p4} {p2, p3, p9, p10} {p5, p6, p7, p8} Consistent as the GSPN is covered by three t-invariants: {t1, t2, t3, t6, t7, t8} {t4, t5} {t9, t10}

33 Failure-prone production line : performances
Production rate (frequency of t7) Average WIP Utilization ratios of the machines : Idle rate of the machines

34 An NC machine The operation cycle of the machine is as follows :
Phase 1 : Read informations of the product to process Phase 2 : Simultaneous execution of two commands: preparation of machining tools and preparation of NC program Phase 3 : Process the product Phase 4 : Test of the quality. If the quality is insufficient, then the machine repeats phases 2 and 3 for other treatments. Otherwise, the product is unloaded.

35 An NC machine : GSPN model
with r + q = 1. Phase 1 : Read the product informations Phase 2 : Simultaneous execution of two commands: tool preparation and NC program loading Phase 3 : Process the product Phase 4 : Quality test. With probability q, the quality is insufficient, then the machine repeats phases 2 and 3 for other treatments. Otherwise, the product is unloaded.

36 An NC machine : structural properties
with r + q = 1. Phase 1 : Read the product informations Phase 2 : Simultaneous execution of two commands: tool preparation and NC program loading Phase 3 : Process the product Phase 4 : Quality test. With probability q, the quality is insufficient, then the machine repeats phases 2 and 3 for other treatments. Otherwise, the product is unloaded.

37 An NC machine : Markov chain
Reachability graph Markov Chain

38 An NC machine : Steady state analysis
The state-transition diagam is strongly connected and the CTMC is ergodic. Steady state distribution is solution of the system p1 l1 = p9l9 p3 (l3 + l4) = p1l1 + p7ql6 p4l4 = p3l3 p5l3 = p3l4 p9l9 = p7 rl6 p1 + p3 + p4 + p5 + p7 + p9 = 1

39 An NC machine : Performances
- Production rate (frequency of t9) : TH = p9 l9 - mean production cycle : T = 1/TH - mean time of phase 2 (Little's law): - Utilization ratio of the machine : D = p7

40 Introduction to stochastic Petri nets by examples
Plan Introduction to stochastic Petri nets by examples Petri nets with inhibitors and priority Generalized stochastic Petri nets Applications Extensions

41 Choice of immediate transitions with random switches
Each random switch is associated with a set S of transition and it indicates, for each marking, the probability of firing a transition of this set Switches which are functions of markings are particularly useful Example : if M(p2) < M(p3) , P(t1) = 1, P(t2) =0 if M(p2) > M(p3), P(t1) = 0, P(t2) =1 if M(p2) = M(p3), P(t1) = 0.5, P(t2) = 0.5

42 Marking dependent firing times
Example : lt(M) = lt * Min{M(p), "p  •t}

43 Approximation of general distribution
Consider a random variable D of mean mD and standard deviation sD. Case : mD > sD. The delay of the subn-etwork N1 and D have the same mean and same standard deviation if :

44 Approximation of general distribution
Consider a random variable D of mean mD and standard deviation sD. Case : mD < sD. The delay of the subnetwork N2 and D have the same mean and same standard deviation if :


Download ppt "Generalized stochastic Petri nets (GSPN)"

Similar presentations


Ads by Google