Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting...

107
Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

Transcript of Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting...

Page 1: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 1

Waiting Line Models:Queuing Theory Basics

Page 2: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 2

When you are in queue?In the bank, restaurant, supermarket…In front of restroom during the break of football game

How much is your patience? Waiting costs your patience and your temper and it also costs the business.

Time =

For the business, they have to find the optimal service level that keeps customers happy and makes them profitable.

Page 3: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 3

INTRODUCTIONINTRODUCTIONQueuing models are everywhere. For example, Queuing models are everywhere. For example, airplanes airplanes ““queue upqueue up”” in holding patterns, waiting for in holding patterns, waiting for a runway so they can land. Then, they line up again a runway so they can land. Then, they line up again to take off.to take off.People line up for tickets, to buy groceries, etc. People line up for tickets, to buy groceries, etc. Jobs line up for machines, orders line up to be filled, Jobs line up for machines, orders line up to be filled, and so on.and so on.

Page 4: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 4

INTRODUCTIONINTRODUCTIONA. K. Erlang (a Danish engineer) is credited with A. K. Erlang (a Danish engineer) is credited with founding queuing theory by studying telephone founding queuing theory by studying telephone switchboards in Copenhagen for the Danish switchboards in Copenhagen for the Danish Telephone Company.Telephone Company.

Many of the queuing results used today were Many of the queuing results used today were developed by Erlang.developed by Erlang.

Page 5: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 5

A A queuing modelqueuing model is one in which you have a is one in which you have a sequence of times (such as people) arriving at a sequence of times (such as people) arriving at a facility for service, as shown below:facility for service, as shown below:

ArrivalsArrivals

0000000000 Service FacilityService Facility

Page 6: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 6

Consider St. LukeConsider St. Luke’’s Hospital in Philadelphia and the s Hospital in Philadelphia and the following three queuing models.following three queuing models.

Model 1: St. LukeModel 1: St. Luke’’s Hematology Labs Hematology Lab St. LukeSt. Luke’’s s treats a large number of patients on an outpatient treats a large number of patients on an outpatient basis (i.e., not admitted to the hospital).basis (i.e., not admitted to the hospital).Outpatients plus those admitted to the 600Outpatients plus those admitted to the 600--bed bed hospital produce a large flow of new patients each hospital produce a large flow of new patients each day.day.

Page 7: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 7

Most new patients must visit the hematology Most new patients must visit the hematology laboratory as part of the diagnostic process. Each laboratory as part of the diagnostic process. Each such patient has to be seen by a technician.such patient has to be seen by a technician.

After seeing a doctor, the patient arrives at the After seeing a doctor, the patient arrives at the laboratory and checks in with a clerk. laboratory and checks in with a clerk.

Patients are assigned on a firstPatients are assigned on a first--come, firstcome, first--served served basis to test rooms as they become available.basis to test rooms as they become available.

The technician assigned to that room performs the The technician assigned to that room performs the tests ordered by the doctor. tests ordered by the doctor. When the testing is complete, the patient goes on to When the testing is complete, the patient goes on to the next step in the process and the technician sees the next step in the process and the technician sees a new patient.a new patient.

We must decide how many technicians to hire.We must decide how many technicians to hire.

Page 8: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 8

WATS (Wide Area Telephone Service) is an acronym WATS (Wide Area Telephone Service) is an acronym for a special flatfor a special flat--rate, long distance service offered rate, long distance service offered by some phone companies.by some phone companies.

Model 2: Buying WATS LinesModel 2: Buying WATS Lines As part of its As part of its remodeling process, St. Lukeremodeling process, St. Luke’’s is designing a new s is designing a new communications system which will include WATS communications system which will include WATS lines. lines.

Page 9: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 9

We must decide how many WATS lines the hospital We must decide how many WATS lines the hospital should buy so that a minimum of busy signals will should buy so that a minimum of busy signals will be encountered.be encountered.

When all the phone lines allocated to WATS are in When all the phone lines allocated to WATS are in use, the person dialing out will get a busy signal, use, the person dialing out will get a busy signal, indicating that the call canindicating that the call can’’t be completed. t be completed.

Page 10: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 10

The equipment includes measuring devices such asThe equipment includes measuring devices such as

Model 3: Hiring RepairpeopleModel 3: Hiring Repairpeople St. LukeSt. Luke’’s hires s hires repairpeople to maintain repairpeople to maintain 2020 individual pieces of individual pieces of electronic equipment. electronic equipment.

electrocardiogram machines electrocardiogram machines

small dedicated computerssmall dedicated computers

CAT scannerCAT scanner

other equipmentother equipment

Page 11: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 11

If a piece of equipment fails and all the repairpeople If a piece of equipment fails and all the repairpeople are occupied, it must wait to be repaired.are occupied, it must wait to be repaired.

We must decide how many repairpeople to hire and We must decide how many repairpeople to hire and balance their cost against the cost of having broken balance their cost against the cost of having broken equipment.equipment.

Page 12: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 12

All three of these models fit the general description All three of these models fit the general description of a queuing model as described below: of a queuing model as described below:

PROBLEMPROBLEM ARRIVALSARRIVALS SERVICE FACILITYSERVICE FACILITY

11 PatientsPatients TechniciansTechnicians22 Telephone CallsTelephone Calls SwitchboardSwitchboard33 Broken Equipment RepairpeopleBroken Equipment Repairpeople

These models will be resolved by using a These models will be resolved by using a combination of analytic and simulation models.combination of analytic and simulation models.

To begin, letTo begin, let’’s start with the basic queuing model. s start with the basic queuing model.

Page 13: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 13

Queuing Systems

...

customers

channel(server)

system

arrival departure

waiting line (queue)

Single Channel Waiting Line System

system

arrival departure

server 2

server k

... ...

server 1 Multi-ChannelWaiting Line System

Page 14: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 14

Bank Customers Teller Deposit etc.

Doctor’s Patient Doctor Treatmentoffice

Traffic Cars Light Controlledintersection passage

