Stochastic Petri Nets. Jonatan Lindén. Modelling SPN GSPN. Performance measures. Almost none of the theory. December 8, 2010

Similar documents
ADVANCED ROBOTICS. PLAN REPRESENTATION Generalized Stochastic Petri nets and Markov Decision Processes

Composition of product-form Generalized Stochastic Petri Nets: a modular approach

Stochastic Petri Net. Ben, Yue (Cindy) 2013/05/08

DES. 4. Petri Nets. Introduction. Different Classes of Petri Net. Petri net properties. Analysis of Petri net models

Proxel-Based Simulation of Stochastic Petri Nets Containing Immediate Transitions

From Stochastic Processes to Stochastic Petri Nets

AN INTRODUCTION TO DISCRETE-EVENT SIMULATION

Stochastic Petri Net

Applications of Petri Nets

Queueing systems. Renato Lo Cigno. Simulation and Performance Evaluation Queueing systems - Renato Lo Cigno 1

A REACHABLE THROUGHPUT UPPER BOUND FOR LIVE AND SAFE FREE CHOICE NETS VIA T-INVARIANTS

Designing parsimonious scheduling policies for complex resource allocation systems through concurrency theory

Analyzing Concurrent and Fault-Tolerant Software using Stochastic Reward Nets

Multi-State Availability Modeling in Practice

Specification models and their analysis Petri Nets

Data analysis and stochastic modeling

Outlines. Discrete Time Markov Chain (DTMC) Continuous Time Markov Chain (CTMC)

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010

Stochastic Petri Net

Markov Chains. X(t) is a Markov Process if, for arbitrary times t 1 < t 2 <... < t k < t k+1. If X(t) is discrete-valued. If X(t) is continuous-valued

1. sort of tokens (e.g. indistinguishable (black), coloured, structured,...),

1 Introduction Stochastic Petri nets (SPNs) of various ilk are found to be powerful in modeling performance and dependability of computer and communic

Analysis of Deterministic and Stochastic Petri Nets

MARKOV PROCESSES. Valerio Di Valerio

Homework 4 due on Thursday, December 15 at 5 PM (hard deadline).

Markovian techniques for performance analysis of computer and communication systems

A Generalized Stochastic Petri net Model for Performance Analysis and Control of Capacitated Re-entrant Lines

The Transition Probability Function P ij (t)

Varieties of Stochastic Calculi

Introduction to Stochastic Petri Nets

Part I Stochastic variables and Markov chains

Learning Automata Based Adaptive Petri Net and Its Application to Priority Assignment in Queuing Systems with Unknown Parameters

Designing parsimonious scheduling policies for complex resource allocation systems through concurrency theory

2. Stochastic Time Petri Nets

Time(d) Petri Net. Serge Haddad. Petri Nets 2016, June 20th LSV ENS Cachan, Université Paris-Saclay & CNRS & INRIA

Irreducibility. Irreducible. every state can be reached from every other state For any i,j, exist an m 0, such that. Absorbing state: p jj =1

DISCRETE-TIME MARKOVIAN STOCHASTIC PETRI NETS

IEOR 4106: Introduction to Operations Research: Stochastic Models Spring 2011, Professor Whitt Class Lecture Notes: Tuesday, March 1.

Modelling M/G/1 queueing systems with server vacations using stochastic Petri nets

3 Net Models of Distributed Systems and Workflows

MAT SYS 5120 (Winter 2012) Assignment 5 (not to be submitted) There are 4 questions.

A comment on Boucherie product-form results

Exercises Solutions. Automation IEA, LTH. Chapter 2 Manufacturing and process systems. Chapter 5 Discrete manufacturing problems

Sleptsov Net Computing

Sub-Optimal Scheduling of a Flexible Batch Manufacturing System using an Integer Programming Solution

Performance Evaluation of Queuing Systems

Availability. M(t) = 1 - e -mt

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

Lecture 10: Semi-Markov Type Processes

Reading: Karlin and Taylor Ch. 5 Resnick Ch. 3. A renewal process is a generalization of the Poisson point process.

