Äriprotsesside modelleerimine ja automatiseerimine Loeng 8 Järjekorrateooria ja äriprotsessid. Enn Õunapuu

Similar documents
Äriprotsesside modelleerimine ja automatiseerimine Loeng 9 Järjekorrateooria ja äriprotsessid. Enn Õunapuu

Lecture 7 Quantitative Process Analysis II

Introduction to Queuing Systems

Lecture 5: Performance Analysis I

Introduction to Performance Engineering and Modeling

Queuing Systems. 1 Lecturer: Hawraa Sh. Modeling & Simulation- Lecture -4-21/10/2012

Read Chapter 4 of Kurose-Ross

Introduction to Performance Engineering and Modeling

Queuing Networks Modeling Virtual Laboratory

UNIT 4: QUEUEING MODELS

Teletraffic theory I: Queuing theory

TELCOM 2130 Queueing Theory. David Tipper Associate Professor Graduate Telecommunications and Networking Program. University of Pittsburgh

Fundamentals of Queueing Models

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

Review. EECS 252 Graduate Computer Architecture. Lec 18 Storage. Introduction to Queueing Theory. Deriving Little s Law

Queueing Models. System Capacity the number of customers who are allowed to be in the system at any given time.

Teletraffic theory (for beginners)

Why is scheduling so difficult?

Advanced Internet Technologies

BANK ATM QUEUEING MODEL: A CASE STUDY Ashish Upadhayay* 1

Airside Congestion. Airside Congestion

Using Queuing theory the performance measures of cloud with infinite servers

A Comparative Approach to Reduce the Waiting Time Using Queuing Theory in Cloud Computing Environment

Cover sheet for Assignment 3

Module 7:Application of stochastic processes in queueing theory Lecture 29:Application of stochastic processes in Queueing Theory

QUEUING SYSTEM. Yetunde Folajimi, PhD

A Rant on Queues. Van Jacobson. July 26, MIT Lincoln Labs Lexington, MA

M/G/c/K PERFORMANCE MODELS

Stochastic Processing Networks: What, Why and How? Ruth J. Williams University of California, San Diego

Mean Value Analysis and Related Techniques

Volume 5, No. 2, May -June, 2013, ISSN

Markov Chains and Multiaccess Protocols: An. Introduction

MODELS FOR QUEUING SYSTEMS

3. Examples. Contents. Classical model for telephone traffic (1) Classical model for telephone traffic (2)

Modeling and Performance Analysis with Discrete-Event Simulation

GBA 334 Module 6 Lecture Notes Networks and Queues. These notes will cover network models and queuing theory.

Modeling and Simulation (An Introduction)

Multi-threaded, discrete event simulation of distributed computing systems

ROORKEE COLLEGE OF ENGINEERING

DDSS: Dynamic Dedicated Servers Scheduling for Multi Priority Level Classes in Cloud Computing

Table 9.1 Types of Scheduling

An Efficient Queuing Model for Resource Sharing in Cloud Computing

Chapter 5. Minimization of Average Completion Time and Waiting Time in Cloud Computing Environment

CS370 Operating Systems

Slides 11: Verification and Validation Models

Forecasting Oracle Performance

CS 3640: Introduction to Networks and Their Applications

Lecture 22: Buffering & Scheduling. CSE 123: Computer Networks Alex C. Snoeren

Queuing Networks. Renato Lo Cigno. Simulation and Performance Evaluation Queuing Networks - Renato Lo Cigno 1

ETSN01 Exam Solutions

* Department of Computer Science, University of Pisa, Pisa, Italy Department of Elect. Engineering, University of Roma Tor Vergata, Rome, Italy

Resource allocation in networks. Resource Allocation in Networks. Resource allocation

Perspectives on Network Calculus No Free Lunch but Still Good Value

Chapter 10 Verification and Validation of Simulation Models. Banks, Carson, Nelson & Nicol Discrete-Event System Simulation

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)

Power Laws in ALOHA Systems

CS162 Operating Systems and Systems Programming Lecture 17. Disk Management and File Systems

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