Assembly line Parts Workers Assembly

Tool crib Workers Clerks Check out/in tools

Situation Arrivals Servers Service ProcessWaiting Line Examples

Page 15: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 15

THE BASIC MODELTHE BASIC MODELConsider the Xerox machine located in the fourthConsider the Xerox machine located in the fourth--floor secretarial service suite. Assume that users floor secretarial service suite. Assume that users arrive at the machine and form a single line. arrive at the machine and form a single line.

Each arrival in turn uses the machine to perform a Each arrival in turn uses the machine to perform a specific task which varies from obtaining a copy of a specific task which varies from obtaining a copy of a 11--page letter to producing page letter to producing 100100 copies of a copies of a 2525--page page report. report.

This system is called a singleThis system is called a single--server (or singleserver (or single--channelchannel) queue. ) queue.

Page 16: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 16

2.2. The number of people in the queue (waiting The number of people in the queue (waiting for service).for service).

Questions about this or any other queuing system Questions about this or any other queuing system center on four quantities:center on four quantities:

1.1. The number of people in the system (those The number of people in the system (those being served and waiting in line).being served and waiting in line).

Page 17: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 17

3.3. The waiting time in the system (the interval The waiting time in the system (the interval between when an individual enters the system between when an individual enters the system and when he or she leaves the system).and when he or she leaves the system).

4.4. The waiting time in the queue (the time The waiting time in the queue (the time between entering the system and the between entering the system and the beginning of service).beginning of service).

Page 18: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 18

ASSUMPTIONS OF THE BASIC MODELASSUMPTIONS OF THE BASIC MODEL

1.1. Arrival Process.Arrival Process. Each arrival will be called a Each arrival will be called a ““job.job.”” The The interarrival timeinterarrival time (the time between (the time between arrivals) is not known. arrivals) is not known.

Page 19: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 19

Therefore, the Therefore, the exponential probabilityexponential probabilitydistributiondistribution (or (or negative exponential negative exponential distributiondistribution) will be used to describe the ) will be used to describe the interarrival times for the basic model.interarrival times for the basic model.

Probabilidad de que la atención sea completadadentro de “ t “ unidades de tiempo

X = t

Page 20: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 20

The exponential distribution is The exponential distribution is completely specified by one completely specified by one parameter, l, the mean arrival rate parameter, l, the mean arrival rate (i.e., how many jobs arrive on the (i.e., how many jobs arrive on the average during a specified time average during a specified time period).period).

Page 21: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 21

Mean interarrival time is the average time Mean interarrival time is the average time between two arrivals. Thus, for the between two arrivals. Thus, for the exponential distributionexponential distribution

Avg. time between jobs = mean interarrival time = Avg. time between jobs = mean interarrival time = 11λλ

Thus, if Thus, if λλ = 0.05= 0.05

mean interarrival time = = = 20mean interarrival time = = = 2011λλ

110.050.05

Page 22: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 22

2.2. Service Process.Service Process. In the basic model, the time In the basic model, the time that it takes to complete a job (the that it takes to complete a job (the service service timetime) is also treated with the exponential ) is also treated with the exponential distribution. distribution.

The parameter for this exponential distribution The parameter for this exponential distribution is called is called μμ (the (the mean service ratemean service rate in jobs per in jobs per minute).minute).

Page 23: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 23

μμTT is the number of jobs that would be served is the number of jobs that would be served (on the average) during a period of (on the average) during a period of TT minutes minutes if the machine were busy during that time.if the machine were busy during that time.The The meanmean or or averageaverage, , service timeservice time (the (the average time to complete a job) isaverage time to complete a job) is

Avg. service time =Avg. service time = 11μμ

Thus, if Thus, if μμ = 0.10= 0.10

mean service time = = = 10mean service time = = = 1011μμ

110.100.10

Page 24: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 24

3.3. Queue Size.Queue Size. There is no limit on the number There is no limit on the number of jobs that can wait in the queue (an infinite of jobs that can wait in the queue (an infinite queue length).queue length).

Page 25: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 25

4.4. Queue Discipline.Queue Discipline. Jobs are served on a firstJobs are served on a first--come, firstcome, first--serve basis (i.e., in the same order serve basis (i.e., in the same order as they arrive at the queue).as they arrive at the queue).

Page 26: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 26

5.5. Time Horizon.Time Horizon. The system operates as The system operates as described continuously over an infinite described continuously over an infinite horizon.horizon.

Page 27: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 27

6.6. Source Population.Source Population. There is an infinite There is an infinite population available to arrive.population available to arrive.

Page 28: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 28

QUEUE DISCIPLINEQUEUE DISCIPLINEIn addition to the arrival distribution, service In addition to the arrival distribution, service distribution and number of servers, the queue distribution and number of servers, the queue discipline must also be specified to define a queuing discipline must also be specified to define a queuing system.system.So far, we have always assumed that arrivals were So far, we have always assumed that arrivals were served on a firstserved on a first--come, firstcome, first--serve basis (often called serve basis (often called FIFO, for FIFO, for ““firstfirst--in, firstin, first--outout””).).

Page 29: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 29

QUEUE DISCIPLINEQUEUE DISCIPLINE

However, this may not always be the case. For However, this may not always be the case. For example, in an elevator, the last person in is often example, in an elevator, the last person in is often the first out (LIFO). the first out (LIFO). Adding the possibility of selecting a good queue Adding the possibility of selecting a good queue discipline makes the queuing models more discipline makes the queuing models more complicated.complicated.These models are referred to as scheduling models.These models are referred to as scheduling models.

Page 30: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 30

Various Type of Queues• Single Channel/Single Phase

• Multi-channel/Single Phase

• Single Channel/Multi-phase

• Queuing Network

Page 31: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 31

Queuing System Structure

Server departurearrival

• Arrival characteristic1. Size of units

- Single- Batch

2. Arrival rate- Constant- Probabilistic

3. Degree of patience- Patient- Impatient

• Arrival characteristic1. Size of units

- Single- Batch