Performance Evaluation. Transient analysis of non-markovian models using stochastic state classes

STRUCTURED SOLUTION OF STOCHASTIC DSSP SYSTEMS

(b) What is the variance of the time until the second customer arrives, starting empty, assuming that we measure time in minutes?

The Need for and the Advantages of Generalized Tensor Algebra for Kronecker Structured Representations

CHAPTER 4. Networks of queues. 1. Open networks Suppose that we have a network of queues as given in Figure 4.1. Arrivals

Biological Pathways Representation by Petri Nets and extension

Toward a Definition of Modeling Power for Stochastic Petri Net Models

POSSIBILITIES OF MMPP PROCESSES FOR BURSTY TRAFFIC ANALYSIS

Performance evaluation of the generalized shared memory system in dtspbc

Industrial Automation (Automação de Processos Industriais)

Petri Nets (for Planners)

Stochastic2010 Page 1

Robustness of stochastic discrete-time switched linear systems

Introduction to Markov Chains, Queuing Theory, and Network Performance

Petri nets. s 1 s 2. s 3 s 4. directed arcs.

Discrete Event Systems Exam

(implicitly assuming time-homogeneity from here on)

SYMBOLS AND ABBREVIATIONS

THROUGHPUT ANALYSIS OF MANUFACTURING CELLS USING TIMED PETRI NETS

A Review of Petri Net Modeling of Dynamical Systems

Time Petri Nets. Miriam Zia School of Computer Science McGill University

Glossary availability cellular manufacturing closed queueing network coefficient of variation (CV) conditional probability CONWIP

Stochastic models in product form: the (E)RCAT methodology

Structural Analysis of Resource Allocation Systems with Synchronization Constraints

A FRAMEWORK FOR PERFORMABILITY MODELLING USING PROXELS. Sanja Lazarova-Molnar, Graham Horton

Contents Preface The Exponential Distribution and the Poisson Process Introduction to Renewal Theory

Model Checking CSL TA with Deterministic and Stochastic Petri Nets

Stochastic process. X, a series of random variables indexed by t

Quantitative Model Checking (QMC) - SS12

Analysis and Optimization of Discrete Event Systems using Petri Nets

Dynamic Control of a Tandem Queueing System with Abandonments

Introduction to queuing theory

Fluid Petri Nets and hybrid model-checking: a comparative case study q

Chapter 2 SOME ANALYTICAL TOOLS USED IN THE THESIS

Solutions to Homework Discrete Stochastic Processes MIT, Spring 2011

IEOR 6711: Stochastic Models I, Fall 2003, Professor Whitt. Solutions to Final Exam: Thursday, December 18.

Dependable Computer Systems

OPTIMAL TOKEN ALLOCATION IN TIMED CYCLIC EVENT GRAPHS

SOLUTIONS IEOR 3106: Second Midterm Exam, Chapters 5-6, November 8, 2012

Lecturer: Olga Galinina

Hybrid Control and Switched Systems. Lecture #1 Hybrid systems are everywhere: Examples

Time and Timed Petri Nets

On the Optimality of Randomized Deadlock Avoidance Policies

Markov Reliability and Availability Analysis. Markov Processes

Queueing. Chapter Continuous Time Markov Chains 2 CHAPTER 5. QUEUEING

biological networks Claudine Chaouiya SBML Extention L3F meeting August

An Aggregation Method for Performance Evaluation of a Tandem Homogenous Production Line with Machines Having Multiple Failure Modes

Integrating synchronization with priority into a Kronecker representation

A general algorithm to compute the steady-state solution of product-form cooperating Markov chains

Quantitative evaluation of concurrent systems with non-markovian temporal parameters

Transcription:

Stochastic Almost none of the theory December 8, 2010

Outline 1 2

Introduction A Petri net (PN) is something like a generalized automata. A Stochastic Petri Net () a stochastic extension to Petri nets, for quantitative analysis. More expressive than queueing networks and easier to model a wider range of systems. Underlying mathematical model : stochastic processes.

Basic example A PN consists of: Places

