Simulation of Discrete Event Systems

Similar documents
Queuing Theory. Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues

B. Maddah ENMG 622 ENMG /27/07

First come, first served (FCFS) Batch

CS/ECE 715 Spring 2004 Homework 5 (Due date: March 16)

Generalized Semi- Markov Processes (GSMP)

Announcements. Queueing Systems: Lecture 1. Lecture Outline. Topics in Queueing Theory

A queueing system can be described as customers arriving for service, waiting for service if it is not immediate, and if having waited for service,

TCOM 501: Networking Theory & Fundamentals. Lecture 3 January 29, 2003 Prof. Yannis A. Korilis

Queueing theory and Replacement model


SINGLE-CHANNEL QUEUING PROBLEMS APPROACH

Increasing timing capacity using packet coloring

c. Explain the basic Newsvendor model. Why is it useful for SC models? e. What additional research do you believe will be helpful in this area?

Reliability and Queueing

TUFTS UNIVERSITY DEPARTMENT OF CIVIL AND ENVIRONMENTAL ENGINEERING ES 152 ENGINEERING SYSTEMS Spring Lesson 14. Queue System Theory

7.1 Convergence of sequences of random variables

CEE 522 Autumn Uncertainty Concepts for Geotechnical Engineering

Simulation of Discrete Event Systems

Control chart for number of customers in the system of M [X] / M / 1 Queueing system

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

Chapter 11 Output Analysis for a Single Model. Banks, Carson, Nelson & Nicol Discrete-Event System Simulation

A New Solution Method for the Finite-Horizon Discrete-Time EOQ Problem

Markov Decision Processes

6.041/6.431 Spring 2009 Final Exam Thursday, May 21, 1:30-4:30 PM.

Axioms of Measure Theory

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

Discrete-Time Systems, LTI Systems, and Discrete-Time Convolution

CHAPTER 10 INFINITE SEQUENCES AND SERIES

Lecture Chapter 6: Convergence of Random Sequences

Product measures, Tonelli s and Fubini s theorems For use in MAT3400/4400, autumn 2014 Nadia S. Larsen. Version of 13 October 2014.

1 Introduction to reducing variance in Monte Carlo simulations

( ) = p and P( i = b) = q.

ECE-S352 Introduction to Digital Signal Processing Lecture 3A Direct Solution of Difference Equations

Sequences, Mathematical Induction, and Recursion. CSE 2353 Discrete Computational Structures Spring 2018

Massachusetts Institute of Technology

Queueing Theory II. Summary. M/M/1 Output process Networks of Queue Method of Stages. General Distributions

Ma 530 Introduction to Power Series

On Poisson Bulk Arrival Queue: M / M /2/ N with. Balking, Reneging and Heterogeneous servers

Limit Theorems. Convergence in Probability. Let X be the number of heads observed in n tosses. Then, E[X] = np and Var[X] = np(1-p).

Sequences and Series of Functions

Convergence of random variables. (telegram style notes) P.J.C. Spreij

The Random Walk For Dummies

ECE 308 Discrete-Time Signals and Systems

ADVANCED DIGITAL SIGNAL PROCESSING

Analysis of a queueing model with service threshold

Math 10A final exam, December 16, 2016

Distribution of Random Samples & Limit theorems

Time-Domain Representations of LTI Systems

Introduction to Extreme Value Theory Laurens de Haan, ISM Japan, Erasmus University Rotterdam, NL University of Lisbon, PT

Ma 530 Infinite Series I

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 19 11/17/2008 LAWS OF LARGE NUMBERS II THE STRONG LAW OF LARGE NUMBERS

Simulation. Two Rule For Inverting A Distribution Function

K. Grill Institut für Statistik und Wahrscheinlichkeitstheorie, TU Wien, Austria

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 15

Test of Statistics - Prof. M. Romanazzi

1.3 Convergence Theorems of Fourier Series. k k k k. N N k 1. With this in mind, we state (without proof) the convergence of Fourier series.

Machine Learning Brett Bernstein

Lecture 19: Convergence

Random Models. Tusheng Zhang. February 14, 2013

Spring Information Theory Midterm (take home) Due: Tue, Mar 29, 2016 (in class) Prof. Y. Polyanskiy. P XY (i, j) = α 2 i 2j

