1 of 30

Week 6 & 7

1

Simulation Of Queuing Systems

2 of 30

Introduction

  • When we enter a bank, especially on Sunday, long queues on a counter are found, and one has to wait for hours, if it is a public bank.

  • Reason for long queues may be due to less number of counters in the banks. But on the other hand if bank opens more number of counters, then on normal days, when customers are less in numbers, counter remains idle.

  • Whether it is a bank, or a theater or waiting for a bus, we find queues everywhere in our day to day life.

2

3 of 30

Introduction

  • The basic concept of queuing theory is the optimization of wait time, queue length, and the service available to those standing in a queue.

  • Cost is one of the important factors in the queuing problem.

  • Waiting in queues incur cost, whether human are waiting for services or machines waiting in a machine shop.

  • On the other hand if service counter is waiting for customers that also involves cost.

3

4 of 30

Introduction

  • In order to reduce queue length, extra service centers are to be provided but for extra service centers, cost of service becomes higher.

  • On the other hand excessive wait time in queues is a loss of customer time and hence loss of customer to the service station.

  • Ideal condition in any service center is that there should not be any queue.

  • But on the other hand service counter should also be not idle for long time.

  • Optimization of queue length and wait time is the object theory of queuing.

4

5 of 30

Introduction

  • Let us see how this situation is modeled.

  • First step is to know the arrival time and arrival pattern of customer.

  • Here customer means an entity waiting in the queue.

  • One must know from the past history, the time between the successive arrival of customers or in the case of machine shop, the job scheduling.

  • Also arrival of number of customers vary from day to day.

  • On Saturdays, number of customers may be more than that on other days.

  • What is the probability that a customer will arrive in a given span of time, is important to know.

5

6 of 30

Introduction

  • In order to maximize the profit, the major problem faced by any management responsible for a system is, how to balance the cost associated with the waiting, against the cost associated with prevention of waiting.

  • An analysis of queuing system will provide answers to all these questions.

  • However, before looking at how queuing problem is to be solved, the general framework of a queuing system should be understood.

6

7 of 30

Introduction

  • A queuing system involves customers arriving at a constant or variable time rate for service at a service station.

  • Customers can be students waiting for registration in college, aeroplane queuing for landing at airfield, or jobs waiting in machines shop.

  • If the customer after arriving, can enter the service center, good, otherwise they have to wait for the service and form a queue.

  • They remain in queue till they are provided the service.

  • Sometimes queue being too long, they will leave the queue and go, resulting a loss of customer.

  • Customers are to be serviced at a constant or variable rate before they leave the service station.

7

8 of 30

Introduction

8

9 of 30

Example 1

  • As a first example we look at a simple queue model which has an infinite population, one queue, and one server.

  • Suppose inter-arrival times are determined by rolling a die (Random Numbers).

  • If the numbers 6, 1, 4, 3, 6, 5 are rolled this means that the customers arrive at times 0,6,7,11,14,20,25

9

10 of 30

Example 1

  • Suppose also that the service time for each customer is �2, 3, 1, 1, 1, 1, 2 time units respectively, then we can extend our table to include service begin and time to get served to get the following table representing the time spent by customers in the system:

10

11 of 30

Example 2

11

12 of 30

Example 2

12

13 of 30

Example 2

  • On the following pages we will go through a single queue system in some detail.

13

14 of 30

Example 2

  • Thus, if we generate random numbers uniformly between 0.000 and 0.999 and if the random number is 0.371 (371) then this number represents the time interval 3 between inter-arrivals.

14

15 of 30

Example 2

  • We do the same for the service time which is between 1 and 6 time units and arrive at the following table:

15

16 of 30

Example 2

  • To run a simulation we will generate now random digits to simulate customer arrivals and service time.

16

17 of 30

Example 2

17

18 of 30

Example 2

18

19 of 30

Example 2

19

20 of 30

Example 2

20

21 of 30

Example 2

21

22 of 30

Example 2

22

23 of 30

Example 2

23

24 of 30

Example 2

24

25 of 30

Example 2

25

26 of 30

Example 2

26

27 of 30

Thank You

27

28 of 30

Exercise

Q1. Explain the Queue.

Q2. Explain the basic concept of queuing theory.

Q3. What is the general framework of queuing system?

Q4. Write the formula for the following:

  1. Average waiting time
  2. Probability (Waiting)
  3. Probability (Server idle)
  4. Average service time

28

29 of 30

Q5. When we enter a bank, especially on Sunday, long queues on a counter are found, and one has to wait for hours, if it is a

  1. Private bank
  2. Public bank
  3. Investment bank
  4. Micro bank

Q6. Reason for long queues may be due to less number of

  1. Counters
  2. Funds
  3. Employees
  4. Services

Q7. Waiting in queues incur

  1. Employees
  2. Customer
  3. Service
  4. Cost

29

30 of 30

Q8. Ideal condition in any service center is that there should not be any

  1. Queue
  2. Service
  3. Customer
  4. Helper

Q9. A queuing system involves customers arriving at a constant or variable time rate for service at a

  1. Job Station
  2. Service Station
  3. Police Station
  4. None of the above

Q10. Sometimes queue being too long, they will leave the queue and go, resulting a

  1. Satisfied customer
  2. Happy customer
  3. Loss of customer
  4. Rich customer

30