Basic example A PN consists of: Places Arcs

Basic example A PN consists of: Places Arcs Transitions

Basic example A PN consists of: Places Arcs Transitions Tokens

Basic example A PN consists of: Places Arcs Transitions Tokens A transition fires

Basic example A PN consists of: Places Arcs Transitions Tokens A transition fires Tokens are moved!

Transitions in s All transitions t i are associated with a rate λ i, possibly marking dependent. A transition becomes enabled when none of its input places is empty. When a transition t i becomes enabled, an exponentially distributed random variate with parameter λ i is generated. When a transitions fires, one token is removed from each input place, and tokens are put into all of its output places. Each allocation of tokens to the places in the is called a marking.

Notation M i - some marking, M 0 - Initial marking. t i - Transition i. p i - Place i. m i - Number of tokens in place i. E(M i ) - transitions enabled by marking M i. G(t i ) - the set of markings in which t i is enabled.

Processor working in private memory Example p 1 A place can represent some logical state of the system that we want to model. Initial marking M 0 = 2, 0, 1, 0 Processor requesting shared resource t 1 m 1 λ p 2 p 3 t 2 θ Processor using shared resource, exclusively p 4 t 3 µ

Example p 1 A place can represent some logical state of the system that we want to model. Initial marking M 0 = 2, 0, 1, 0 t 1 m 1 λ p 2 p 3 M 1 = 1, 1, 1, 0 t 2 θ p 4 t 3 µ

Example p 1 A place can represent some logical state of the system that we want to model. Initial marking M 0 = 2, 0, 1, 0 t 1 m 1 λ p 2 p 3 M 1 = 1, 1, 1, 0 t 2 θ M 2 = 1, 0, 0, 1 p 4 t 3 µ

Example p 1 A place can represent some logical state of the system that we want to model. Initial marking M 0 = 2, 0, 1, 0 t 1 m 1 λ p 2 p 3 M 1 = 1, 1, 1, 0 t 2 θ M 2 = 1, 0, 0, 1 M 0 = 2, 0, 1, 0 p 4 t 3 µ

How to solve it - two approaches to get performance : Analytical - generate a corresponding CTMC and solve it. Simulation - When the state space is too large, or when a more advanced model is necessary (general firing distributions).

s and CTMCs Fact: s are isomorphic to CTMCs, k-bounded s are isomorphic to finite CTMCs.

s and CTMCs Fact: s are isomorphic to CTMCs, k-bounded s are isomorphic to finite CTMCs. Reachability set RS = RS(M 0 ) - the markings reachable starting from the initial marking M 0. The state space of the CTMC (the marking process) corresponds to the RS.

s and CTMCs Fact: s are isomorphic to CTMCs, k-bounded s are isomorphic to finite CTMCs. Reachability set RS = RS(M 0 ) - the markings reachable starting from the initial marking M 0. The state space of the CTMC (the marking process) corresponds to the RS. Home state: M RS(M 0 ), M RS(M ) A k-bounded is said to be ergodic if M 0 is a home state. ergodic ergodic CTMC guaranteed steady state solution