2. Arrival rate- Constant- Probabilistic

3. Degree of patience- Patient- Impatient

• Features of lines1. Length

- Infinite capacity- Limited capacity

2. Number- Single- Multiple

3. Queue discipline- FIFO- Priorities

• Features of lines1. Length

- Infinite capacity- Limited capacity

2. Number- Single- Multiple

3. Queue discipline- FIFO- Priorities

• Service facility1. Structure2. Service rate

- Constant- Probabilistic - random services - State-dependent service time

• Service facility1. Structure2. Service rate

- Constant- Probabilistic - random services - State-dependent service time

• Population Source- Finite- Infinite

• Population Source- Finite- Infinite

• Exit1. Return to service population2. Do not return to service population

• Exit1. Return to service population2. Do not return to service population

Page 32: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 32

Deciding on the Optimum Level of Service

Total expected cost

Negative Cost of waiting time to company

Cost

Low level of service

Optimal service level

High level of service

Minimum total cost

Cost of providing service

Page 33: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 33

Performance Measures

P0 = Probability that there are no customers in the systemPn = Probability that there are n customers in the system

LS = Average number of customers in the systemLQ = Average number of customers in the queue

WS = Average time a customer spends in the systemWQ = Average time a customer spends in the queue

Pw = Probability that an arriving customer must wait for serviceρ = Utilization rate of each server (the percentage of time that

each server is busy)

Page 34: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 34

X: # of customer arrivals within time interval of length t

Pr(X=n) =

λ = the mean arrival rate per time unitt = the length of the time intervale = 2.7182818 (the base of the natural logarithm)

n! = n(n−1)(n−2) (n−3)… (3)(2)(1)

X: # of customer arrivals within time interval of length t

Pr(X=n) =

λ = the mean arrival rate per time unitt = the length of the time intervale = 2.7182818 (the base of the natural logarithm)

n! = n(n−1)(n−2) (n−3)… (3)(2)(1)

( )!net tn λλ −

Very large population of potential customers• behave independently • in any time instant, at most one arrives• arrive at intervals of average duration 1/λ

Arrival ProcessVery large population of potential customers

• behave independently • in any time instant, at most one arrives• arrive at intervals of average duration 1/λ

X follows Poisson Distribution(λt)Mean = λt

Variance = λtλ = arrival rate = # of arrivals per unit of time

t should be expressed in the same time unit as λ

X follows Poisson Distribution(λt)Mean = λt

Variance = λtλ = arrival rate = # of arrivals per unit of time

t should be expressed in the same time unit as λ

Important

Important

Page 35: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 35

Examples of Poisson Distribution

0.0

0.2

0.4

p(x)Poisson distributionwith parameter 1/2

x0 1 2 3

0.0

0.2

p(x)Poisson distributionwith parameter 2

x0 1 2 3 4 5

Poisson distributionwith parameter 1

0.0

0.2

0.4p(x)

0 1 2 3 4 x

Page 36: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 36

Service ProcessAssume service time is exponentially distributed(μ)

P.D.F. f(t) = μe-μt

Pr(Service ≤ t) = 1 − e-μt

Mean = 1/μVariance = 1/μ2

μ= service rate = # of customers served per unit time

Assume service time is exponentially distributed(μ)

P.D.F. f(t) = μe-μt

Pr(Service ≤ t) = 1 − e-μt

Mean = 1/μVariance = 1/μ2

μ= service rate = # of customers served per unit time

Properties of exponential distribution1. Memoryless (The conditional probability is the same as the unconditional probability.)2. Most customers require short services; few require long service3. If arrival process follows Possion (λ), then inter-arrival time follows exponential(λ)

Properties of exponential distribution1. Memoryless (The conditional probability is the same as the unconditional probability.)2. Most customers require short services; few require long service3. If arrival process follows Possion (λ), then inter-arrival time follows exponential(λ)

Important

Important

Page 37: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 37

Examples of Exponential Distribution

Page 38: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 38

Queuing Theory NotationA standard notation is used in queuing theory to denote the type of system we are dealing with.Typical examples are:

M/M/1 Poisson Input/Poisson Server/1 ServerM/G/1 Poisson Input/General Server/1 ServerD/G/n Deterministic Input/General Server/n ServersE/G/∞ Erlangian Input/General Server/Inf. Servers

The first letter indicates the input process, the second letter is the server process and the number is the number of servers.(M = Memoryless = Poisson)

Page 39: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 39

Terminologyλ = Arrival rate = 1/ Mean arrival intervalμ = Service rate = 1/ Mean service timeρ = λ/ μk = # of Servers

λ = Arrival rate = 1/ Mean arrival intervalμ = Service rate = 1/ Mean service timeρ = λ/ μk = # of Servers

P0 = Probability that there are no customers in the systemPn = Probability that there are n customers in the system

LS = Average number of customers in the systemLQ = Average number of customers in the queue

WS = Average time a customer spends in the systemWQ = Average time a customer spends in the queue

Pw = Probability that an arriving customer must wait for serviceρ = Utilization rate of each server (the percentage of time that each server is busy)

P0 = Probability that there are no customers in the systemPn = Probability that there are n customers in the system

LS = Average number of customers in the systemLQ = Average number of customers in the queue

WS = Average time a customer spends in the systemWQ = Average time a customer spends in the queue

Pw = Probability that an arriving customer must wait for serviceρ = Utilization rate of each server (the percentage of time that each server is busy)

Performance measures

Page 40: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 40

Single Server CasePoisson arrivals, exponential service rate, no priorities, no balking,

steady state)

STATE ENTRY RATE LEAVING RATE0 λP0 µP11 λP0 + µP2 (λ + µ)P12 λP1 + µP3 (λ + µ)P23 λP2 + µP4 (λ + µ)P3: : :

: : :

Pn = (λ/μ)nP0 = ρnP0 for n = 1,2,3,...

1 = 1 if 1

00

0

0 <== −

=

=∑∑ ρρ ρ

P

n

n

nn PP

0 1 2 3 4 ....