6.3 Testing Series With Positive Terms

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.265/15.070J Fall 2013 Lecture 3 9/11/2013. Large deviations Theory. Cramér s Theorem

Scheduling under Uncertainty using MILP Sensitivity Analysis

On forward improvement iteration for stopping problems

EE / EEE SAMPLE STUDY MATERIAL. GATE, IES & PSUs Signal System. Electrical Engineering. Postal Correspondence Course

MAT1026 Calculus II Basic Convergence Tests for Series

Application to Random Graphs

Math 155 (Lecture 3)

Lesson 10: Limits and Continuity

Statistical Pattern Recognition

An Introduction to Randomized Algorithms

4. Partial Sums and the Central Limit Theorem

ABOUT CHAOS AND SENSITIVITY IN TOPOLOGICAL DYNAMICS

Comparison Study of Series Approximation. and Convergence between Chebyshev. and Legendre Series

Birth-Death Processes. Outline. EEC 686/785 Modeling & Performance Evaluation of Computer Systems. Relationship Among Stochastic Processes.

Lecture 4. We also define the set of possible values for the random walk as the set of all x R d such that P(S n = x) > 0 for some n.

Recursive Algorithms. Recurrences. Recursive Algorithms Analysis

1 Convergence in Probability and the Weak Law of Large Numbers

DISTRIBUTION LAW Okunev I.V.

In this e-companion, we provide the proofs of propositions, lemmas, and corollaries appearing

Module 18 Discrete Time Signals and Z-Transforms Objective: Introduction : Description: Discrete Time Signal representation

Partial match queries: a limit process

Chapter 6 Infinite Series

w (1) ˆx w (1) x (1) /ρ and w (2) ˆx w (2) x (2) /ρ.

5 Birkhoff s Ergodic Theorem

6a Time change b Quadratic variation c Planar Brownian motion d Conformal local martingales e Hints to exercises...

Infinite Sequences and Series

Introduction to probability Stochastic Process Queuing systems. TELE4642: Week2

(average number of points per unit length). Note that Equation (9B1) does not depend on the

Stochastic Matrices in a Finite Field

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +

SEQUENCE AND SERIES NCERT

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018)

7.1 Convergence of sequences of random variables

ELEG 4603/5173L Digital Signal Processing Ch. 1 Discrete-Time Signals and Systems

Random Matrices with Blocks of Intermediate Scale Strongly Correlated Band Matrices

Lecture 7: October 18, 2017

CSI 2101 Discrete Structures Winter Homework Assignment #4 (100 points, weight 5%) Due: Thursday, April 5, at 1:00pm (in lecture)

Lecture 3 The Lebesgue Integral

NOTES ON DISTRIBUTIONS

Transcription:

Simulatio of Discrete Evet Systems Uit 9 Queueig Models Fall Witer 2014/2015 Uiv.-Prof. Dr.-Ig. Dipl.-Wirt.-Ig. Christopher M. Schlick Chair ad Istitute of Idustrial Egieerig ad Ergoomics RWTH Aache Uiversity Bergdriesch 27 52062 Aache phoe: 0241 80 99 440 email: c.schlick@iaw.rwth-aache.de

Cotets 1. Itroductio ad model specificatio 2. Performace ad dyamics 3. Simple markovia queueig systems 9-2

Focus of lecture ad exercise model static dyamic time-varyig time-ivariat liear oliear cotiuous states time-drive discrete states Focus of lecture ad exercise evet-drive determiistic stochastic discrete-time cotiuous-time 9-3

1. Itroductio ad Model Specificatio 1. Itroductio ad Model Specificatio 9-4

Approach A basic queueig system is a system, i which discrete objects of arbitrary type arrive, are queued for servig (processig) i a sigle queue that is operated uder a first-come-firstserved queueig regime, are processed i sequece, ad fially depart the system. Fuctio scheme: E = {a, d}; X = {0, 1, } Arrival of object (evet a) A(t) Queue X(t) Server (Processor) B(t) Object departure (evet d) Steps for geeralizatio of the basic model: 1. Specificatio of stochastic models for the arrival ad service processes 2. Specificatio of the structural parameters of the queueig system; for example, the storage capacity of the queue, the umber of servers ad so forth. 3. Specificatio of the operatig policies used; for example, coditios uder which arrivig objects are accepted, preferetial treatmet (prioritizatio) of some types of objects by the server ad so o. 9-5