Obtaining the CTMC Convert the to a CTMC, where every marking of the can be associated with a state in the corresponding Markov chain. We get the generator matrix Q by: { t q ij = k E j (M i ) λ k(m i ) i j t k E(M i ) λ k(m i ) i = j NB. Mean sojourn time in any marking (why?): ST i = t k E j (M i ) λ k (M i ) 1

Obtaining the CTMC Reminder : each marking is written as M = m 1, m 2, m 3, m 4. 1, 0, 0, 1 p 1 m 1 λ µ θ λ p 2 p 3 2, 0, 1, 0 1, 1, 1, 0 2λ µ 0, 1, 0, 1 t2 θ λ 0, 2, 1, 0 θ p 4 t 3 µ

We extend the original model with: Immediate transitions transitions that fire immediately, before any timed transitions. (higher priority) Inhibitor arcs. (will be skipped) Motivation: can be used to model purely logical events or events whose duration is negligible. the state space (RS) of the resulting CTMC is reduced (when using an immediate transition instead of a timed transition). We increase modeling power.

, ctd. We will call markings m i G(t j ), where t j is immediate, for vanishing states, and we differ those from the tangible states (i.e., when the transition is timed). The marking process will no longer be a CTMC, but a Semi-Markov process. (The times between transitions have two different distributions) It is straightforward to find an EMC, from which it is possible to derive a reduced EMC, with a smaller state space.

Switching distributions Whenever two immediate transitions are enabled at the same time, we require some rule that specifies which transition should fire first (possibly marking dependent). P(t 2 )=P(t 3 )=0.5 t 2 t 3

Switching distributions However, there are some subtleties when defining the switching distributions of the immediate transitions: P(t 2 )=P(t 3 )=0.5 t 2 t 3 t 4 t 5

Switching distributions The probability measure is only well-defined if P(t 4 ) = P(t 5 ) = 0, which is probably not what we want. P(t 2 )=P(t 3 )=0.5 t 2 t 3 t 4 t 5

Switching distributions Hence, knowledge of the marking process is necessary when defining switches. P(t 2 )=P(t 3 )=0.5 t 2 t 3 t 4 t 5

Switching distributions Even worse! Solution: define weights instead (as Bengt said). P(t 2 )=P(t 3 )=0.5 t 2 t 3 t 4 t 5

Embedded MC EMC: Observe a stochastic process {X (t), t T } only at the moment the state changes. Given a, the obtained process will be a DTMC, with transition matrix u ij = { t k E j (M i ) λ k/ t k E(M i ) λ k i j 0 i = j From the routing probabilities that we get from the EMC and the switching probabilities, the average sojourn time in each state of the marking process, we can find the steady-state probability of the marking process.

Example, revisited. µ 1, 0, 0, 1 θ λ m 1 λ 2, 0, 1, 0 1, 1, 1, 0 2λ µ 0, 1, 0, 1 λ θ 0, 2, 1, 0 µ 2, 0, 1, 0 1, 0, 0, 1 2λ µ λ 0, 1, 0, 1 µ

Probability of a certain place/event can be obtained by summing up the probabilites of the corresponding markings: P(p i ) = M i S(p i ) where π i is the steady-state distribution of m i in the underlying CTMC. The pmf of the number of tokens in a place p i gives us the average number of tokens in that place. π i

Example, ctd. Assume M 0 = 2, 0, 1, 0, M 1 = 1, 0, 0, 1 and M 2 = 0, 1, 0, 1. We solve the system, and get P(M 0 ), P(M 1 ), P(M 2 ). We interpret the places in some way: P(waiting) = P(m 2 > 0) = P(M 2 ) Average number of tokens in m 2, E(m 2 ) = 0P(M 0 ) + 0P(M 1 ) + P(M 2 ) t2 p 1 m 1 λ p 2 p 3 p 4 t 3 µ

Throughput and delay The throughput, or the mean number of firings of a transition t j : f j = M i G(t j ) λ j (M i )π i Little s law gives the average delay of a token passing through a subnet of the model: E(T ) = E(N) E(γ)

Throughput and delay We solve the system, and get P(M 0 ), P(M 1 ), P(M 2 ). Rate into the subnet (throughput of transition t 1 ): E(γ) = 2λP(M 0 ) + λp(m 1 ) E(N) = E(m 4 ) + E(m 2 ) = P(M 1 ) + P(M 2 ) + P(M 2 ) Average delay of one token: E(T ) = E(N) E(γ) = P(M 1) + 2P(M 2 ) 2λP(M 0 ) + λp(m 1 ) t2 t 3 p 1 m 1 λ p 2 p 3 p 4 µ

Relation with PN All structural results obtained from the underlying PN are valid for the as well. Completely deterministic PN: Adding inhibitor arcs gives them the same modeling power as turing machines (they can mimic any turing machine) : Adding inhibitor arcs does not increase the modeling power. (Haas). In fact, any with one or more inhibitor arc can be converted into an equivalent without inhibitor arcs. (immediate transitions are used)