Anda di halaman 1dari 14

1

Simulation of queueing system

Queue : is a waiting line of customer


The key elements of queuing system are
Customer : refers to an entity that request service
Server : an entity that provides service to customer
Calling population :can be finite or infinite
System capacity : limit of number of customers that may be in
queue or system, can be limited or unlimited.
Exhibition : unlimited
Theatre : limited
2
Simulation of queueing systems
3
Queue behaviour

Three ways
Customers enters the system and after seeing a large
queue decides not to join the queue and leaves the
system
Customer waits in queue for sometimes and seeing that
it is moving too slowly decides to leave the queue
There are many queues and customer decides to move
from one queue to other queue which is moving very
fast.
4
Queue discipline

FIFO
LIFO
PR [SERVICE ACCORSING TO PRIORITY]
SPT (SHORTEST PROCESSING TIME FIRST]
SIRO [ SERVICE IN RANDOM ORDER]
5

Arrival process : rate at which the customers arrive and join the
queue
The arrivals can happen in scheduled time or at random time
The inter-arrival time (IAT) for nth customer in the time gap
between the arrival of nth and (n-1)th customer
If the arrival rate is random, then IAT is the random variables with
some probability distribution is considered.
If the arrival rate is scheduled time then the IAT is constant.
6
assumptions

Calling population is infinite


System capacity is infinite
Arrival process is random with certain probability
Queue discipline is FIFO
Service time are random variables with certain probability
distribution
7
Arrival of event
8
Departure of event
9
Example 1

A small grocery store has only one checkout counter customer


arrive at this checkout counter at random from 1 to 10 min
apart and each possible value of inter-arrival time has the
same probability of occurrence equal to 0.10. The service time
varying from 1 to 6 min with the probability shown below.
Develop simulation table for 10 occurrences.
Service time 1 2 3 4 5 6
probability 0.05 0.10 0.20 0.30 0.25 0.10

Take the random digits for arrival as 91,72,15,94,30,92,75,23,30


and
Service time as 84,10,74,53,17,79,91,67,89,38 sequentially
10

Find
1. Average waiting time
2. Average service time
3. Average time customers spends in the system
4. Probability of idle server
5. Probability that a customer has to wait in the queue
6. Average waiting time of those who wait
7. Average time between arrival
11
Example 2

Students arrive at a single cashier book stall at random from 1 to 8


min apart. Each possible value of IAT has same probability of
occurrence. The service time has the following probability
distribution.
Service time 1 2 3 4 5
probability 0.05 0.1 0.20 0.4 0.25

Simulate the stall for 10 students using the following random


numbers for IAT and ST
IAT: 231,468,154,922,385,643,796,564,615
ST : 74,32,56,12,29,63,95,77,43,17
12

Change the service time distribution to be uniform in the interval [1,5].


Simulate for 10 students , find the effect of changing service time
distribution. Calculate
1. Average waiting time
2. Average service time
3. Average time customers spends in the system
4. Probability of idle server
5. Probability that a customer has to wait in the queue
6. Average waiting time of those who wait
7. Average time between arrival
13
Example 3

Dr Ram is a dentist who schedules all patients for 30 min


appointment. Some of the patients take more or less than 30 min
depending on the type of dental work to be done. The following
table shows the various categories of work their probabilities ,
time actually needed to complete the work and the fees
charged for each.
Category Filling Crowing Cleaning Extraction Checkup
Time taken (in 45 60 15 45 15
min)
Probability 0.35 0.15 0.10 0.25 0.15
Fees charged Rs 200 Rs 200 Rs 60 Rs 100 Rs 50
14

Simulate the dentist clinic for 10 patient and


determine the average waiting time for the patient,
total idle time for the doctor and the total fees
collected.
Assume that the patients arrive at the clinic at
exactly scheduled time starting at 8 am. Use the
following random numbers to handle this problem
55, 18, 91, 01, 25, 86, 71, 39 , 93, 48

Anda mungkin juga menyukai