Simulation
Simulation
716
International Journal of Current Research and Modern Education (IJCRME)
ISSN (Online): 2455 - 5428
(www.rdmodernresearch.com) Volume I, Issue I, 2016
Simulation is a time-consuming exercise.
Random Number Generation:
The following seven steps explain this method:
Collect the data related to the current problem.
Construct a frequency distribution with these data.
Construct the relative frequency distribution.
Assign a coding system that relates the identified events to generated random
numbers.
Select a suitable method for obtaining the required random numbers.
Match the random number to the assigned events and tabulate the results.
Repeat step 6 until desired number of simulation runs has been generated.
Illustration:
Kodak Photography studios use an expensive of developing fluid when printing
special colour portraits. Since the developing fluid cannot be stored for long periods, it
is important to keep on hand only as much as is needed to fill anticipated demand. In the
past few months, however, demand for the product has been fluctuating. The owner has
decided to simulate the demand for this service. A study of Kodak Photography’s
appointment book resulted in the following frequency distribution.
𝑫𝒂𝒊𝒍𝒚 𝑫𝒆𝒎𝒂𝒏𝒅 0 1 2 3 4 5
𝑵𝒖𝒎𝒃𝒆𝒓 𝒐𝒇 𝑫𝒂𝒚𝒔 10 20 40 20 6 4
The data was taken for a 100 day’s period during which no more than 5
special prints were requested on any given day.
35 92 68 03 51 05 72 84 98 34
Using the above given data to generate a 10 day sequence of demand values.
Solution:
Collect the data relevant to the problem and construct the frequency distribution
and also construct the corresponding relative frequency distribution.
Relative Frequency Distribution:
𝑫𝒂𝒊𝒍𝒚 𝑫𝒆𝒎𝒂𝒏𝒅 𝑹𝒆𝒍𝒂𝒕𝒊𝒗𝒆 𝑭𝒓𝒆𝒒𝒖𝒆𝒏𝒄𝒚 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚
0 10/100 0.10
1 20/100 0.20
2 40/100 0.40
3 20/100 0.20
4 6/100 0.06
5 4/100 0.04
Random Number Assignment:
𝑫𝒂𝒊𝒍𝒚 𝑫𝒆𝒎𝒂𝒏𝒅 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑹𝒂𝒏𝒅𝒐𝒎 𝑵𝒖𝒎𝒃𝒆𝒓 𝑨𝒔𝒔𝒊𝒈𝒏𝒎𝒆𝒏𝒕 𝑵𝒖𝒎𝒃𝒆𝒓 𝑨𝒔𝒔𝒊𝒈𝒏𝒆𝒅
0 0.10 00 − 09 10
1 0.20 10 − 29 20
2 0.40 30 − 69 40
3 0.20 70 − 89 20
4 0.06 90 − 95 6
5 0.04 96 − 99 4
Since the owner wants a 10 days simulation by using the generated random
number given in the problem. We find the generated demand in the following table.
Randomly Generated Data:
𝑫𝒂𝒚 𝑵𝒖𝒎𝒃𝒆𝒓 𝑮𝒆𝒏𝒆𝒓𝒂𝒕𝒆𝒅 𝑹𝒂𝒏𝒅𝒐𝒎 𝑫𝒆𝒎𝒂𝒏𝒅 𝑮𝒆𝒏𝒆𝒓𝒂𝒕𝒆𝒅 𝑫𝒆𝒎𝒂𝒏𝒅
1 35 2
2 92 4
3 68 2
4 03 0
717
International Journal of Current Research and Modern Education (IJCRME)
ISSN (Online): 2455 - 5428
(www.rdmodernresearch.com) Volume I, Issue I, 2016
5 51 2
6 05 0
7 72 3
8 84 3
9 98 5
10 34 2
𝑻𝒐𝒕𝒂𝒍 𝟐𝟑
𝑇𝑜𝑡𝑎𝑙 𝑔𝑒𝑛𝑒𝑟𝑎𝑡𝑒𝑑 𝑑𝑒𝑚𝑎𝑛𝑑 = 23 𝑢𝑛𝑖𝑡𝑠
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑑𝑎𝑦𝑠 𝑖𝑛 𝑡𝑒 𝑠𝑖𝑚𝑢𝑙𝑎𝑡𝑖𝑜𝑛 = 10
𝑇𝑜𝑡𝑎𝑙 𝑑𝑒𝑚𝑎𝑛𝑑
∴ 𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑑𝑎𝑖𝑙𝑦 𝑑𝑒𝑚𝑎𝑛𝑑 = 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑑𝑎𝑦𝑠 𝑠𝑖𝑚𝑢𝑙𝑎𝑡𝑒𝑑
23
= 10 = 2.3
Kodak studio can expect an average of 2.3 requests per day for the special colour
portraits.
Monte-Carlo Simulation:
Clearly define the problem in order to determine the objectives and constraints.
Formulate the appropriate model and decide which variables are to be induced.
Specify values of variables to be tested supply values for input parameters and
measure the output values.
Collect the information required and determine the functional relationship and
the types of probability distribution, which are to apply.
Define a coding system that will correlate the factors identified in step 1 with the
random numbers that will be generated for the simulation.
Select a random number generated and create the random numbers to be used in
the simulation.
Correlate the generated random numbers with the factors identified in step 1
and 5.
Summarize and examine the results in an appropriate table.
Evaluate the results of the simulation and select best course of action.
Formulate proposals for advice to management on new policies and modify the
model if necessary.
Illustration:
The occurrence of rain in a city on a day is dependent upon whether or not it
rained on the previous day. If it rained on the previous day, the rain distribution is,
𝑵𝒐 𝟏 𝒄𝒎 𝟐 𝒄𝒎 𝟑 𝒄𝒎 𝟒 𝒄𝒎 𝟓 𝒄𝒎
𝑬𝒗𝒆𝒏𝒕
𝑹𝒂𝒊𝒏 𝑹𝒂𝒊𝒏 𝑹𝒂𝒊𝒏 𝑹𝒂𝒊𝒏 𝑹𝒂𝒊𝒏 𝑹𝒂𝒊𝒏
𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 0.50 0.25 0.15 0.05 0.03 0.02
If it did not rain on the previous day, the rain distribution is
𝑵𝒐 𝟏 𝒄𝒎 𝟐 𝒄𝒎 𝟑 𝒄𝒎
𝑬𝒗𝒆𝒏𝒕
𝑹𝒂𝒊𝒏 𝑹𝒂𝒊𝒏 𝑹𝒂𝒊𝒏 𝑹𝒂𝒊𝒏
𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 0.75 0.15 0.06 0.04
Simulate the city’s weather for 10 days and determine by simulation the
total days without rain as well as the total rainfall during the period. Use the following
random numbers.
67 63 39 55 29 78 79 06 78 90
for simulation. Assume that for the first day of the simulation it had not rained the day
before.
Solution: The simulation of the city’s weather with and without rainfall in the following
tables
Previous Day Rain Distribution:
718
International Journal of Current Research and Modern Education (IJCRME)
ISSN (Online): 2455 - 5428
(www.rdmodernresearch.com) Volume I, Issue I, 2016
𝑪𝒖𝒎𝒖𝒍𝒂𝒕𝒊𝒗𝒆 𝑹𝒂𝒏𝒅𝒐𝒎
𝑬𝒗𝒆𝒏𝒕 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚
𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑵𝒖𝒎𝒃𝒆𝒓 𝑹𝒂𝒏𝒈𝒆
𝑁𝑜 𝑅𝑎𝑖𝑛 0.50 0.50 00 − 49
1 𝑐𝑚 𝑅𝑎𝑖𝑛 0.25 0.75 50 − 74
2 𝑐𝑚 𝑅𝑎𝑖𝑛 0.15 0.90 75 − 89
3 𝑐𝑚 𝑅𝑎𝑖𝑛 0.05 0.95 90 − 94
4 𝑐𝑚 𝑅𝑎𝑖𝑛 0.03 0.98 95 − 97
5 𝑐𝑚 𝑅𝑎𝑖𝑛 0.02 1.00 98 − 99
Previous Day No Rain Distribution:
𝑪𝒖𝒎𝒖𝒍𝒂𝒕𝒊𝒗𝒆 𝑹𝒂𝒏𝒅𝒐𝒎
𝑬𝒗𝒆𝒏𝒕 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚
𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑵𝒖𝒎𝒃𝒆𝒓 𝑹𝒂𝒏𝒈𝒆
𝑁𝑜 𝑅𝑎𝑖𝑛 0.75 0.75 00 − 74
1 𝑐𝑚 𝑅𝑎𝑖𝑛 0.15 0.90 75 − 89
2 𝑐𝑚 𝑅𝑎𝑖𝑛 0.06 0.96 90 − 95
3 𝑐𝑚 𝑅𝑎𝑖𝑛 0.04 1.00 96 − 99
Simulate for 10 Days Using the Given Random Numbers:
𝑫𝒂𝒚 𝑹𝒂𝒏𝒅𝒐𝒎 𝑵𝒖𝒎𝒃𝒆𝒓 𝑬𝒗𝒆𝒏𝒕𝒔 𝑪𝒖𝒎𝒖𝒍𝒂𝒕𝒊𝒗𝒆 𝑹𝒂𝒊𝒏
1 67 𝑁𝑜 𝑅𝑎𝑖𝑛 −
2 63 𝑁𝑜 𝑅𝑎𝑖𝑛 −
3 39 𝑁𝑜 𝑅𝑎𝑖𝑛 −
4 55 𝑁𝑜 𝑅𝑎𝑖𝑛 −
5 29 𝑁𝑜 𝑅𝑎𝑖𝑛 −
6 78 1 𝑐𝑚 𝑅𝑎𝑖𝑛 1 𝑐𝑚
7 79 1 𝑐𝑚 𝑅𝑎𝑖𝑛 2 𝑐𝑚
8 06 𝑁𝑜 𝑅𝑎𝑖𝑛 2 𝑐𝑚
9 78 1 𝑐𝑚 𝑅𝑎𝑖𝑛 3 𝑐𝑚
10 90 2 𝑐𝑚 𝑅𝑎𝑖𝑛 5 𝑐𝑚
During the simulated period it did not rain on 6 out of 10 days. The total rainfall during
the period is 5 𝑐𝑚.
Simulation in Business Processing:
Simulation in Investment and Budgeting:
Many business firms invest large sums to expand capacity, reduce production
cost and so on. There is considerable risk associated with each investment plan, and this
risk can be minimized if more is known about the effects of the many factors by
evaluating the alternative courses of action. If these alternatives involve many
parameters and interaction with large volume of data, it becomes difficult for the human
mind to digest and analyze all the relevant information. Simulation offers a great deal of
help by reducing the complexities in such cases.
The readers are no doubt familiar with the evaluation of investment proposals
using Discounted Cash Flow Method. The discounted rate of return is based on certain
items of information, such as investment, sales volume and prices, costs of production,
tax rates, and project life and so on. If there is a variation in one or more of these
parameters, the discounted rate of return is bound to change. By varying one or more of
these factors, it is possible to arrive at the new discounted rate of return, under each set
of varying conditions, and the effect on the rate of return. The simulation method
therefore enables the evaluation, without actually incurring the investment and waiting
for a long time. It also points out to the decision-maker the importance of one or more
parameters over others, on the rate of return.
Budgeting is another area where simulation can be very useful. A simulation
model in budgeting simplifies greatly the incorporation of the impact of changes in
various variables, which is otherwise manually difficult. A budget consists of many point
estimates, like estimate of quantity sold, estimate of selling price, etc. However, it is
719
International Journal of Current Research and Modern Education (IJCRME)
ISSN (Online): 2455 - 5428
(www.rdmodernresearch.com) Volume I, Issue I, 2016
preferable to consider a range of probable outcomes, because of the uncertainly
attached with various variables. Thus, each point estimate can be substituted by a
probability distribution. By the use of simulation, a probability distribution of the
expected profits is generated for use in the planning process.
Illustration:
An investment corporation wants to study the investment projects based on
three factors: market demand in units; price per unit minus cost per unit, and
investment required. These factors are felt to be independent of each other. In analyzing
a new consumer product, the corporation estimates the following probability
distributions.
𝑨𝒏𝒏𝒖𝒂𝒍 𝑫𝒆𝒎𝒂𝒏𝒅 𝑷𝒓𝒊𝒄𝒆 − 𝑪𝒐𝒔𝒕 𝑷𝒆𝒓 𝑼𝒏𝒊𝒕 𝑰𝒏𝒗𝒆𝒔𝒕𝒎𝒆𝒏𝒕 𝑹𝒆𝒒𝒖𝒊𝒓𝒆𝒅
𝑼𝒏𝒊𝒕𝒔 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑹𝒔. 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑹𝒔. 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚
20,000 0.05 3.00 0.10 17,50,000 0.25
25,000 0.10 5.00 0.20 20,00,000 0.50
30,000 0.20 7.00 0.40 25,00,000 0.25
35,000 0.30 9.00 0.20
40,000 0.20 10.00 0.10
45,000 0.10
50,000 0.05
Using simulation process, repeat the trial 10 times; compute the return on
investment for each trial taking these three factors into account. Approximately, what is
the most likely return?
Solution:
The yearly return can be determined by the formula.
𝑃𝑟𝑖𝑐𝑒 −𝐶𝑜𝑠𝑡 ×(𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑈𝑛𝑖𝑡𝑠 𝐷𝑒𝑚𝑎𝑛𝑑𝑒𝑑 )
𝑅𝑒𝑡𝑢𝑟𝑛 (𝑅) =
𝐼𝑛𝑣𝑒𝑠𝑡𝑚𝑒𝑛𝑡
To determine a cumulative probability distribution corresponding to each of the
three factors, we assign an appropriate set of random numbers representing each of the
three factors as shown in tables below.
Market Demand:
𝑨𝒏𝒏𝒖𝒂𝒍 𝑫𝒆𝒎𝒂𝒏𝒅 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑪𝒖𝒎𝒖𝒍𝒂𝒕𝒊𝒗𝒆 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑹𝒂𝒏𝒅𝒐𝒎 𝑵𝒖𝒎𝒃𝒆𝒓𝒔
20,000 0.05 0.05 00 − 04
25,000 0.10 0.15 05 − 14
30,000 0.20 0.35 15 − 34
35,000 0.30 0.65 35 − 64
40,000 0.20 0.85 65 − 84
45,000 0.10 0.95 85 − 94
50,000 0.05 1.00 95 − 99
Price-Cost:
𝑷𝒓𝒊𝒄𝒆 − 𝑪𝒐𝒔𝒕 𝑷𝒆𝒓 𝑼𝒏𝒊𝒕 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑪𝒖𝒎𝒖𝒍𝒂𝒕𝒊𝒗𝒆 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑹𝒂𝒏𝒅𝒐𝒎 𝑵𝒖𝒎𝒃𝒆𝒓𝒔
3.00 0.10 0.10 00 − 09
5.00 0.20 0.30 10 − 29
7.00 0.40 0.70 30 − 69
9.00 0.20 0.90 70 − 89
10.00 0.10 1.00 90 − 99
Investment:
𝑰𝒏𝒗𝒆𝒔𝒕𝒎𝒆𝒏𝒕 𝑹𝒆𝒒𝒖𝒊𝒓𝒆𝒅 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑪𝒖𝒎𝒖𝒍𝒂𝒕𝒊𝒗𝒆 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑹𝒂𝒏𝒅𝒐𝒎 𝑵𝒖𝒎𝒃𝒆𝒓𝒔
17,50,000 0.25 0.25 00 − 24
20,00,000 0.50 0.75 25 − 74
25,00,000 0.25 1.00 75 − 99
We prepare the simulation work-sheet for 10 trials. The simulated return (𝑅) is
also calculated by using the formula for 𝑅, the results of simulation are shown in table.
Simulation Worksheet:
720
International Journal of Current Research and Modern Education (IJCRME)
ISSN (Online): 2455 - 5428
(www.rdmodernresearch.com) Volume I, Issue I, 2016
𝑺𝒊𝒎𝒖𝒍𝒂𝒕𝒆𝒅 𝑺𝒊𝒎𝒖𝒍𝒂𝒕𝒆𝒅 𝑺𝒊𝒎𝒖𝒍𝒂𝒕𝒆𝒅
𝑺𝒊𝒎𝒖𝒍𝒂𝒕𝒊𝒐𝒏 𝑹𝑵 𝒇𝒐𝒓 𝑹𝑵 𝒇𝒐𝒓 𝑺𝒊𝒎𝒖𝒍𝒂𝒕𝒆𝒅 𝑹𝑵 𝒇𝒐𝒓
𝑫𝒆𝒎𝒂𝒏𝒅 𝑰𝒏𝒗𝒆𝒔𝒕𝒎𝒆𝒏𝒕 𝑹𝒆𝒕𝒖𝒓𝒏∗
𝑹𝒖𝒏 𝑫𝒆𝒎𝒂𝒏𝒅 𝑷𝒓𝒐𝒇𝒊𝒕 𝑷𝒓𝒐𝒇𝒊𝒕 𝑰𝒏𝒗𝒆𝒔𝒕𝒎𝒆𝒏𝒕
(‘𝟎𝟎𝟎) (‘𝟎𝟎𝟎) (%)
1 28 30 19 5.00 18 1750 8.57
2 57 35 07 3.00 67 2000 5.25
3 60 35 90 10.00 16 1750 20.00
4 17 30 02 3.00 71 2000 4.50
5 64 35 57 7.00 43 2000 12.25
6 20 30 28 5.00 68 2000 7.50
7 27 30 29 5.00 47 2000 7.50
8 58 35 83 9.00 24 1750 18.00
9 61 35 58 7.00 19 1750 14.00
10 30 30 41 7.00 97 2500 8.40
𝐷𝑒𝑚𝑎𝑛𝑑 ×𝑃𝑟𝑜𝑓𝑖𝑡 𝑃𝑒𝑟 𝑈𝑛𝑖𝑡
𝑆𝑖𝑚𝑢𝑙𝑎𝑡𝑒𝑑 𝑅𝑒𝑡𝑢𝑟𝑛∗ % = × 100
𝐼𝑛𝑣𝑒𝑠𝑡𝑚𝑒𝑛𝑡
The above table shows the highest likely return is 20% which is
corresponding to the annual demand of 35,000 units resulting in a profit of 𝑅𝑠. 10 per
unit and the required investment will be 𝑅𝑠. 17,50,000.
Simulation of an Inventory System:
Many of the inventory problems, especially storage problems, cannot be solved
analytically because of the complex nature of the distribution followed by demand or
supply. It is, however, possible to get the solution by using simulation techniques. The
basic approach would be to determine the probability distribution of the input and
output functions from the past data; and run the inventory system artificially by
generating the future observations on the assumption of the same distributions.
Subsequently, the decision-making regarding the optimization problems would be made
by the trial-and-error method.
The artificial samples for future can be generated with the help of random
numbers. In inventory control, the reorder point is to be chosen with consideration for
the demand during lead time to provide adequate service to customers. If both, the lead
time and demand of inventory per unit of time, are random variables, the simulation
technique can be used to investigate the effect of different inventory policies.
Illustration:
The automobile company manufactures around 150 scooters. The daily
production varies from 146 to 154 depending upon the availability of raw materials and
other working conditions.
𝑷𝒓𝒐𝒅𝒖𝒄𝒕𝒊𝒐𝒏
146 147 148 149 150 151 152 153 154
(𝑷𝒆𝒓 𝑫𝒂𝒚)
𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 0.04 0.09 0.12 0.14 0.11 0.10 0.20 0.12 0.08
The finished scooters are transported in a specially arranged lorry
accommodating 150 scooters. Using following random numbers,
80 81 76 75 64 43 18 26 10 12 65 68 69 61 57
Simulate the process to find out
(𝑖) What will be the average number of scooters waiting in the factory?
(𝑖𝑖) What will be the average number of empty space on the lorry?
Random Number Coding:
𝑷𝒓𝒐𝒅𝒖𝒄𝒕𝒊𝒐𝒏 𝑪𝒖𝒎𝒖𝒍𝒂𝒕𝒊𝒗𝒆 𝑹𝒂𝒏𝒅𝒐𝒎
𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚
𝑷𝒆𝒓 𝑫𝒂𝒚 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑵𝒖𝒎𝒃𝒆𝒓 𝑨𝒔𝒔𝒊𝒈𝒏𝒆𝒅
146 0.04 0.04 00 − 03
147 0.09 0.13 04 − 12
148 0.12 0.25 13 − 24
149 0.14 0.39 25 − 38
721
International Journal of Current Research and Modern Education (IJCRME)
ISSN (Online): 2455 - 5428
(www.rdmodernresearch.com) Volume I, Issue I, 2016
150 0.11 0.50 39 − 49
151 0.10 0.60 50 − 59
152 0.20 0.80 60 − 79
153 0.12 0.92 80 − 91
154 0.08 1.00 92 − 99
Based on the 15 random numbers given, we simulate the production per day in
the table below.
𝑹𝒂𝒏𝒅𝒐𝒎 𝑷𝒓𝒐𝒅𝒖𝒄𝒕𝒊𝒐𝒏 𝑵𝒐. 𝒐𝒇 𝑺𝒄𝒐𝒐𝒕𝒆𝒓𝒔 𝑵𝒐. 𝒐𝒇 𝑬𝒎𝒑𝒕𝒚
𝑺. 𝑵𝒐
𝑵𝒖𝒎𝒃𝒆𝒓 𝑷𝒆𝒓 𝑫𝒂𝒚 𝑾𝒂𝒊𝒕𝒊𝒏𝒈 𝑺𝒑𝒂𝒄𝒆𝒔 𝒊𝒏 𝒕𝒉𝒆 𝑳𝒐𝒓𝒓𝒚
1 80 153 3 −
2 81 153 3 −
3 76 152 2 −
4 75 152 2 −
5 64 152 2 −
6 43 150 0 0
7 18 148 − 2
8 26 149 − 1
9 10 147 − 3
10 12 147 − 3
11 65 152 2 −
12 68 152 2 −
13 69 152 2 −
14 61 152 2 −
15 57 151 1 −
𝑻𝒐𝒕𝒂𝒍 𝟐𝟏 𝟗
(𝑖) Average number of scooters waiting = 21 = 1.4 per day.
15
(𝑖𝑖) Average number of empty spaces = 9 15 = 0.6 per day.
Simulation of a Queueing System:
Queuing theory provides techniques for determining measures of
effectiveness, such as queue length, average waiting time, etc., when the distribution of
inter arrival times and service times are known. If costs be assigned to waiting time of
customers and idle time of the service facility, the problem of establishing a proper
balance between these costs can be determined.
Illustration:
A company has a single service station, which has the following characteristic:
The mean arrival rate of customers and the mean service time are 6.2 minutes and 5.5
minutes respectively. The time between an arrival and its services varies from one
minute to seven minutes. The arrival and service time distributions are given below
𝑻𝒊𝒎𝒆 (𝑴𝒊𝒏𝒖𝒕𝒆𝒔) 𝑨𝒓𝒓𝒊𝒗𝒂𝒍 (𝒑𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚) 𝑺𝒆𝒓𝒗𝒊𝒄𝒆 (𝒑𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚)
1−2 0.05 0.10
2−3 0.20 0.20
3−4 0.35 0.40
4−5 0.25 0.20
5−6 0.10 0.10
6−7 0.05 −
The queueing process starts at 11 𝑎𝑚 and closes at 12 𝑝𝑚. An arrival moves
immediately into the service facility if it is empty. On the other hand, if the service
station is busy, the arrival will wait in the queue. Customers are served on the first
come, first served basis. If the clerk’s wages are 𝑅𝑠. 6 per hour and the customer’s
waiting line costs 𝑅𝑠. 5 per hour would it be economical for the manager to engage the
second clerk? Use Monte-Carlo simulations technique.
Solution:
722
International Journal of Current Research and Modern Education (IJCRME)
ISSN (Online): 2455 - 5428
(www.rdmodernresearch.com) Volume I, Issue I, 2016
From the given frequency distribution of arrivals and service times, the
probabilities and cumulative probabilities are first worked out as shown in the
following table. These, then become the basis for generating arrival and service times in
conjunction with a table a table of random numbers.
1.2
Cumulative Probability 1
0.8
0.6
0.4
0.2
0
1 2 3 4 5 6
Time between Arrivals (minutes)
1.2
1
Cumulative Probability
0.8
0.6
0.4
0.2
0
1 2 3 4 5 6
Service Time (minutes)
Cumulative Probabilities:
𝑻𝒊𝒎𝒆 𝑩𝒆𝒕𝒘𝒆𝒆𝒏 𝑪𝒖𝒎𝒖𝒍𝒂𝒕𝒊𝒗𝒆 𝑺𝒆𝒓𝒗𝒊𝒄𝒆 𝑻𝒊𝒎𝒆 𝑪𝒖𝒎𝒖𝒍𝒂𝒕𝒊𝒗𝒆
𝑨𝒓𝒓𝒊𝒗𝒂𝒍𝒔 (𝑴𝒊𝒏𝒖𝒕𝒆𝒔) 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 (𝑴𝒊𝒏𝒖𝒕𝒆𝒔) 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚
1−2 0.05 1−2 0.10
2−3 0.25 2−3 0.30
3−4 0.60 3−4 0.70
4−5 0.85 4−5 0.90
5−6 0.95 5−6 1.00
6−7 1.00 6−7 1.00
As we have to use the random number table, first of all we allot the random
numbers to various intervals as shown in the table below:
𝑰𝒏𝒕𝒆𝒓𝑨𝒓𝒓𝒊𝒗𝒂𝒍 𝑹𝑵 𝑺𝒆𝒓𝒗𝒊𝒄𝒆 𝑹𝑵
𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚 𝑷𝒓𝒐𝒃𝒂𝒃𝒊𝒍𝒊𝒕𝒚
𝑻𝒊𝒎𝒆 (𝑴𝒊𝒏𝒖𝒕𝒆𝒔) 𝑨𝒍𝒍𝒐𝒕𝒕𝒆𝒅 𝑻𝒊𝒎𝒆 (𝑴𝒊𝒏𝒖𝒕𝒆𝒔) 𝑨𝒍𝒍𝒐𝒕𝒕𝒆𝒅
1−2 0.05 00 − 04 1−2 0.10 00 − 09
2−3 0.20 05 − 24 2−3 0.20 10 − 29
3−4 0.35 25 − 59 3−4 0.40 30 − 69
4−5 0.10 60 − 84 4−5 0.20 70 − 89
5−6 0.10 85 − 94 5−6 0.10 90 − 99
6−7 0.05 95 − 99 6−7 − −
723
International Journal of Current Research and Modern Education (IJCRME)
ISSN (Online): 2455 - 5428
(www.rdmodernresearch.com) Volume I, Issue I, 2016
A Simulation Work Sheet has been Developed in the Following Manner:
The random numbers developed above are related to the cumulative probability
distributions of arrival and service times. The first random number of arrival time is 64.
This numbers lies between 60 − 84 and indicates a simulated arrival time of 4 minutes.
All simulated arrival and service times have been worked out in a similar fashion.
After generating the arrival and service times from a table of random numbers,
the next step is to list the arrival time in the appropriate column. The first arrival comes
in 4 minutes after the starting time. This means that the clerk waited for 4 minutes
initially. It has been shown under the column-waiting time; clerk. The simulated service
for the first arrival is 3 minutes which results in the service being completed by
11.07 𝑎𝑚. The next arrival comes at 11.08 𝑎𝑚. Which indicates that no one has waited
in the queue.
The second arrival comes at 11.05 𝑎𝑚. But the services will begin only at
11.07 𝑎𝑚. Since the service of first arrival ends at 11.07 𝑎𝑚. This means that the second
arrival has waited for 2 minutes before the start of its service one customer waiting in
the queue is shown in the last column of the simulation table. The procedure has been
followed throughout the preparation of the simulation work sheet.
Simulation Work Sheet:
𝑰𝒏𝒕𝒆𝒓 𝑨𝒓𝒓𝒊𝒗𝒂𝒍 𝑺𝒆𝒓𝒗𝒊𝒄𝒆 𝑺𝒆𝒓𝒗𝒊𝒄𝒆 𝑾𝒂𝒊𝒕𝒊𝒏𝒈 𝑻𝒊𝒎𝒆
𝑹𝒂𝒏𝒅𝒐𝒎 𝑹𝒂𝒏𝒅𝒐𝒎 𝑳𝒊𝒏𝒆
𝑨𝒓𝒓𝒊𝒗𝒂𝒍 𝑻𝒊𝒎𝒆 𝑩𝒆𝒈𝒊𝒏𝒔 𝑻𝒊𝒎𝒆 𝑬𝒏𝒅𝒔
𝑵𝒖𝒎𝒃𝒆𝒓 𝑵𝒖𝒎𝒃𝒆𝒓 𝑪𝒍𝒆𝒓𝒌 𝑪𝒖𝒔𝒕𝒐𝒎𝒆𝒓 𝑳𝒆𝒏𝒈𝒕𝒉
𝑻𝒊𝒎𝒆 (𝒂𝒎) (𝒂𝒎) (𝒎𝒊𝒏) (𝒂𝒎)
64 4 11.04 11.04 30 3 11.07 4 − −
04 1 11.05 11.07 75 4 11.11 − 2 1
02 1 11.06 11.11 38 3 11.14 − 5 1
70 4 11.10 11.14 24 2 11.16 − 4 1
03 1 11.11 11.16 57 3 11.19 − 5 1
60 4 11.15 11.19 09 1 11.20 − 4 1
16 2 11.17 11.20 12 2 11.22 − 3 1
08 2 11.19 11.22 18 2 11.24 − 3 1
36 3 11.22 11.24 65 3 11.27 − 2 1
38 3 11.25 11.27 25 2 11.29 − 2 1
07 2 11.27 11.29 11 2 11.31 − 2 1
08 2 11.29 11.31 79 4 11.35 − 2 1
59 3 11.32 11.35 61 3 11.38 − 3 1
53 3 11.35 11.38 77 4 11.42 − 3 1
03 1 11.36 11.42 10 2 11.44 − 6 1
62 4 11.40 11.44 16 2 11.45 − 4 1
36 3 11.43 11.46 55 3 11.49 − 3 1
27 3 11.46 11.49 52 3 11.52 − 3 1
97 6 11.52 11.52 59 3 11.55 − − −
86 5 11.57 11.57 63 3 12.00 2 − −
𝟐𝟎 𝟓𝟕 𝟓𝟒 𝟔 𝟓𝟔 𝟏𝟕
The following information can be obtained from the simulation work sheet based
on the period of one hour only;
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝐶𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠 𝑖𝑛 𝑡𝑒 𝑊𝑎𝑖𝑡𝑖𝑛𝑔 𝑙𝑖𝑛𝑒 17
𝑎 𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑞𝑢𝑒𝑢𝑒 𝑙𝑒𝑛𝑔𝑡 = = = 0.85
𝑁𝑢𝑚𝑏𝑒𝑟 20
𝐶𝑢𝑠𝑡𝑜𝑚𝑒𝑟 𝑊𝑎𝑖𝑡𝑖𝑛𝑔 𝑡𝑖𝑚𝑒
𝑏 𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑊𝑎𝑖𝑡𝑖𝑛𝑔 𝑡𝑖𝑚𝑒 𝑜𝑓 𝐶𝑢𝑠𝑡𝑜𝑚𝑒𝑟 𝑏𝑒𝑓𝑜𝑟𝑒 𝑠𝑒𝑟𝑣𝑖𝑐𝑒 = 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝐴𝑟𝑟𝑖𝑣𝑎𝑙𝑠
56
= = 2.80 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
20
𝑇𝑜𝑡𝑎𝑙 𝑆𝑒𝑟𝑣𝑖𝑐𝑒 𝑡𝑖𝑚𝑒 54
𝑐 𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑆𝑒𝑟𝑣𝑖𝑐𝑒 𝑡𝑖𝑚𝑒 = = = 2.70 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝐴𝑟𝑟𝑖𝑣𝑎𝑙𝑠 20
𝑑 𝑇𝑖𝑚𝑒 𝑎 𝐶𝑢𝑠𝑡𝑜𝑚𝑒𝑟 𝑆𝑝𝑒𝑛𝑑𝑠 𝑖𝑛 𝑡𝑒 𝑆𝑦𝑠𝑡𝑒𝑚 = 𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑆𝑒𝑟𝑣𝑖𝑐𝑒 𝑡𝑖𝑚𝑒 +
𝐴𝑣𝑒𝑟𝑎𝑔𝑒 𝑊𝑎𝑖𝑡𝑖𝑛𝑔 𝑡𝑖𝑚𝑒 𝑏𝑒𝑓𝑜𝑟𝑒 𝑠𝑒𝑟𝑣𝑖𝑐𝑒 = 2.70 + 2.80 = 5.50 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
724
International Journal of Current Research and Modern Education (IJCRME)
ISSN (Online): 2455 - 5428
(www.rdmodernresearch.com) Volume I, Issue I, 2016
Simulation work sheet developed in the problem also states that if one or more
clerk is added, there is no need for a customer to wait in the queue. But before effecting
any decision, the cost of having an additional clerk has to be compared with the cost due
to customer waiting time. This can be worked out as follows
𝑶𝒏𝒆 𝑯𝒐𝒖𝒓 𝑷𝒆𝒓𝒊𝒐𝒅 𝑪𝒐𝒔𝒕 𝒘𝒊𝒕𝒉 𝑶𝒏𝒆 𝑪𝒍𝒆𝒓𝒌 𝑪𝒐𝒔𝒕 𝒘𝒊𝒕𝒉 𝑻𝒘𝒐 𝑪𝒍𝒆𝒓𝒌𝒔
𝐶𝑢𝑠𝑡𝑜𝑚𝑒𝑟 𝑤𝑎𝑖𝑡𝑖𝑛𝑔 𝑡𝑖𝑚𝑒
𝑅𝑠. 4.50 𝑁𝑖𝑙
(56 𝑚𝑖𝑛𝑢𝑡𝑒𝑠 × 𝑅𝑠. 5 𝑝𝑒𝑟 𝐻𝑜𝑢𝑟)
𝐶𝑙𝑒𝑟𝑘 ′ 𝑠𝐶𝑜𝑠𝑡 𝑅𝑠. 6.00 𝑅𝑠. 12.00
𝑇𝑜𝑡𝑎𝑙 𝑐𝑜𝑠𝑡 𝑜𝑓
𝑅𝑠. 10.50 𝑅𝑠. 12.00
𝑂𝑛𝑒 𝐻𝑜𝑢𝑟 𝑃𝑒𝑟𝑖𝑜𝑑
If the above analysis based on simulation for a period of one hour only is
representative of the actual situation, then it may be concluded that the cost with one
clerk is lower than what it is with two clerks. Hence, it would not be an economical
proposition to engage an additional clerk.
Conclusion:
Simulation is indeed a versatile tool. It provides one statistical estimates rather
than exact results and it only compares the alternatives rather than generating an
optimal one. It is a slow and costly way to study a problem. Despite limitations, it is an
invaluable tool in Operations Research.
References:
1. Sundarapandian, V. (2009). "7. Queueing Theory". Probability, Statistics and
Queueing Theory. PHI Learning. ISBN 8120338448.
2. Lawrence W. Dowdy, Virgilio A.F. Almeida, Daniel A. Menasce. "Performance by
Design: Computer Capacity Planning by Example".
3. Schlechter, Kira (March 2, 2009). "Hershey Medical Center to open redesigned
emergency room". The Patriot-News.
4. Mayhew, Les; Smith, David (December 2006). Using queuing theory to analyse
completion times in accident and emergency departments in the light of the
Government 4-hour target. Cass Business School. ISBN 978-1-905752-06-5.
Retrieved 2008-05-20.
5. Tijms, H.C, Algorithmic Analysis of Queues", Chapter 9 in A First Course in
Stochastic Models, Wiley, Chichester, 2003
6. Kendall, D. G. (1953). "Stochastic Processes Occurring in the Theory of Queues
and their Analysis by the Method of the Imbedded Markov Chain". The Annals of
Mathematical Statistics. 24 (3): 338. doi:10.1214/aoms/1177728975.JSTOR
2236285.
7. A.A. Markov, Extension of the law of large numbers to dependent quantities,
Izvestiia Fiz.-Matem. Obsch. Kazan Univ., (2nd Ser.), 15(1906), pp. 135–156 [Also
[37], pp. 339–361].
725