1. Step i geeralizatio: Stochastic models for arrival ad service processes For the basic queueig model it is assumed that the timig of arrival evets a is govered by a sigle cotiuous probability distributio of iterarrival times A(t). Furthermore, the service timig is govered by a sigle cotiuous probability distributio B(t). The distributio of the waitig time ca be calculated o the basis of the state equatios. The solutio is represeted by distributio W(t). 1. Def.: - Iterarrival time: A(t) = P(Y <= t) - Expected (mea) arrival rate: = 1 / E(Y) - Service time: B(t) = P(Z <= t) - Expected service rate: = 1 / E(Z) - Waitig time: W(t) = P(W <= t) 9-6

2. Step i geeralizatio: Structural parameters 2. Def.: The storage capacity of the queue is deoted by the variable K = 1, 2,... ad specifies, how may objects ca be queued at maximum. A ifiite capacity is deoted by K =. 3. Def.: The umber of servers m = 1, 2,... deotes, how may parallel istaces of servers are available for processig of the objects i the queue. Example: 1. For the simple model we have K = ad m = 1 2. Multi-processor system with K = ad m servers: Server 1 Arrival of object (evet a) Queue 1... Object departure (evet d) m Server m 9-7

3. Step i geeralizatio: Operatig policies The operatig policies i a complex queueig system ca be categorized accordig to the followig factors: 1. Number of customer classes: I the case of a sigle-class system, all objects have the same service requiremets ad the server treats them all equally. This meas that the service time distributio is the same for all customers. I the case of a multiple-class system, objects are distiguished accordig to their service requiremets ad/or the way i which the server treats them. 2. Schedulig: I a multiple-class system, the server must decide upo a service completio of which class to process ext. For example, the server may always give priority to a particular class, or it may preempt a object i process because a higher priority object just arrived. 3. Queueig disciplies: A queueig disciplie describes the order i which the server selects objects to be processed, eve if there is oly a sigle class. For example, first-come-first-served (FCFS, like a physical queue), last-come-first-served (LCFS, like a physical stack), ad radom order. 4. Admissio policies: Eve if a queue has a ifiite storage capacity, it may be desirable to dey admissio to some arrivig objects. I the case of two arrivig classes, for istace, higher priority objects may always be admitted, but lower priority objects may oly be admitted if the queue is empty or if some amout of time has elapsed sice such a object was admitted. 9-8

The A/B/m/K Notatio 4. Def.: I the theory of queueig systems a specific stochastic queueig model is deoted by the tuple A/B/m/K, where - A represets the cotiuous probability distributio of the iterarrival time, - B represets the cotiuous probability distributio of the service time, - m is the umber of servers (or processors) preset, m = 1, 2, - K is the storage capacity of the queue (if K = the parameter is usually dropped). The probability distributios are categorized accordig to: - G: Geeral distributio whe othig else is kow about the arrival/service process - M: Markovia where the iterarrival/service times are expoetially distributed (see lecture 8) - D: Determiistic where the iterarrival/service times are costat. Examples: M/M/1: Simple Markovia queueig model of itroductory example from slide 9-5, satisfyig A(t) = 1 - e - t ad B(t) = 1 - e - t with, > 0. M/M/1/3: As before, but with fiite queue capacity of three objects. M/G/2: System with two processors ad ifiite queue capacity. The iterarrival time is expoetially distributed. The service time is stochastic but with o further costrait. 9-9

2. Performace ad Dyamics 2. Performace ad Dyamics 9-10

Performace measures 5. Def.: I order to aalyze the queueig system performace, the followig radom variables are defied: - A k : Arrival time of k-th object - D k : Departure time of k-th object - Y k = A k A k-1 : Iterarrival time betwee object k ad k-1 - W k : Waitig time of k-th object (from arrival istat util service begiig) - Z k : Service time of k-th object (from service begiig istat util service departure) - S k = D k - A k = W k + Z k : System time of k-th object (from arrival istat util service departure) - X(t): Queue legth at time t (X(t) {0, 1,...}) 6. Def.: The characteristic performace idicators of a queueig system are: - E(W): Expected (average) waitig time of the object - E(S): Expected system time of objects - E(X): Expected queue legth - System utilizatio : The fractio of time that the server is busy - Throughput : The rate at which objects leave the system after service All these quatities are cosidered i the steady queueig system state, that is, i the limit t. 9-11

