1 of 35

����Dr. K. KRISHNAN Ph.D.�ASSISTANT PROFESSOR & RESEARCH SUPERVISOR�C. P. A. COLLEGE – BODINAYAKANUR���INTRODUCTION TO �QUEUING SYSTEMS

17. 12. 2021

1

2 of 35

Overview

  • What is queuing/ queuing theory?
    • Why is it an important tool?
    • Examples of different queuing systems
  • Components of a queuing system
  • The exponential distribution & queuing
  • Stochastic processes
    • Some definitions
    • The Poisson process
  • Terminology and notation
  • Little’s formula
  • Birth and Death Processes

2

3 of 35

What is Queuing Theory?

  • Mathematical analysis of queues and waiting times in stochastic systems.
    • Used extensively to analyze production and service processes exhibiting random variability in market demand (arrival times) and service times.
  • Queues arise when the short term demand for service exceeds the capacity
    • Most often caused by random variation in service times and the times between customer arrivals.
    • If long term demand for service > capacity the queue will explode!

3

4 of 35

  • 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 County Hospital

  • Patients arrive by ambulance or by their own accord
  • One doctor is always on duty
  • More and more patients seeks help ⇒ longer waiting times
  • Question: Should another MD position be instated?

4

Why is Queuing Analysis Important?

5 of 35

5

Process capacity

Cost

Cost of waiting

Cost of

service

Total

cost

A Cost/Capacity Tradeoff Model

6 of 35

  • Commercial Queuing Systems
    • Commercial organizations serving external customers
    • Ex. Dentist, bank, ATM, gas stations, plumber, garage …
  • Transportation service systems
    • Vehicles are customers or servers
    • Ex. Vehicles waiting at toll stations and traffic lights, trucks or ships waiting to be loaded, taxi cabs, fire engines, elevators, buses …
  • Business-internal service systems
    • Customers receiving service are internal to the organization providing the service
    • Ex. Inspection stations, conveyor belts, computer support …
  • Social service systems
    • Ex. Judicial process, the ER at a hospital, waiting lists for organ transplants or student dorm rooms …

6

Examples of Real World Queuing Systems?

7 of 35

7

Components of a Basic Queuing Process

Calling Population

Queue

Service Mechanism

Input Source

The Queuing System

Jobs

Arrival Process

Queue Configuration

Queue Discipline

Served Jobs

Service Process

leave the system

8 of 35

8

9 of 35

9

10 of 35

  • The calling population
    • The population from which customers/jobs originate
    • The size can be finite or infinite (the latter is most common)
    • Can be homogeneous (only one type of customers/ jobs) or heterogeneous (several different kinds of customers/jobs)
  • The Arrival Process
    • Determines how, when and where customer/jobs arrive to the system
    • Important characteristic is the customers’/jobs’ inter-arrival times
    • To correctly specify the arrival process requires data collection of interarrival times and statistical analysis.

10

Components of a Basic Queuing Process

11 of 35

  • The Service Mechanism
    • Can involve one or several service facilities with one or several parallel service channels (servers) - Specification is required
    • The service provided by a server is characterized by its service time
      • Specification is required and typically involves data gathering and statistical analysis.
      • Most analytical queuing models are based on the assumption of exponentially distributed service times, with some generalizations.
  • The queue discipline
    • Specifies the order by which jobs in the queue are being served.
    • Most commonly used principle is FIFO.
    • Other rules are, for example, LIFO, SPT, EDD…
    • Can entail prioritization based on customer type.

11

Components of a Basic Queuing Process

12 of 35

  1. Concealing the queue from arriving customers
    • Ex. Restaurants divert people to the bar or use pagers, amusement parks require people to buy tickets outside the park, banks broadcast news on TV at various stations along the queue, casinos snake night club queues through slot machine areas.
  2. Use the customer as a resource
    • Ex. Patient filling out medical history form while waiting for physician
  3. Making the customer’s wait comfortable and distracting their attention
    • Ex. Complementary drinks at restaurants, computer games, internet stations, food courts, shops, etc. at airports
  4. Explain reason for the wait
  5. Provide pessimistic estimates of the remaining wait time
    • Wait seems shorter if a time estimate is given.
  6. Be fair and open about the queuing disciplines used

12

Mitigating Effects of Long Queues

13 of 35