This formula shows that partitioning the network decreases the total traffic if 1 N R (1 + p) < N R p < 1, i.e., if not all the packets have to go

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Queueing Networks. Lund University /

TCP performance analysis through. processor sharing modeling

Application of QNA to analyze the Queueing Network Mobility Model of MANET

Operating Systems and Networks Recitation Session 4

EP2200 Queueing theory and teletraffic systems

Analytic Performance Models for Bounded Queueing Systems

Network Performance Analysis

ON NEW STRATEGY FOR PRIORITISING THE SELECTED FLOW IN QUEUING SYSTEM

Fuzzy Queueing Model Using DSW Algorithm

Network Performance: Queuing

Simulation Studies of the Basic Packet Routing Problem

Calculating Call Blocking and Utilization for Communication Satellites that Use Dynamic Resource Allocation

10. Network planning and dimensioning

Mean Value Analysis and Related Techniques

Determining the Number of CPUs for Query Processing

PARALLEL ALGORITHMS FOR IP SWITCHERS/ROUTERS

Homework 2: Implementing a Firewall with Load Sharing

EP2200 Queueing theory and teletraffic systems

Implementation of Queuing Models on Cloud Computing Based Data Centers

Lecture 14: Congestion Control"

Introduction to the course

048866: Packet Switch Architectures

CS 556 Advanced Computer Networks Spring Solutions to Midterm Test March 10, YOUR NAME: Abraham MATTA

Äriprotsesside modelleerimine ja automatiseerimine Loeng 5 Äriprotsesside modelleerimine BPMN. Enn Õunapuu

Queueing Theory. M/M/1 and M/M/m Queues

Äriprotsesside modelleerimine ja automatiseerimine Loeng 5 Äriprotsesside modelleerimine BPMN. Enn Õunapuu

WHITE PAPER. Latency & Jitter WHITE PAPER OVERVIEW

CPU Scheduling: Objectives

CS162 Operating Systems and Systems Programming Lecture 17. Disk Management and File Systems

Network Traffic Characterisation

Flow Control. Flow control problem. Other considerations. Where?

Advanced Computer Networks

Scheduling. Monday, November 22, 2004

Multiple Access Communications. EEE 538, WEEK 11 Dr. Nail Akar Bilkent University Electrical and Electronics Engineering Department

Announcements. Network Performance: Queuing. Goals of Today s Lecture. Window Scaling. Window Scaling, con t. Window Scaling, con t

WEB OBJECT SIZE SATISFYING MEAN WAITING TIME IN MULTIPLE ACCESS ENVIRONMENT

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

70 CHAPTER 1 COMPUTER NETWORKS AND THE INTERNET

Web application performance

Scheduling Monday, November 22, :22 AM

Transcription:

Äriprotsesside modelleerimine ja automatiseerimine Loeng 8 Järjekorrateooria ja äriprotsessid Enn Õunapuu enn@cc.ttu.ee

Kava Järjekorrateooria Näited Järeldused Küsimused

Loengu eesmärk Loengu eesmärgiks on anda alus mõningate tähtsate protsesside optimeerimiseks

Queuing theory definitions (Bose) the basic phenomenon of queueing arises whenever a shared facility needs to be accessed for service by a large number of jobs or customers. (Wolff) The primary tool for studying these problems [of congestions] is known as queueing theory. (Kleinrock) We study the phenomena of standing, waiting, and serving, and we call this study Queueing Theory." "Any system in which arrivals place demands upon a finite capacity resource may be termed a queueing system. (Mathworld) The study of the waiting times, lengths, and other properties of queues. http://www2.uwindsor.ca/~hlynka/queue.html CS352 Fall,2005 5

Applications of Queuing Theory Telecommunications Traffic control Determining the sequence of computer operations Predicting computer performance Health services (eg. control of hospital bed assignments) Airport traffic, airline ticket sales Layout of manufacturing systems. In computers, jobs share many resources: CPU, disks, devices Only one can access at a time, and others must wait in queues Queuing theory helps http://www2.uwindsor.ca/~hlynka/queue.html determine time jobs spend in queue CS352 Fall,2005 6