System dyamics 1. Propositio: The dyamics of G/G/1 queueig systems is specified by the followig recursive state equatios: - W k = max(0, W k-1 + Z k-1 - Y k ) - S k = max(0, S k-1 - Y k ) + Z k - D k = max(a k, D k-1 ) + Z k Usually, it is assumed that the queue is iitially empty ad W 0 = 0, Z 0 = 0, S 0 = 0 ad D 0 = 0 Example: 9-12

Example of system dyamics (cotiued) Whe the k-th object arrives two cases are possible: 1. Case: The system is empty => D k-1 <= A k - Z k = D k - A k - Y k = A k - A k-1 => W k = max(0, W k-1 + Z k-1 - Y k ) = max(0, 0 + D k-1 A k-1 - A k + A k-1 ) = max(0, D k-1 - A k ) = 0, because D k - A k+1 < 0 accordig to iitial assumptio (see 4 = 0 as result of d 3 < a 4 i previous figure) => S k = Z k => D k = A k + Z k 2. Case: The system is ot empty => W k = D k-1 - A k > 0 - Z k = D k - A k W k - Y k = A k - A k-1 => W k = max(0, W k-1 + Z k-1 - Y k ) = max(0, 0 + D k-1 A k-1 - A k + A k-1 ) = max(0, D k-1 - A k ) = D k-1 - A k, because D k-1 - A k > 0 accordig to iitial assumptio => S k = S k-1 - Y k + Z k => D k = D k-1 + Z k 9-13

Little s law 2. Propositio: I a queueig system with arbitrary operatig policies ad arbitrary cofiguratios amog system queues / system servers i the steady state Little s law holds: E S E X : object arrival rate Example: I case of the G/G/1 queueig model with E = {a, d} the queue legth X(t) ca be calculated o the basis of the evet scores (t) such as X(t) = a (t) - d (t). The sample path of arrival ad departure score processes may look like: The shaded area u(t) is formed by the rectagles represetig the amout of time spet by the k-th object i the system ad therefore deotes the total amout of time all objects spet i the system by time t. 9-14

Example of Little s law (cotiued) The average system time per object is: The average queue legth is: The average object arrival rate is: st () x ut () t ut () () a t a () () t t t => x ( t) s ( t) We assume the followig limits to exist: lim ( t) =>, t lim s ( t) s t x s equivaletly we have E( X ) E( S) for a ifiite sample 9-15

3. Simple Markovia Queueig Systems 3. Simple Markovia Queueig Systems 9-16

Birth-death chai Startig poit of the aalysis is the discrete-state discrete-time birth-death chai of the previous lecture: This Markov chai ca be geeralized towards a cotiuous-time process. To do so, the birth ad death rates i steady state are cosidered; the resultig chai ca be modeled as: j 1 EY j Due to the Markov property the birth ad death processes ca be modeled o the basis of expoetial probability distributios with distict rates. 1 j E Z j 9-17

Steady state aalysis of a geeralized birth-death process 3. propositio: The state probabilities i steady state of a cotiuous-time birth-dead process with birth rates 0, 1,... ad death rates 1, 2,... are: 0 1 0 1 0 1 1 0 1 1 1 ( 1,2,...) with Please recall, for istace, that the state trasitio fuctio of M/M/1 queueig systems ca be simply writte as f(x, a) = x+1 ad f(x, d) = x-1 as log as x > 0. Thus, we may thik of a arrival evet as a birth ad a departure evet as a death, ad hece the system ca be modeled as a birth-death chai: x Server f(x, a) = x + 1 f(x, d) = x - 1 The state probabilities i the steady state of a birth-death chai therefore are equivalet to the expected umber of objects beig queued (queue legth) i the queueig system. 9-18

Steady state aalysis of M/M/1 queueig systems (I) We iitially cosider a M/M/1 system, this is a sigle-server system with ifiite storage capacity ad expoetially distributed iterarrival ad service times. Such a system ca be modeled as a birth-death chai with the followig parameters: for all 0,1,... for all 1,2,... State trasitio diagram of the M/M/1 system: Whe these parameters are plugged ito the equatios of propositio 3, the state probabilities of a M/M/1 queueig system ca be derived easily as show o the ext slide. 9-19