Customer Behavior

  • Balking: A customer may leave the queue because the queue is too long or the estimated waiting time is too long or waiting space is inadequate, for desired service and may decide to return for service at a later time. In queuing theory this is known as balking.
  • Reneging: A customer, after joining the queue, waits for some time and leaves the service system due to intolerable delay or due to impatience.
  • Jockeying: A customer who switches from one queue to another, hoping to receive service more quickly, is said to be jockeying.

13

14 of 35

14

server

A Commonly Seen Queuing Model

C C C … C

Customers (C)

Customer =C

The Queuing System

The Queue

15 of 35

  • Service times as well as inter-arrival times are assumed independent and identically distributed
    • If not otherwise specified
  • Commonly used notation principle: A/B/C
    • A = The inter-arrival time distribution
    • B = The service time distribution
    • C = The number of parallel servers
  • Commonly used distributions
    • M = Markovian (exponential) - Memory less
    • D = Deterministic distribution
    • G = General distribution
  • Example: M/M/c
    • Queuing system with exponentially distributed service and inter-arrival times and c servers

15

A Commonly Seen Queuing Model

16 of 35

  • The most commonly used queuing models are based on the assumption of exponentially distributed service times and interarrival times.

Definition: A stochastic (or random) variable T∈exp(α ), i.e., is exponentially distributed with parameter α, if its frequency function is:

16

The Exponential Distribution and Queuing

⇒ The Cumulative Distribution Function is:

⇒ The mean = E[T] = 1/α

⇒ The Variance = Var[T] = 1/ α2

17 of 35

17

The Exponential Distribution

Time between arrivals

Mean=

E[T]=1/α

Probability density

t

fT(t)

α

18 of 35

  • The standard assumption in many queuing models is that the arrival process is Poisson

Two equivalent definitions of the Poisson Process

  1. The times between arrivals are independent, identically distributed and exponential
  2. X(t) is a Poisson process with arrival rate λ.

18

The Poisson Process

19 of 35

19

  • Poisson processes can be aggregated or disaggregated and the resulting processes are also Poisson processes

a) Aggregation of N Poisson processes with intensities

1, λ2, …, λn} renders a new Poisson process with intensity λ= λ1+ λ2+…+ λn.

b) Disaggregating a Poisson process X(t)∈Po(λt) into N sub-processes {X1(t), X2(t), , …, X3(t)} (for example N customer types) where Xi(t) ∈Po(λit) can be done if

For every arrival the probability of belonging to sub-process i = pi

p1+ p2+…+ pN = 1, and λi = pi λ

Properties of the Poisson Process

20 of 35

  • The state of the system = the number of customers in the system
  • Queue length = (The state of the system) – (number of customers being served)

N(t) = Number of customers/jobs in the system at time t

Pn(t) = The probability that at time t, there are n customers/jobs in the system.