Example application of queuing theory In many retail stores and banks multiple line/multiple checkout system a queuing system where customers wait for the next available cashier We can prove using queuing theory that : throughput improves increases when queues are used instead of separate lines http://www.andrews.edu/~calkins/math/webtexts/prod10.htm#q CS352 Fall,2005 7

Why flow analysis is not enough? Flow analysis does not consider waiting times due to resource contention Queuing analysis and simulation address these limitations and have a broader applicability

Why is Queuing Analysis Important? Capacity problems are very common in industry and one of the main drivers of process redesign Need to balance the cost of increased capacity against the gains of increased productivity and service Queuing and waiting time analysis is particularly important in service systems Large costs of waiting and of lost sales due to waiting Prototype Example ER at a Hospital Patients arrive by ambulance or by their own accord One doctor is always on duty More patients seeks help longer waiting times Question: Should another MD position be instated? Laguna & Marklund

Delay is Caused by Job Interference Deterministic traffic Variable but spaced apart traffic If arrivals are regular or sufficiently spaced apart, no queuing delay occurs Dimitri P. Bertsekas

Burstiness Causes Interference Queuing results from variability in service times and/or interarrival intervals Dimitri P. Bertsekas

Job Size Variation Causes Interference Deterministic arrivals, variable job sizes Dimitri P. Bertsekas

High Utilization Exacerbates Interference The queuing probability increases as the load increases Utilization close to 100% is unsustainable too long queuing times Dimitri P. Bertsekas

The Poisson Process Common arrival assumption in many queuing and simulation models The times between arrivals are independent, identically distributed and exponential P (arrival < t) = 1 e -λt Key property: The fact that a certain event has not happened tells us nothing about how long it will take before it happens e.g., P(X > 40 X >= 30) = P (X > 10) Laguna & Marklund

Negative Exponential Distribution

Queuing theory: basic concepts arrivals waiting service l Basic characteristics: l (mean arrival rate) = average number of arrivals per time unit m (mean service rate) = average numberof jobs that can be handled by one server per time unit: c = number of servers c m Wil van der Aalst

Queuing theory concepts (cont.) l Wq,Lq W,L c m Given l, m and c, we can calculate : occupation rate: r Wq = average time in queue W = average system in system (i.e. cycle time) Lq = average number in queue (i.e. length of queue) L = average number in system average (i.e. Work-in-Progress) Wil van der Aalst

M/M/1 queue l Assumptions: time between arrivals and service time follow a negative exponential distribution 1 server (c = 1) FIFO L=r/(1- r) 1 ρ W=L/l=1/(m- l) m Capacity Demand Available Capacity λ μ L q = r 2 /(1- r) = L-r Wq=Lq/l= l /( m(m- l)) Laguna & Marklund

M/M/c queue Now there are c servers in parallel, so the expected capacity per time unit is then c*m r Capacity Demand Available Capacity l c* m Little s Formula Wq=Lq/l W=Wq+(1/m) Little s Formula L=lW Laguna & Marklund

Tool Support For M/M/c systems, the exact computation of Lq is rather complex Consider using a tool, e.g. http://apps.business.ualberta.ca/aingolfsson/qtp/ http://www.stat.auckland.ac.nz/~stats255/qsim/qsim.html 0 2 c c n n q P ) c!(1 ) / (... c)p (n L r r m l 1 c 1 c 0 n n 0 ) /(c ( 1 1 c! ) / ( n! ) / ( P m l m l m l