Steady state aalysis of a M/M/1 queueig system (II) 4. Propositio: The state probabilities i terms of a statioary probability distributio of the queue legth of a M/M/1 queueig system i steady state are: 0 1 1 1 1 1 (if 1 the geometric series coverges) 1 1 1 with [0;1]: system utilitzatio 1 5. Propositio: The performace idicators of a M/M/1 queueig system i steady state are: 1 E( W ) E( S) E( X ) 1 1 1 M / M /1 0 1 1 M / M /1 0 9-20

Example of expected system time of a M/M/1 queueig systems E(S) 1 / M / M /1 This figure illustrates the tradeoff betwee keepig the utilizatio high (good for the ower of a productio system) ad keepig the average system time low (good for the customer waitig for delivery). As the utilizatio icreases, the expected system time is iitially isesitive to chages (the slope is close to 0). It the suddely becomes very sesitive (as the slope rapidly approaches ifiity). A good operatig area is determied by a idividual weightig of the costs of uderutilized machies ad delays i service. 9-21

Steady state aalysis of M/M/m systems (I) Whe cosiderig a M/M/m system a object is served by ay oe available server. If all servers are busy, the object is queued util the ext departure frees a server. The effective service rate depeds o the state of the system. If there are < m objects preset, the there are servers busy ad the service rate is. If >= m objects are preset, the service rate is fixed at its maximum value m. Therefore, we model the system as a birth-death chai with these birth ad death parameters: for all 0,1,... if 1 m m if m State trasitio diagram of the M/M/m system: 9-22

9-23 6. Propositio: The state probabilities of a M/M/m queueig system i steady state are: 1 1 0 1 0 0 1 1!! 1 1,2,..., 1!, 1,...! m m m m m m m m m m m m Steady state aalysis of M/M/m systems (II)

Steady state aalysis of M/M/m systems (III) 7. Propositio: The performace idicators of a M/M/m queueig system i steady state are: EW ( ) ES ( ) M / M / m M / M / m 1 E( X ) m m m m 0 m! m(1 ) 1 1 m 0 m! m(1 ) m m 2 m 0 m! (1 ) 2 ( average umber of busy servers) 2 ( at steady state arrival ad departure rates must be balaced ) 9-24

Example of expected system time of a M/M/m queueig system E(S) m=1 m=2... 1 / m=10 M / M / m Clearly, if additioal servers support the processig, the tradeoff betwee keepig the utilizatio high ad keepig the average system time low is shifted towards a higher system utilizatio. 9-25

Steady state aalysis of M/M/ systems (I) Fially, the M/M/ queueig system is aalyzed as a special case of the M/M/m system. If the queue capacity is ifiite, the previous case differetiatio cocerig the umber of objects i relatio to the umber of servers is ot ecessary ad we simply have: for all 0,1,... for all 1,2,... State trasitio diagram of the M/M/ system: 9-26

Steady state aalysis of M/M/ systems (II) 8. Propositio: The state probabilities of a M/M/ queueig system i steady state are equal to the statioary state probabilities of a Poisso process with the poit desity parameter (utilizatio as expected umber of busy servers): 0 1 1 e 1! e ( Poisso distributio, 1,2,...)! Numerical distributio example for poit desity = 5: ( 5) 9-27

Steady state aalysis of M/M/ systems (III) 9. Propositio: The performace idicators of a M/M/ queueig system i steady state are: EW ( ) 0 1 ES ( ) E( X ) ( X represets the umber of busy servers) M / M / M / M / 1e ( arrival ad departure rates must be balaced) 9-28

Expected system time of M/M/ queueig systems E(S) 1 / M/ M/ 9-29

Refereces CASSANDRAS, C.,G.; LAFORTUNE, S. (2007): Itroductio to Discrete Evet Systems. 2 d editio. Bosto (MA): Kluwer Academic Publishers. PAPOULIS, A.; PILLAI, S.U. (2002): Probability, Radom Variables ad Stochastic Processes. Forth Editio. Bosto (MA): Mc Graw Hill. 9-30

Questios? Ope Questios??? 9-31