unit 1 introduction contd
TRANSCRIPT
1Simulation 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
2Simulation of queueing systems
3Queue 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.
4Queue 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.
6assumptions
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
7Arrival of event
8Departure of event
9Example 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.
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
Service time 1 2 3 4 5 6probability 0.05 0.10 0.20 0.30 0.25 0.10
10
Find 1. Average waiting time2. Average service time3. Average time customers spends in the system4. Probability of idle server5. Probability that a customer has to wait in the queue6. Average waiting time of those who wait7. Average time between arrival
11Example 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.
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
Service time 1 2 3 4 5probability 0.05 0.1 0.20 0.4 0.25
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. Calculate1. Average waiting time2. Average service time3. Average time customers spends in the system4. Probability of idle server5. Probability that a customer has to wait in the queue6. Average waiting time of those who wait7. Average time between arrival
13Example 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 min)
45 60 15 45 15
Probability 0.35 0.15 0.10 0.25 0.15Fees 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