λ

μ

λ

μ

λ

μ

λ

μ

ONLY IFλ< μ or λ/μ = ρ <1

Steady state exists!

ONLY IFλ< μ or λ/μ = ρ <1

Steady state exists!

Page 41: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 41

Single Server Case⇒ P0 = 1 − ρ⇒ Pn = ρn (1 − ρ )

LS = E[N] where N = no. of customers in system (denote S)

=

= ρ /(1 − ρ )

LQ = E[Nq] where Nq = no. of customers in queue (denote Q)

=

= ρ2/(1− ρ )

WS = LS/ λWQ = LQ/ λ

∑∞

= 0nnnP

( )∑∞

=

−0

1n

nPn

Little’s LawLS = λ WSLQ= λ WQ

Little’s LawLS = λ WSLQ= λ WQ

Page 42: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 42

Single Server Queue Performance (M/M/1)

P0 = 1 – λ/μ

Pn = (λ/μ)nP0

LQ =

LS = LQ + λ/μ = LQ + ρ = ρ/(1− ρ)

WQ = LQ / λ

WS = WQ + 1/μ

Pw = 1 – P0 = ρ

P0 = 1 – λ/μ

Pn = (λ/μ)nP0

LQ =

LS = LQ + λ/μ = LQ + ρ = ρ/(1− ρ)

WQ = LQ / λ

WS = WQ + 1/μ

Pw = 1 – P0 = ρ

( ) ρρ

λμμλ

−=

− 1

22

Page 43: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 43

The Schips, Inc. Truck Dock Problem

Schips, Inc. is a large department store chain that has six branch stores located throughout the city. The company’s Western Hills store, which was built some years ago, has recently been experiencing some problems in its receiving and shipping department because of the substantial growth in the branch’s sales volume. Unfortunately, the store’s truck dock was designed to handle only one truck at a time, and the branch’s increased business volume has led to a bottleneck in the truck dock area. At times, the branch manager has observed as many as five Schips trucks waiting to be loaded or unloaded. As a result, the manager would like to consider various alternatives for improving the operation of the truck dock and reducing the truck waiting times.

Page 44: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 44

The Schips, Inc. Truck Dock Problem

One alternative the manager is considering is to speed up the loading/unloading operation by installing a conveyor system at the truck dock. As another alternative, the manager is considering adding a second truck dock so that two trucks could be loaded and/or unloaded simultaneously.

What should the manager do to improve the operation of the truckdock? While the alternatives being considered should reduce the truck waiting times, they may also increase the cost of operating the dock. Thus the manager will want to know how each alternative will affect both the waiting times and the cost of operating the dock before making a final decision

Truck arrival information: truck arrivals occur at an average rate of three trucks per hour.

Service information: the truck dock can service an average of four trucks per hour.

Page 45: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 45

The Schips, Inc. Truck Dock Problem

Options:1. Using conveyor to speed up service rate2. Add another dock server

Assumptions:The waiting cost is linearPoisson ArrivalsExponential service time

Page 46: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 46

Schips, Inc. - Current Situation

P0 = Probability that there are no customers in the systemPn = Probability that there are n customers in the system

LS = Average number of customers in the systemLQ = Average number of customers in the queue

WS = Average time a customer spends in the systemWQ = Average time a customer spends in the queue

Pw = Probability that an arriving customer must wait for serviceρ = Utilization rate of each server (the percentage of time that each server is busy)

P0 = Probability that there are no customers in the systemPn = Probability that there are n customers in the system

LS = Average number of customers in the systemLQ = Average number of customers in the queue

WS = Average time a customer spends in the systemWQ = Average time a customer spends in the queue

Pw = Probability that an arriving customer must wait for serviceρ = Utilization rate of each server (the percentage of time that each server is busy)

Page 47: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 47

Schips, Inc. - Alternative IAlternative I: Speed up the loading/unloading operations by installing a conveyor system (costs of different conveyer system are not provided here, but you should consider it when you evaluate the total cost)

Page 48: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 48

M/M/k Queue

Server 1

Departurekμ

Arrivalλ

Server 2

Server k

Multiple server, single queue (Poisson arrivals, I.I.D. exponential service rate, no priority, no balking, steady state)

ONLY IFλ< kμ or λ / kμ = ρ <1 Steady state exists!

ONLY IFλ< kμ or λ / kμ = ρ <1 Steady state exists!

Page 49: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 49

M/M/k Queue Performance Measures

Page 50: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 50

The Schips, Inc. Problem (continued)

Alternative IAlternative II:k = 2

P0 = 0.4545LQ = 0.123LS = 0.873WQ = 0.041WS = 0.291Pw = 0.2045

Page 51: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 51

Economic Analysis of Queuing System

Cost of waiting vs. Cost of capacity

Cost of waiting vs. Cost of capacity

COST

CAPACITY

CAPACITY

WAITING

TOTAL

Page 52: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 52

The Schips, Inc. Problem (Cost analysis, FYI)

cW = Hourly waiting cost for each customercServer = Hourly cost for each serverLS = Average number of customers in systemk = Number of servers

cW = Hourly waiting cost for each customercServer = Hourly cost for each serverLS = Average number of customers in systemk = Number of servers

Total waiting cost/hour = cWLTotal server cost/hour = cServerkTotal cost per hour = cWL+ cServerk

Total waiting cost/hour = cWLTotal server cost/hour = cServerkTotal cost per hour = cWL+ cServerk

Total Hourly Cost Summary for The Schips Truck Dock ProblemcW = $25/hour, cServer = $30/hour

Incremental cost of using conveyor: $20/hour for every Δμ = 2

Total Hourly Cost Summary for The Schips Truck Dock ProblemcW = $25/hour, cServer = $30/hour

Incremental cost of using conveyor: $20/hour for every Δμ = 2System μ Avg. # of Trucks in

system (L)Total Cost/Hour cWL + cSk

1-server 4 3 (25)(3)+(30)(1)=$1051-server+conveyor