Example ER at County Hospital Situation Patients arrive according to a Poisson process with intensity l ( the time between arrivals is exp(l) distributed. The service time (the doctor s examination and treatment time of a patient) follows an exponential distribution with mean 1/m (=exp(m) distributed) The ER can be modeled as an M/M/c system where c=the number of doctors Data gathering l = 2 patients per hour m = 3 patients per hour Question Should the capacity be increased from 1 to 2 doctors? Laguna & Marklund

Queuing Analysis Hospital Scenario Interpretation To be in the queue = to be in the waiting room To be in the system = to be in the ER (waiting or under treatment) Characteristic One doctor (c=1) Two Doctors (c=2) r 2/3 1/3 Lq 4/3 patients 1/12 patients L 2 patients 3/4 patients Wq 2/3 h = 40 minutes 1/24 h = 2.5 minutes W 1 h 3/8 h = 22.5 minutes Is it warranted to hire a second doctor? Laguna & Marklund

Process Simulation Drawbacks of queuing theory: Generally not applicable when system includes parallel activities Requires case-by-case mathematical analysis Assumes steady-state (valid only for long-term analysis) Process simulation is more versatile (also more popular) Process simulation = run a large number of process instances, gather data (cost, duration, resource usage) and calculate statistics from the output

Process Simulation Steps in evaluating a process with simulation 1. Model the process (e.g. BPMN) 2. Enhance the process model with simulation info simulation model - Based on assumptions or better based on data (logs) 3. Run the simulation 4. Analyze the simulation outputs 1. Process duration and cost stats and histograms 2. Waiting times (per activity) 3. Resource utilization (per resource) 5. Repeat for alternative scenarios

Elements of a simulation model The process model including: Events, activities, control-flow relations (flows, gateways) Resource classes (i.e. lanes) Resource assignment Mapping from activities to resource classes Processing times Per activity or per activity-resource pair Costs Per activity and/or per activity-resource pair Arrival rate of process instances Conditional branching probabilities (XOR gateways)

Simulation Example BPMN model Receive info Request info No accept Deliver card Start Check for completeness complete? Yes Perform checks Make decision Decide reject Notify acceptance End Notify rejection review request Time out reviiew Receive review request

Resource Pools (Roles) Two options to define resource pools E.g. Define individual resources of type clerk Or assign a number of anonymous resources all with the same cost 3 anonymous clerks with cost of 10 per hour, 8 hours per day 2 individually named clerks - Jim: 12.4 per hour - Mike: 14.8 per hour 1 manager John at 20 per hour, 8 hours per day

Resource pools and execution times Task Role Execution Time Normal distribution: mean and std deviation Receive application system 0 0 Check completeness Clerk 30 mins 10 mins Perform checks Clerk 2 hours 1 hour Request info system 1 min 0 Receive info (Event) system 48 hours 24 hours Make decision Manager 1 hour 30 mins Notify rejection system 1 min 0 Time out (Time) system 72 hours 0 Receive review request (Event) system 48 hours 12 hours Notify acceptance system 1 min 0 Deliver Credit card system 1 hour 0 Alternative: assign execution times to the tasks only (like in cycle time analysis)

Reminder: Normal Distribution

Arrival rate and branching probabilities 10 applications per hour (one at a time) Poisson arrival process (negative exponential) No Receive info Request info 0.3 0.5 accept Deliver card Start Receive review request Check for completeness complete? Yes 0.7 Perform checks reviiew Make decision 0.2 Decide 0.5 reject Notify acceptance Notify rejection 0.8 Time out review request End Alternative: instead of branching probabilities one can assign conditional expressions to the branches based on input data

# PI's Simulation output: KPIs Resource Resource Utilization Cost 100.00% 4,500.00 $ 4,260.95 90.00% 4,000.00 80.00% 3,500.00 70.00% 3,000.00 60.00% 2,500.00 50.00% 2,000.00 40.00% 1,500.00 30.00% 1,000.00 20.00% 12 10 18.82% $ 898.458 50.34% Cycle Time - Histogram 10.00% 500.00 6 $ 5.04% 285.00 0.00% 4 Clerk 2 Manager System 0 0 10 20 30 40 50 60 Days

Simulation output: detailed logs Process Instance # Activities Start End Cycle Time Cycle Time (s) Total Time 6 5 4/06/2007 13:00 4/06/2007 16:26 03:26:44 12403.586 03:26:44 7 5 4/06/2007 14:00 5/06/2007 9:30 19:30:38 70238.376 19:30:38 Process Instance Activity ID Activity Name Activity Type Resource Start End 11 5 4/06/2007 18:00 5/06/2007 12:14 18:14:56 65695.612 18:14:56 6aed54717-f044-4da1-b543-82a660809ecb Check for completeness Task Manager 4/06/2007 13:00 4/06/2007 13:53 13 5 4/06/2007 20:00 5/06/2007 13:14 17:14:56 62095.612 17:14:56 6a270f5c6-7e16-42c1-bfc4-dd10ce8dc835 Perform checks Task Clerk 4/06/2007 13:53 4/06/2007 15:25 16 5 4/06/2007 23:00 5/06/2007 15:06 16:06:29 57989.23 16:06:29 677511d7c-1eda-40ea-ac7d-886fa03de15b Make decision Task Manager 4/06/2007 15:25 4/06/2007 15:26 22 5 5/06/2007 5:00 6/06/2007 10:01 29:01:39 104498.797 29:01:39 6099a64eb-1865-4888-86e6-e7de36d348c2 Notify acceptance IntermediateEvent (none) 4/06/2007 15:26 4/06/2007 15:26 27 8 5/06/2007 10:00 6/06/2007 12:33 26:33:21 95600.649 26:33:21 60a72cf69-5425-4f31-8c7e-6d093429ab04 Deliver card Task System 4/06/2007 15:26 4/06/2007 16:26 7aed54717-f044-4da1-b543-82a660809ecb Check for completeness Task Manager 4/06/2007 14:00 4/06/2007 14:31 7a270f5c6-7e16-42c1-bfc4-dd10ce8dc835 Perform checks Task Clerk 4/06/2007 14:31 5/06/2007 8:30

Example application of queuing theory http://www.bsbpa.umkc.edu/classes/ashley/chaptr14/sld006.htm CS352 Fall,2005 33

Queuing theory for studying networks View network as collections of queues FIFO data-structures Queuing theory provides probabilistic analysis of these queues Examples: Average length Average waiting time Probability queue is at a certain length Probability a packet will be lost CS352 Fall,2005 34

Little s Law Arrivals System Departures Little s Law: Mean number tasks in system = mean arrival rate x mean response time Observed before, Little was first to prove Applies to any system in equilibrium, as long as nothing in black box is creating or destroying tasks CS352 Fall,2005 35

2. Service time distribution 1. Arrival Process Queue 5. Customer Population Queueing Notation 4. Server Capacity= # of seats for customer waiting for service + # of servers 3. Number of Servers Chapter 30 Introduction to Queueing Theory 36

Arrival process Let s say customers arrive at t 1,t 2,,t j Random variables j =t j -t j-1 are inter arrival times. Usually assume inter arrival times j are independent, identically distributed (IID). Most common arrival processes are Poisson arrivals: if inter arrival times are IID and exponentially distributed, then the arrival rate follows a Poisson distribution Poisson Process Service time distribution Amount of time each customer spends at the server Again, usually assume IID Most commonly used distribution is the exponential distribution. Chapter 30 Introduction to Queueing Theory 37

Number of servers If servers are not identical, divide them into groups of identical servers with separate queues for each group Each group is a queuing system System capacity the number of places for waiting customers + the number of servers Population size: The total number of potential customers who can ever come to the system. Service discipline: The order where the customers are served. (e.g., FCFS, LCFS, RR, etc) Chapter 30 Introduction to Queueing Theory 38

Kendall notation A/S/m/B/K/SD A is Arrival time distribution S is Service time distribution m is number of servers B is number of buffers (system capacity) K is population size SD is service discipline Chapter 30 Introduction to Queueing Theory 39

Kendall notation The distributions for interarrival time and service times are generally denoted by M Exponential (M means memoryless in that the current arrival is independent of the past) E k Erlang with parameter k H k Hyperexponential with parameter k D Deterministic (time are constant) G General (the results are valid for all distributions) Assume only individual arrivals (no bulk arrivals) Chapter 30 Introduction to Queueing Theory 40

Notation Example M/M/3/20/1500/FCFS single queue system with: Exponentially distributed arrivals Exponentially distributed service times Three servers Capacity 20 (17 spaces for waiting customers) Population is 1500 total Service discipline is FCFS Often, assume infinite queue and infinite population and FCFS, so just M/M/3 Chapter 30 Introduction to Queueing Theory 41

Time Previous arrival Arrival Begin Service End Service = interarrival time l = mean arrival rate = 1/E[ ] s = service time per job m = mean service rate per server w s = 1/E[s] (total service rate for m servers is mm) r n q = number of jobs waiting to receive service. n s = number of jobs receiving service n = number of jobs in system n = n q + n s r = response time = w + s w = waiting time Note that all of these variables are random variables except for l and m. Chapter 30 Introduction to Queueing Theory 42

Rules for All Queues Stability Condition If the number of jobs becomes infinite, the system is unstable. For stability, the mean arrival rate less than the mean service rate. l < mm Does not apply to finite buffer system or the finite population systems They are always stable. - Finite population: queue length is always finite. - Finite buffer system: arrivals are lost when the number of jobs in the system exceed the system capacity. Chapter 30 Introduction to Queueing Theory 43

Rules for All Queues Number in System vs. Number in Queue n = n q + n s E[n] = E[n q ]+E[n s ] Also, if the service rate of each server is independent of the number in queue Cov(n q,n s ) = 0 Var[n] = Var[n q ]+Var[n s ] Chapter 30 Introduction to Queueing Theory 44

Rules for All Queues Number vs. Time (Little s law) If jobs are not lost due to buffer overflow, the mean jobs is related to its mean response time as follows: mean number of jobs in system time Similarly = arrival rate x mean response mean jobs in queue = arrival rate x mean waiting time For finite buffers can use effective arrival rate, that is, the rate of jobs actually admitted to the system. Chapter 30 Introduction to Queueing Theory 45

Rules for All Queues Time in System vs. Time in Queue Time spent in system, response time, is the sum of waiting time and service time r = w + s In particular: E[r] = E[w] + E[s] If the service rate is independent of jobs in queue Cov(w,s) = 0 Var[r] = Var[w] + Var[s] Chapter 30 Introduction to Queueing Theory 46

Applying Little s Law Example: A disk server satisfies an I/O request in average of 100 msec. I/O rate is about 100 requests/sec. What is the mean number of requests at the disk server? Mean number at server = arrival rate x response time = (100 requests/sec) x (0.1 sec) = 10 requests Chapter 30 Introduction to Queueing Theory 47

Importance of the Queuing Theory -Improve Customer Service, continuously. -When a system gets congested, the service delay in the system increases. A good understanding of the relationship between congestion and delay is essential for designing effective congestion control for any system. Queuing Theory provides all the tools needed for this analysis.

Queuing Models Calculates the best number of servers to minimize costs. Different models for different situations (Like SimQuick, we noticed different measures for arrival and service times) Exponential Normal Constant Etc.

Queuing Models Calculate: Average number of customers in the system waiting and being served Average number of customers waiting in the line Average time a customer spends in the system waiting and being served Average time a customer spends waiting in the waiting line or queue. Probability no customers in the system Probability n customers in the system Utilization rate: The proportion of time the system is in use.

Assumptions Different for every system. Variable service times and arrival times are used to decide what model to use. Not a complex problem: Queuing Theory is not intended for complex problems. We have seen this in class, where this are many decision points and paths to take. This can become tedious, confusing, time consuming, and ultimately useless.

Examples of Queuing Theory Outside customers (Commercial Service Systems) - Barber shop, bank teller, cafeteria line Transportation Systems - Airports, traffic lights Social Service Systems -Judicial System, healthcare Business or Industrial Production lines

How the Queuing Theory is used in Supply Chain Management Supply Chain Management use simulations and mathematics to solve many problems. The Queuing Theory is an important tool used to model many supply chain problems. It is used to study situations in which customers (or orders placed by customers) form a line and wait to be served by a service or manufacturing facility. Clearly, long lines result in high response times and dissatisfied customers. The Queuing Theory may be used to determine the appropriate level of capacity required at manufacturing facilities and the staffing levels required at service facilities, over the nominal average capacity required to service expected demand without these surges.

Questions? 54