26
QueueTraffic and queuing theory +

QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

QueueTraffic andqueuing theory

+

Page 2: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

2

Queues in everyday life

You have certainly been in a queue somewhere.

– Where?– How were they different?

We encounter queues all the time!

At ticket vending machines, cash desks, at the doctors, at printers, in a call center, …

Page 3: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

3

Examples: supermarket, doctor

• Supermarket: many cash desks,many queues– They even might have an express

queue line!

• Doctor: one doctors (~cash desk),one queue– Similar: queues in a self service restaurant,

queues in front of a cable car

Page 4: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

4

What is it about today?

Learn a mathematical model– How are queues analyzed?– What are important concepts and terms for this?

Learning goals with the use of QueueTraffic

• Being able to explain the concepts arrival rate, throughput, utilization and calculate those for given situations with the help of QueueTraffic

• Being able to interpret different values for utilization: Do we get a queue or not?

• Being able to explain the difference between Poissonand uniform distribution in a illustrative way

Page 5: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

5

The best system?

What is better, what worse?– Many cash desks? – Fast lines?– Number tickets?– ...?

Cannot be decided like this!

What can be decided: How well works a system in a certain situation. ☺

Page 6: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

6

Waiting queues and me:2 points of view

1. I am responsible for the setting of queues– Manager of a store– Doctor in a medical practice– Operator of a cable car– ...

2. I am waiting in a queue– Client– Patient– Hiker– ...

I am depending on the system

I can control the system

Page 7: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

7

Problems of a store manger

• When and why do we get queues?

• What can we do about it?– More cash desks

• What if there are too many desks open?

– Let on more people in ☺– First serve the people who need little service time

– Limit the time during which someone is being served

– Too many people, too few desks

costs, boredom, …

e.g. printers that sorts job by their size

e.g. limited treatment time per client at the doctor

Page 8: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

8

Problems of a customer

• Why does it always feel to us like all other queues move faster?

• Which queue should I take? Where shall I append? How long do I have to wait?– Where there are the fewest people in queue?– Where the people have the least products to dispatch?– Where the fastest cashier is?– Where one can only pay cash?– Where someone helps me bagging?– ...?

Page 9: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

9

We observe

From the right the queue gets shortened

From the left he queue gets extended

Page 10: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

10

The act of clients being cleared from queue from the right is called service process.

The time one service processtakes for one client is called the service time b.

Arrival and service-process

The act of new clients permanently putting theirselves in queue is called arrival process.

The number of clients adding theirselves to the queue within a certain period of time is called the arrival rate λ.

Page 11: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

11

• Arrival rate λ: How often do new clients arrive?

• Service time b: how long takes a service station for one client?

– It take the man at the cashier on average 15 minutes to serve a client.service time:

– In a supermarket 5 clients come through the door per hour, on average.Arrival rate:

Arrival rate λ (lambda)und service time b

λ = 5/60 clients/minute

b = 15 minutes/client

Page 12: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

12

throughput μ (Mu)

Throughput μ: How many clients are served per time unit? The throughput is the reciprocal of the service time:

μ = 1/b Example: service time b = 15 minute/clientThroughput: μ = 1 / 15 clients/minute

= 1 client / 15 minutes= 4 clients/hour

Page 13: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

13

Utilization ρ (Rho)Utilization ρ = λ/μ: How much of the capacity of the system is used?

Important parameter for the analysis of queuing systems!

3 examples: - λ1 = 10 clients/hour, μ1 = 30 c./h- λ2 = 30 c./h, μ2 = 30 c./h- λ3 = 60 c./h, μ3 = 30 c./hUtilization: ρ1 = λ1 /μ1 = 10 / 30 = 0.33

ρ2 = λ2 /μ2 = 30 / 30 = 1 ρ3 = λ3 /μ3 = 60 / 30 = 2

Page 14: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

14

Distributions at the arrivalArrivals in QueueTraffic are uniform or Poisson distributed.

or

Page 15: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

15

QueueTraffic: Demo

Source: http://swisseduc.ch/compscience/infotraffic/

Page 16: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

16

QueueTraffic

• Situation and help• Simulation area• Traffic control• Volume of traffic• Simulation control• Data and charts

Page 17: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

17

You solve some first exercises ☺

Solve exercises A until 3.

Page 18: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

18

Theoretical and effectivethroughput in in QueueTraffic

• So far, we only considered the theoretical throughput μt, since we took at look at how many clients (cars) can be served (drive through) under optimal conditions.

• QueueTraffic is a simulation and to calculate the throughput it counts the number of cars driving over the crossroad per round. This is called the effective throughput μe.

Page 19: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

19

Why do we need theeffective throughput?

• Fact: How many car could theoretically get through cannot easily be measured or counted.

• The number of “served” cars can easily be counted!– This gives us the effective throughput μe–μe = μt is reached, if λ > μt, i.e. if “enough”

cars arrive.

Page 20: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

20

Sample - calculation

• Arrival rate: – λ = 10 car/60s

• Effective throughput: – μe = 10 cars/60s

• Theoretical throughput: – μt = (28 s/60s) * (1 car/1s)

= 28 cars/60s• Utilization:

– ρ = λ / μt= (10 cars/60 s) / (28 cars/60 s)= 0.36

!!!

calculated!simulated!(counted)

Page 21: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

21

Remarks to the calculationsin QueueTraffic

• Traffic volume is per 60 s

• Formula for theoretical throughputμt = „proportion green time” * capacity per lane

e.g.: μt = 28s/60s * 1 car/s

• Use the theoretical throughput μt to calculate the utilization: ρ = λ / μt

given!

Page 22: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

22

…now: your turn! ☺

Page 23: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

23

The most important terms

term example

Arrival rate λ 12 cars/minuteService time b 0.1 minute/carthroughput μt = 1/b 10 cars/minute

utilization ρ = λ / μt 1.2

Page 24: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

24

Connection between utilizationρ = λ / μt and traffic jam.

In general holds:

ρ < 1 no (or little) jam: system under-workedρ ≈ 1 „a little“ jam: system loadedρ > 1 growing jam: system overloaded

Practical Interpretation: Jam if λ > μt, i.e. if the arrival rate is bigger than the (theoretical) throughput.– Thus: If more cars arrive than what can be served, we get jam!

Page 25: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

25

What was it about today?

Get to know a mathematical model– How are waiting queues analyzed?– What are important terms and concepts?

Concrete goals:

• Being able to explain the concepts arrival rate, throughput, utilization and calculate those for given situations with the help of QueueTraffic

• Being able to interpret different values for utilization: Do we get a queue or not?

• Being able to explain the difference between Poissonand uniform distribution in a illustrative way

Page 26: QueueTraffic and queuing theory - SwissEduc · throughput in in QueueTraffic • So far, we only considered the theoretical throughput μ t, since we took at look at how many clients

26

THE END ☺

http://swisseduc.ch/informatik/infotraffic/

QueueTraffic undqueuing theory

Remarks andfeedback please to:

[email protected]