6 1 (25)(1) +(30+20)(1) = $75

1-server+conveyor

8 0.6 (25)(0.6) + (30+40)(1) = $85

1-server+conveyor

10 0.43 (25)(0.43) + (30+60)(1) =$100.71

2-server 4 0.873 (25)(0.873) + (30)(2) = $81.83

Page 53: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 53

Discrete distribution

Suppose the bank has only one server, the interarrival and service rate are both discrete distribution. This bank wants to simulate for 150 customers arrival.This bank wants to know the queuing length and waiting time of their current service.

Interarrival distribution Service time distributionValue Prob Value Prob

1 0.05 1 0.152 0.15 2 0.153 0.35 3 0.254 0.35 3 0.205 0.10 4 0.10

Cum. Prob. 1 5 0.056 0.057 0.038 0.02

Cum. Prob. 1

Page 54: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 54

Discrete distribution

Waiting Times in Queue

0

2

4

6

8

10

12

14

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101 106 111 116 121 126 131 136 141 146

Customer

Queue Length Versus Time(Shown only at times just after arrivals)

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

0 50 100 150 200 250 300 350 400 450 500

Customer Arrival Times

Single server queueing simulation (starting empty and idle)

Customer IA_Time Arrival_Time Service_Time Queue_Time Start_Time Depart_Time Before entry After entry Before entry After entry1 1 1 3 0 1 4 0 3 0 02 3 4 3 0 4 7 0 3 0 03 3 7 3 0 7 10 0 3 0 04 3 10 2 0 10 12 0 2 0 05 3 13 2 0 13 15 0 2 0 06 4 17 3 0 17 20 0 3 0 07 4 21 6 0 21 27 0 6 0 08 4 25 3 2 27 30 2 5 0 19 1 26 3 4 30 33 4 7 1 2

10 4 30 7 3 33 40 3 10 0 111 3 33 3 7 40 43 7 10 0 112 2 35 3 8 43 46 8 11 1 213 4 39 3 7 46 49 7 10 2 314 4 43 3 6 49 52 6 9 1 215 3 46 1 6 52 53 6 7 1 2

Number in queueServer work

Page 55: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 55

Discrete distributionIf the arrival rate keeps the same, but the service rate is faster…

Service time distributionValue Prob

1 0.252 0.253 0.203 0.204 0.105 0.006 0.007 0.008 0.00

Cum. Prob. 1

Waiting Times in Queue-Faster Service Rate

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101 106 111 116 121 126 131 136 141 146

Customer

Queue Length Versus Time- Faster Service(Shown only at times just after arrivals)

0

0.5

1

1.5

2

2.5

0 50 100 150 200 250 300 350 400 450 500

Customer Arrival Times

Page 56: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 56

Discrete distribution :L5-QSim2-3servers

Interarrival distribution Service time distributionValue Prob Value Prob

1 0.80 1 0.152 0.15 2 0.153 0.03 3 0.254 0.01 3 0.25 0.01 4 0.1

1 5 0.056 0.057 0.038 0.02

1

If the bank has more frequent arrival, they definitely need more servers. Now they have 3 servers.

Page 57: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 57

Discrete distribution : L5-QSim2-3servers (con’t)

Waiting Times in Queue-3 servers

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101 106 111 116 121 126 131 136 141 146

Customer

Queue Length Versus Time- 3 servers(Shown only at times just after arrivals)

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

0 50 100 150 200 250

Customer Arrival Times

Queue Length Versus Time- 2 servers(Shown only at times just after arrivals)

0

5

10

15

20

25

30

0 50 100 150 200 250

Customer Arrival Times

If you change to 2 servers, then….

The waiting time and queuing length with 3 servers…

Waiting Times in Queue-2 servers

0

5

10

15

20

25

30

35

40

45

50

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101 106 111 116 121 126 131 136 141 146

Customer

Page 58: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 58

Waiting Line Models Extensions

Notation for Classifying Waiting Line Models

M = Designates a Poisson probability distribution for the arrivals or an exponential probability distribution for service time

D = Designates that the arrivals or the service time is deterministic or constant

G = Designates that the arrivals or the service time has a general probability distribution with a known mean and variance

Code indicatingarrival

distribution

Code indicatingservice time distribution

Number of parallelservers

others

Page 59: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 59

Waiting Line Models Extensions

Notation for Classifying Waiting Line Models

M/M/1M/M/kM/G/1 (M/D/1 is a special case, D for deterministic service time)G/M/1 And more….G/G/1G/G/k

Code indicatingarrival

distribution

Code indicatingservice time distribution

Number of parallelservers

others

Page 60: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 60

M/G/1 Queue Performance Measures

M/G/1 System: Steady state results (λ<μ)P0 = 1−ρ (ρ = λ/μ)

LQ =

LS = LQ + λ/μ = LQ + ρWQ = LQ / λ

WS = WQ + 1/μ