λn = Average arrival intensity (= # arrivals per time unit) at n customers/jobs in the system

μn = Average service intensity for the system when there are n customers/jobs in it. (Note, the total service intensity for all occupied servers)

ρ = The utilization factor for the service facility. (= The expected fraction of the time that the service facility is being used)

20

Terminology and Notation

21 of 35

21

Example – Service Utilization Factor

  • Consider an M/M/1 queue with arrival rate = λ and service intensity = μ
  • λ = Expected capacity demand per time unit
  • μ = Expected capacity service per time unit

  • Similarly if there are c servers in parallel, i.e., an M/M/c system but the expected capacity per time unit is then c*μ

22 of 35

  • Steady State condition
    • Enough time has passed for the system state to be independent of the initial state as well as the elapsed time
    • The probability distribution of the state of the system remains the same over time (is stationary).
  • Transient condition
    • Prevalent when a queuing system has recently begun operations
    • The state of the system is greatly affected by the initial state and by the time elapsed since operations started
    • The probability distribution of the state of the system changes with time

22

Queuing Theory Focus on Steady State

With few exceptions Queuing Theory has focused on analyzing steady state behavior

23 of 35

23

Transient and Steady State Conditions

  • Illustration of transient and steady-state conditions
    • N(t) = number of customers in the system at time t,
    • E[N(t)] = represents the expected number of customers in the system.

24 of 35

Pn = The probability that there are exactly n customers/jobs in the system (in steady state, i.e., when t→∞)

Ls = Expected number of customers in the system (in steady state)

Lq = Expected number of customers in the queue (in steady state)

Ws = Expected waiting time of customer in the system

Wq= Expected waiting time of customer in the queue

24

Notation For Steady State Analysis

25 of 35

  • Assume that λn = λ and μn = μ for all n

  • Assume that λn is dependent on n

25

Little’s Formula

26 of 35

  • The foundation of many of the most commonly used queuing models
    • Birth – equivalent to the arrival of a customer or job
    • Death – equivalent to the departure of a served customer or job

Assumptions

  1. Given N(t)=n,
    • The time until the next birth (TB) is exponentially distributed with parameter λn (Customers arrive according to a Po-process)
    • The remaining service time (TD) is exponentially distributed with parameter μn
  2. TB & TD are mutually independent stochastic variables and state transitions occur through exactly one Birth (n → n+1) or one Death (n → n–1)

26

Birth-and-Death Processes

27 of 35

27

A Birth-and-Death Process Rate Diagram

λ0

λ1

λn-1

λn

0

1

2

n-1

n

n+1

μ1

μ2

μn

μn+1

n

= State n, i.e., the case of n customers/jobs in the system

  • Excellent tool for describing the mechanics of a Birth-and-Death process

28 of 35

Assumptions - the Basic Queuing Process

  • Infinite Calling Populations
    • Independence between arrivals
  • The arrival process is Poisson with an expected arrival rate λ
    • Independent of the number of customers currently in the system
  • The queue configuration is a single queue with possibly infinite length
    • No reneging or balking
  • The queue discipline is FIFO
  • The service mechanism consists of a single server with exponentially distributed service times
    • μ = expected service rate when the server is busy

28

The M/M/1 - model

29 of 35

  • Situation
    • Patients arrive according to a Poisson process with intensity λ (⇔ the time between arrivals is exp(λ) distributed.
    • The service time (the doctor’s examination and treatment time of a patient) follows an exponential distribution with mean 1/μ (=exp(μ) distributed)
    • The ER can be modeled as an M/M/c system where c=the number of doctors

29

Example – ER at Hospital

  • Data gathering
    • λ = 2 patients per hour
    • μ = 3 patients per hour
  • Questions
    • Should the capacity be increased from 1 to 2 doctors?
    • How are the characteristics of the system (ρ, Wq, W, Lq and L) affected by an increase in service capacity?

30 of 35

  • 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)

  • Is it warranted to hire a second doctor ?

30

Summary of Results – County Hospital

Characteristic

One doctor (c=1)

Two Doctors (c=2)

ρ

2/3

1/3

P0

1/3

1/2

(1-P0)

2/3

1/2

P1

2/9

1/3

Lq

4/3 patients

1/12 patients

Ls

2 patients

3/4 patients

Wq

2/3 h = 40 minutes

1/24 h = 2.5 minutes

Ws

1 h

3/8 h = 22.5 minutes

31 of 35

  • Expected Waiting Costs as a function of the number of customers in the system
    • Cw = Waiting cost per customer and time unit
    • CwN = Waiting cost per time unit when N customers in the system

31

Analyzing Linear Waiting Costs

  • Expected Waiting Costs as a function of the number of customers in the queue

32 of 35

  • The expected service costs per time unit, SC, depend on the number of servers and their speed

  • Definitions
    • c = Number of servers
    • μ = Average server intensity (average time to serve one customer)
    • CS(μ) = Expected cost per server and time unit as a function of μ

32

SC = c*CS(μ)

Analyzing Service Costs

33 of 35

Determining μ and c

  • Both the number of servers and their speed can be varied
    • Usually only a few alternatives are available
  • Definitions
    • A = The set of available μ - options

33

A Decision Model for System Design

From a structural point of view, a few fast servers are usually better than several slow ones with the same maximum capacity

    • Optimization
      • Enumerate all interesting combinations of μ and c, compute TC and choose the cheapest alternative

34 of 35

  • Given a specified shortage or waiting cost function the analysis is straightforward
  • Define
    • WC = Expected Waiting Cost (shortage cost) per time unit
    • SC = Expected Service Cost (capacity cost) per time unit
    • TC = Expected Total system cost per time unit
  • The objective is to minimize the total expected system cost

34

Analyzing Design-Cost Tradeoffs

Min TC = WC + SC

Process capacity

Cost

WC

SC

TC

35 of 35

����Thank You

Questions Please ?

35