Pw = 1 – P0 = ρ

)1(2

222

ρρσλ

−+

μ = service rate 1/ μ = mean service timeσ2 = variance of service time distribution

M/D/1 Queue: σ2 = 0

LQ =

μ = service rate 1/ μ = mean service timeσ2 = variance of service time distribution

M/D/1 Queue: σ2 = 0

LQ = )1(2

2

ρρ

Page 61: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 61

An Example: Secretary HiringSuppose you must hire a secretary and you have to select one of two candidates.

Secretary 1 is very consistent, typing any document in exactly 15 minutes.

Secretary 2 is somewhat faster, with an average of 14 minutes per document, but with times varying according to the exponential distribution.

The workload in the office is 3 documents per hour, with interarrival times varying according to the exponential distribution. Which secretary will give you shorter turnaround times on documents?

Page 62: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 62

Secretary Hiring - Queuing Model

Page 63: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 63

M/M/s with Finite PopulationThe number of customers in the system is not permitted to exceed some specified number

Example: Machine maintenance problem

Page 64: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 64

M/M/s with Limited Waiting Room

Arrivals are turned away when the number waiting in the queue reaches a maximum level

Example: Walk-in Dr.s office with limited waiting space

Page 65: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 65

λ = Mean number of arrivals per time period

e.g., 3 units/hourμ = Mean number of people or items served per time period

e.g., 4 units/hour1/μ = 15 minutes/unit

Remember: λ & μ Are Rates

© 1984-1994 T/Maker Co.

If average service time is 15 minutes, then μ is 4 customers/hour

Page 66: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 66

SummaryQueuing system design has an important impact on the service provided by an enterpriseSteady state performance measures can provide useful information in assessing service and developing optimal queuing systemsThe general procedure of solving a queuing problem:

Many queuing systems do not have closed-form solutions. Simulation is a powerful tool of analyzing those systems.

Identify Queue Type

Identify Queue Type

Estimate Arrival & Service Processes

Estimate Arrival & Service Processes

Calculate Performance

Measures

Calculate Performance

Measures

ConductEconomic Analysis

ConductEconomic Analysis

Page 67: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 67

Zapatería Mary’s

Los clientes que llegan a la zapatería Mary’s son en promedio 12 por minuto, de acuerdo a la distribución Poisson.

El tiempo de atención se distribuye exponencialmente con un promedio de 8 minutos por cliente.

La gerencia esta interesada en determinar las medidas de performance para este servicio.

Page 68: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 68

SOLUCION

Datos de entradaλ = 1/ 12 clientes por minuto = 60/ 12 = 5 por hora.μ = 1/ 8 clientes por minuto = 60/ 8 = 7.5 por

hora.

Calculo del performanceP0 = 1- (λ / μ) = 1 - (5 / 7.5) = 0.3333Pn = [1 - (λ / μ)] (λ/ μ) = (0.3333)(0.6667)n

L = λ / (μ - λ) = 2Lq = λ2/ [μ(μ - λ)] = 1.3333W = 1 / (μ - λ) = 0.4 horas = 24 minutosWq = λ / [μ(μ - λ)] = 0.26667 horas = 16 minutos

P0 = 1- (λ / μ) = 1 - (5 / 7.5) = 0.3333Pn = [1 - (λ / μ)] (λ/ μ) = (0.3333)(0.6667)n

L = λ / (μ - λ) = 2Lq = λ2/ [μ(μ - λ)] = 1.3333W = 1 / (μ - λ) = 0.4 horas = 24 minutosWq = λ / [μ(μ - λ)] = 0.26667 horas = 16 minutos

Pw = λ / μ = 0.6667

ρ = λ / μ = 0.6667

Page 69: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 69

USANDO WINQSB

Page 70: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 70

Page 71: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 71

Datos de entrada para WINQSBDatos de entrada para WINQSB

μ

λ

Page 72: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 72

Medidas de desempeñoMedidas de desempeñoMedidas de desempeñoMedidas de desempeño

Medidas de desempeñoMedidas de desempeñoMedidas de desempeñoMedidas de desempeño

Medidas de desempeñoMedidas de desempeño

Page 73: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 73

Page 74: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 74

OFICINA POSTAL TOWN

La oficina postal Town atiende público los Sábados entre las 9:00 a.m. y la 1:00 p.m.

Datos- En promedio, 100 clientes por hora visitan la oficina postal durante este período. La oficina tiene tres dependientes.

- Cada atención dura 1.5 minutos en promedio.

- La distribución Poisson y exponencial describen la llegada de los clientes y el proceso de atención de estos respectivamente.

La gerencia desea conocer las medidas relevantes al servicio en orden a:

– La evaluación del nivel de servicio prestado.

– El efecto de reducir el personal en un dependiente.

La gerencia desea conocer las medidas relevantes al servicio en orden a:

– La evaluación del nivel de servicio prestado.

– El efecto de reducir el personal en un dependiente.

Page 75: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 75

SOLUCION

Se trata de un sistema de colas M / M / 3 .Datos de entrada

λ = 100 clientes por hora.μ = 40 clientes por hora (60 / 1.5).

¿Existe un período estacionario (λ < kμ )?

λ = 100 < kμ = 3(40) = 120.

Page 76: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 76

USANDO EL WINQSB

Page 77: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 77

Page 78: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 78

Page 79: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 79

Page 80: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 80

Sistemas de colas M/G/1Supuestos- Los clientes llegan de acuerdo a un proceso Poisson con esperanza λ.

− El tiempo de atención tiene una distribución general con esperanza μ.

− Existe un solo servidor.

- Se cuenta con una población infinita y la posibilidad de infinitas filas.

Page 81: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 81

TALLER DE REPARACIONES TED

Ted repara televisores y videograbadoras.Datos- El tiempo promedio para reparar uno de estos artefactos es de 2.25 horas.- La desviación estándar del tiempo de reparación es de 45 minutos.- Los clientes llegan a la tienda en promedio cada 2.5 horas, de acuerdo a una distribución Poisson.- Ted trabaja 9 horas diarias y no tiene ayudantes.- El compra todos los repuestos necesarios.

+ En promedio, el tiempo de reparación esperado debería ser de 2 horas.+ La desviación estándar esperada debería ser de 40 minutos.

Page 82: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 82

Ted desea conocer los efectos de usar nuevos equipos para:1. Mejorar el tiempo promedio de reparación de los artefactos;2. Mejorar el tiempo promedio que debe esperar un cliente hasta que su artefacto sea reparado.

Ted desea conocer los efectos de usar nuevos equipos para:1. Mejorar el tiempo promedio de reparación de los artefactos;2. Mejorar el tiempo promedio que debe esperar un cliente hasta que su artefacto sea reparado.

Page 83: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 83

SOLUCION

Se trata de un sistema M/G/1 (el tiempo de atención no es exponencial pues σ = 1/μ).Datos

Con el sistema antiguo (sin los nuevos equipos)λ = 1/ 2.5 = 0.4 clientes por hora.μ = 1/ 2.25 = 0.4444 clientes por hora.σ = 45/ 60 = 0.75 horas.

Con el nuevo sistema (con los nuevos equipos)μ = 1/2 = 0.5 clientes por hora.σ = 40/ 60 = 0.6667 horas.

Page 84: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 84

Sistemas de colas M/M/k/FSe deben asignar muchas colas, cada una de un cierto tamaño límite.

Cuando una cola es demasiado larga, un modelo de cola infinito entrega un resultado exacto, aunque de todas formas la cola debe ser limitada.

Cuando una cola es demasiado pequeña, se debe estimar un límite para la fila en el modelo.

Page 85: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 85

Características del sistema M/M/k/F

- La llegada de los clientes obedece a una distribución Poissoncon una esperanza λ.

- Existen k servidores, para cada uno el tiempo de atención se distribuye exponencialmente, con esperanza μ.

− El número máximo de clientes que puede estar presente en el sistema en un tiempo dado es “F”.

- Los clientes son rechazados si el sistema se encuentra completo.

Page 86: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 86

Tasa de llegada efectiva.

- Un cliente es rechazado si el sistema se encuentra completo.

- La probabilidad de que el sistema se complete es PF.

- La tasa efectiva de llegada = la tasa de abandono de clientes en el sistema (λe).

λe = λ(1 - PF)

Page 87: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 87

COMPAÑÍA DE TECHADOS RYAN

Ryan atiende a sus clientes, los cuales llaman y ordenan su servicio.

Datos

- Una secretaria recibe las llamadas desde 3 líneas telefónicas.

- Cada llamada telefónica toma tres minutos en promedio

- En promedio, diez clientes llaman a la compañía cada hora.

Page 88: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 88

Cuando una línea telefónica esta disponible, pero la secretaria esta ocupada atendiendo otra llamada, el cliente debe esperar en línea hasta que la secretaria este disponible.

Cuando todas las líneas están ocupadas los clientes optan por llamar a la competencia.

El proceso de llegada de clientes tiene una distribución Poisson, y el proceso de atención se distribuye exponencialmente.

Page 89: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 89

La gerencia desea diseñar el siguiente sistema con:

- La menor cantidad de líneas necesarias.

- A lo más el 2% de las llamadas encuentren las líneas ocupadas.

La gerencia esta interesada en la siguiente información:

El porcentaje de tiempo en que la secretaria esta ocupada.

EL número promedio de clientes que están es espera.

El tiempo promedio que los clientes permanecen en línea esperando ser

atendidos.

El porcentaje actual de llamadas que encuentran las líneas ocupadas.

Page 90: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 90

SOLUCION

Se trata de un sistema M / M / 1 / 3 Datos de entrada

λ = 10 por hora.μ = 20 por hora (1/ 3 por minuto).WINQSB entrega:

P0 = 0.533, P1 = 0.133, P3 = 0.06

6.7% de los clientes encuentran las líneas ocupadas.

Esto es alrededor de la meta del 2%.

sistema M / M / 1 / 4

P0 = 0.516, P1 = 0.258, P2 = 0.129, P3 = 0.065, P4 = 0.032

3.2% de los clntes. encuentran las líneas ocupadasAún se puede alcanzar la meta del 2%

sistema M / M / 1 / 5

P0 = 0.508, P1 = 0.254, P2 = 0.127, P3 = 0.063, P4 = 0.032P5 = 0.016

1.6% de los cltes. encuentran las linea ocupadasLa meta del 2% puede ser alcanzada.

Page 91: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 91

Datos de entrada para WINQSB Datos de entrada para WINQSB

Otros resultados de WINQSB

Con 5 líneas telefónicas 4 clientes pueden esperar en línea

Page 92: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 92

Page 93: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 93

Sistemas de colas M/M/1//mEn este sistema el número de clientes potenciales es finito y relativamente pequeño.

Como resultado, el número de clientes que se encuentran en el sistema corresponde a la tasa de llegada de clientes.

Características- Un solo servidor- Tiempo de atención exponencial y proceso de llegada Poisson.- El tamaño de la población es de m clientes (m finito).

Page 94: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 94

CASAS PACESETTER

Casas Pacesetter se encuentra desarrollando cuatro proyectos.Datos- Una obstrucción en las obras ocurre en promedio cada 20 días de trabajo en cada sitio.- Esto toma 2 días en promedio para resolver el problema.- Cada problema es resuelto por el V.P. para construcción

¿Cuanto tiempo en promedio un sitio no se encuentra operativo?-Con 2 días para resolver el problema (situación actual)-Con 1.875 días para resolver el problema (situación nueva).

Page 95: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 95

SOLUCION

Se trata de un sistema M/M/1//4Los cuatro sitios son los cuatro clientesEl V.P. para construcción puede ser considerado como el servidor.Datos de entrada

λ = 0.05 (1/ 20)μ = 0.5 (1/ 2 usando el actual V.P).μ = 0.533 (1/1.875 usando el nuevo V.P).

Page 96: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 96

Medidas del V.P V.PPerformance Actual Nuevo

Tasa efectiva del factor de utilización del sistema ρ 0,353 0,334Número promedio de clientes en el sistema L 0,467 0,435Número promedio de clientes en la cola Lq 0,113 0,100Número promedio de dias que un cliente esta en el sistema W 2,641 2,437Número promedio de días que un cliente esta en la cola Wq 0,641 0,562Probabilidad que todos los servidores se encuentren ociosos Po 0,647 0,666Probabilidad que un cliente que llega deba esperar en el sist. Pw 0,353 0,334

Medidas del V.P V.PPerformance Actual Nuevo

Tasa efectiva del factor de utilización del sistema ρ 0,353 0,334Número promedio de clientes en el sistema L 0,467 0,435Número promedio de clientes en la cola Lq 0,113 0,100Número promedio de dias que un cliente esta en el sistema W 2,641 2,437Número promedio de días que un cliente esta en la cola Wq 0,641 0,562Probabilidad que todos los servidores se encuentren ociosos Po 0,647 0,666Probabilidad que un cliente que llega deba esperar en el sist. Pw 0,353 0,334

Resultados obtenidos por WINQSBResultados obtenidos por WINQSB

Page 97: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 97

Análisis económico de los sistemas de colas

Las medidas de desempeño anteriores son usadas para determinar los costos mínimos del sistema de colas.

El procedimiento requiere estimar los costos tales como:- Costo de horas de trabajo por servidor- Costo del grado de satisfacción del cliente que espera en la cola.-Costo del grado de satisfacción de un cliente que es atendido.

Page 98: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 98

SERVICIO TELEFONICO DE WILSON FOODS

Wilson Foods tiene un línea 800 para responder las consultas de sus clientesDatos- En promedio se reciben 225 llamadas por hora.- Una llamada toma aproximadamente 1.5 minutos.- Un cliente debe esperar en línea a lo más 3 minutos.-A un representante que atiende a un cliente se le paga $16 por hora.-Wilson paga a la compañía telefónica $0.18 por minuto cuando el cliente espera en línea o esta siendo atendido.- El costo del grado de satisfacción de un cliente que espera en línea es de $20 por minuto.-El costo del grado de satisfacción de un cliente que es atendido es de $0.05.

¿Qué cantidad de representantes para la atención de los clientesdeben ser usados para minimizarel costo de las horas de operación?

¿Qué cantidad de representantes para la atención de los clientesdeben ser usados para minimizarel costo de las horas de operación?

Page 99: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 99

SOLUCION

Costo total del modelo

Costo total por horas detrabajo de “k”

representantes para la atención de clientes

CT(K) = Cwk + CtL + gwLq + gs(L - Lq)

Total horas para sueldo

Costo total de lasllamadas telefónicas

Costo total del grado de satisfacciónde los clientes que permanecen en línea

Costo total del grado de satisfacción de los clientes que son atendidos

CT(K) = Cwk + (Ct + gs)L + (gw - gs)Lq

Page 100: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 100

Datos de entradaCw= $16Ct = $10.80 por hora [0.18(60)]gw= $12 por hora [0.20(60)]gs = $0.05 por hora [0.05(60)]

Costo total del promedio de horasTC(K) = 16K + (10.8+3)L + (12 - 3)Lq

= 16K + 13.8L + 9Lq

Page 101: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 101

Asumiendo una distribución de llegada de los clientes Poisson y una distribución exponencial del tiempo de atención, se tiene un sistema M/M/Kλ = 225 llamadas por hora.μ = 40 por hora (60/ 1.5).

El valor mínimo posible para k es 6 de forma de asegurar que exista un período estacionario (λ<Kμ).

WINQSB puede ser usado para generar los resultados de L, Lq, y Wq.

Page 102: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 102

En resumen los resultados para K= 6,7,8,9,10.

K L Lq Wq CT(K)6 18,1249 12,5 0,05556 458,627 7,6437 2,0187 0,00897 235,628 6,2777 0,6527 0,0029 220,509 5,8661 0,2411 0,00107 227,1210 5,7166 0,916 0,00041 239,70

K L Lq Wq CT(K)6 18,1249 12,5 0,05556 458,627 7,6437 2,0187 0,00897 235,628 6,2777 0,6527 0,0029 220,509 5,8661 0,2411 0,00107 227,1210 5,7166 0,916 0,00041 239,70

Conclusión: se deben emplear 8 representantes para la atención de clientesConclusión: se deben emplear 8 representantes para la atención de clientes

Page 103: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 103

Sistemas de colas TándemEn un sistema de colas Tándem un cliente debe visitar diversos servidores antes de completar el servicio requerido

Se utiliza para casos en los cuales el cliente llega de acuerdo al proceso Poisson y el tiempo de atención se distribuye exponencialmente en cada estación.

Tiempo promedio total en el sistema = suma de todos los tiempo promedios en las estaciones

individuales

Tiempo promedio total en el sistema = suma de todos los tiempo promedios en las estaciones

individuales

Page 104: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 104

COMPAÑÍA DE SONIDO BIG BOYS

Big Boys vende productos de audio.

El proceso de venta es el siguiente:

- Un cliente realiza su orden con el vendedor.

- El cliente se dirige a la caja para pagar su pedido.

- Después de pagar, el cliente debe dirigirse al empaque para obtener su producto.

Page 105: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 105

Datos de la venta de un Sábado normal- Personal

+ 8 vendedores contando el jefe+ 3 cajeras+ 2 trabajadores de empaque.

- Tiempo promedio de atención

+ El tiempo promedio que un vendedor esta con un cliente es de 10 minutos.

+ El tiempo promedio requerido para el proceso de pago es de 3 minutos.

+ El tiempo promedio en el área de empaque es de 2 minutos.-Distribución

+ El tiempo de atención en cada estación se distribuye exponencialmente.

+ La tasa de llegada tiene una distribución Poisson de 40 clientes por hora.

Solamente 75% de los clientes que lleganhacen una compra

¿Cuál es la cantidad promedio de tiempo ,que un cliente que viene a comprardemora en el local?

¿¿CuCuáál es la cantidad promedio de tiempo ,l es la cantidad promedio de tiempo ,que un cliente que viene a comprarque un cliente que viene a comprardemora en el local?demora en el local?

Page 106: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 106

SOLUCION

Estas son las tres estaciones del sistema de colas Tándem

M / M / 8 M / M / 3

λ = 40

λ = 30

λ = 30M / M / 2

W1 = 14 minutosW2 = 3.47 minutos

W3=2.67 minutos

Total = 20.14 minutos.

Page 107: Queuing Theory Basics - Angelfire · Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1 Waiting Line Models: Queuing Theory Basics

MetodosCuantitativos M. En C. Eduardo Bustos Farias 107

Balance de líneas de ensambleUna línea de ensamble puede ser vista como una cola Tándem, porque los productos deben visitar diversas estaciones de trabajo de una secuencia dada.

En una línea de ensamble balanceada el tiempo ocupado en cada una de las diferentes estaciones de trabajo es el mismo.

El objetivo es maximizar la producción