You are on page 1of 7

SIMULATION

INTRODUCTION

Simulation is a quantitative technique that involves setting up a model


of real situation and then performing experiments on the model.

OR

Simulation is the process of designing a model of a real system and


conduction experiments with this model for the purpose of
understanding the behavior for the operation of the system.

In general, the simulation technique is not an optimization


technique. Rather, it is a technique for estimating the measures
of performance of the modeled system. It is a reliable tool in
situations where mathematical analysis is either too complex or
too costly. Unlike various analytical methods there is no written
and fixed rule to guide the formulation of simulation models.
Each application of simulation is different from the other, ad
hoc to a large extent.
Q.1 Customers arrive at a milk booth for the required service. Assume that inter-arrival and
service times are constant and given by 1.8 and 4 time units respectively. Simulate the
system by hand computations for 14 time units. What is the average waiting time per
customer? What is the percentage idle time of the facility? [Assume that the system starts
at t = 0].

Solution : Let Ea denote the arrival event and Ed denote the departure event.
In the beginning, since the facility is free, so first customer starts service. Its
departure time is t = 0+4=4.
Next event (arrival) i.e. customer 2 occurs at t=0+1.8 = 1.8, which precedes Ed at t = 4.
Now, since the facility is still busy, customer 2 is put in the queue and is first to be considered in
this queue.
A new arrival event i.e. customer 3 occurs at t=1.8+1.8 = 3.6, which precedes Ed at t = 4.
Again customer 3 is put in the queue and a new arrival event i.e. customer 4 occurs at
t=3.6+1.8 = 5.4. This event succeeds Ed at t = 4. At this point, first customer departs which
leaves the facility free. Customer 2, who was the first to join the queue, now gets service. The
waiting time is computed as the time period form the instant he joined the queue until he
commences service. The procedure is repeated until the simulated period is completed. The
results of simulation are given in the following table :

Time Event Customer Waiting Time


0.0 Ea 1
1.8 Ea 2
3.6 Ea 3
4.0 Ed 1 4 – 1.8 = 2.2 (for customer 2)
5.4 Ea 4
7.2 Ea 5
8.0 Ed 2 8 – 3.6 = 4.4 (for customer 3)
9.0 Ea 6
10.8 Ea 7
12.0 Ed 3 12 – 5.4 = 6.6 (for customer 4)
13.6 Ea 8
14.0 End --- 14 – 7.2 = 6.8 (for customer 5)
14 – 9.0 = 5.0 (for customer 6)
14 – 10.8 = 3.2 (for customer 7)
14 – 13.6 = 0.4 (for customer 8)
From this simulation table, it is evident that

(i) Average waiting time per customer


= (2.2 + 4.4 + 6.6 + 6.8 + 5 + 3.2 + 0.4)/8 = 3.57 time units

(ii) Average waiting time per customer for those who must wait is 28.6/7 = 4.08 time
units and percentage idle time of the facility = 0%.
Q.2 A businessman deals in a perishable commodity, the daily demand and supply of which
are random variables. The past 500 days data show the following:

Supply Demand
Available Number of Demand Number of
(Kg.) days (Kg.) days
10 40 10 50
20 50 20 110
30 190 30 200
40 150 40 100
50 70 50 40

The businessman buys the commodity at Rs. 20 per kg. and sells at Rs. 30 per kg. If any of the
commodity remains at the end of the day it has no salable value and is a dead loss. Moreover,
the loss on any unsatisfied demand is Rs. 8 per kg.

Given the following random numbers. Simulate six days sales:

31 18 63 84 15 79 07 32 43 75 81 27

Use the random numbers in pairs alternately to simulate supply and demand.

Solution :

The demand and supply patterns yield probability distributions. The random numbers (R.N.)
00-99 are allotted for each level of supply or demand in the proportions indicated by the
probabilities as shown in the table below:

Supply Demand
Available Number Probability R.N. Demand Number Probability R.N.
(Kg.) of days (Kg.) of days

10 40 40/500 = 0.08 00-07 10 50 50/500 = 0.10 00-09


20 50 50/500 = 0.10 08-17 20 110 110/500 = 0.22 10-31
30 190 190/500 = 18-55 30 200 200/500 = 0.40 32-71
0.38
40 150 150/500 = 56-85 40 100 100/500 = 0.20 72-91
0.30
50 70 70/500 = 0.14 86-99 50 40 40/500 = 0.08 92-99
Using the given random numbers in pairs alternately to determine the levels of supply and
demand for each day. The first pair of random number is 31. Using this pair the amount
purchased on the first day is 30 kg. The second pair of random number is 18. This corresponds
to 20 kg. demand on the first day.

Continuing in this manner the first 6 days are simulated as shown below:

Day R.N. Supply R.N. Demand Cost Revenue Shortage Profit


(Kg.) (Kg.) (Rs.) (Rs.) (loss)
(at Rs.20 (at Rs.30 per (at Rs.8 per
per kg.) kg.) kg.)
1 31 30 18 20 600 20x30=600 -- --
2 63 40 84 40 800 40x30=1200 -- 400
3 15 20 79 40 400 20x30=600 20x8=160 200-160=40
(bcoz 20 (bcoz 40
available demanded
therefore 20 but 20
sell) fulfilled)
4 07 10 32 30 200 10x30=300 20x8=160 100-160= -60
5 43 30 75 40 600 30x30=900 10x8=80 300-80=220
6 81 40 27 20 800 20x30=600 -- -200

We observe from this table that during the simulated six days period the businessman makes a
net profit of Rs. 400 (400 + 40 – 60 + 220 – 200). However the number of simulations is too
small to draw any definite conclusions.
Q.3 The output of a production line is checked by an inspector for one or more of three
different typed of defects, called defects A, B and C. If defect A occurs, the item is
scrapped. If defect B or C occurs, the item must be reworked. The time required to rework
a B defect is 15 minutes and the time required to work a C defect is 30 minutes. The
probabilities of an A, B and C defects are 0.15, 0.20 and 0.10 respectively. For ten items
coming of the assembly line, determine the number of items without any defects, the
number scrapped and the total minutes of rework time. Use the following random
numbers :

R.N. for defect A 48 55 91 40 93 01 83 63 47 52


R.N. for defect B 47 36 57 04 79 55 10 13 57 03
R.N. for defect C 82 96 18 96 20 84 56 11 52 03
Solution:

Range of random numbers according to the probabilities of defects of three types A, B and C
can be summarized below:

Defect A Defect B Defect C


R.No. range Yes/No R.No. range Yes/No R.No. range Yes/No
00 – 14 Yes 00 – 19 Yes 00 – 09 Yes
15 – 99 No 20 – 99 No 10 – 99 No

The number of ten items coming off the assembly line without any defects and also the total
time for rework is obtained in the following table:

Item No. R. No. for R. No. for R. No. for Defects Rework
defect A defect B defect C Time
(minuts)
1 48 47 82 None --
2 55 36 96 None --
3 91 57 18 None --
4 40 04 96 B 15
5 93 79 20 None --
6 01 55 84 A Scrap
7 83 10 56 B 15
8 63 13 11 B 15
9 47 57 52 None --
10 52 09 03 B, C 45

From the above, we observe that during the simulated period, 5 out of 10 items had no defects,
1 item was scrapped and 90 minutes of total rework time was required.
Q.3 After studying the weekly receipts and payments over the past 200 weeks a retailer
developed the following information:

Simulate the weekly pattern of


Weekly Probability Weekly Probability
receipts and payments for the 12
receipts payments
weeks of the next quarter, (Rs.) (Rs.)
assuming a beginning bank balance 3,000 0.20 4,000 0.30
is Rs. 8,000. What is the estimated 5,000 0.30 6,000 0.40
balance at the end of the 12 7,000 0.40 8,000 0.20
weekly period? The highest weekly 12,000 0.10 1,0000 0.10
balance during the quarter, the
average weekly balance for the
quarter?
Random Numbers
For Receipts : 03, 91, 38, 55, 17, 46, 32, 43, 69, 72, 24, 22.
For Payments : 61, 96, 30, 32, 03, 88, 48, 28, 88, 18, 71, 99.
Solution :

A random number interval is assigned from 00-99 to both the receipts and the payments
according to the given information.

Receipts Probability Cumulative R.No. Payments Probability Cumulative R.No.


Probability Probability
3,000 0.20 0.20 00-19 4,000 0.30 0.30 00-29
5,000 0.30 0.50 20-49 6,000 0.40 0.70 30-69
7,000 0.40 0.90 50-89 8,000 0.20 0.90 70-89
12,000 0.10 1.00 90-99 10,000 0.10 1.00 90-99
Using the random numbers given, the receipts and payments as also the balance for various
weeks can be simulated as shown in the table given below:

From this table we observe that the balance at the end of the 12 weekly period is a deficit of
Rs. 3,000. The highest weekly balance during the quarter is Rs. 7,000 and the average balance
works out to be Rs. 3,750.
Week Receipts Payments Balance
R.N. Amount R.N. Amount (Rs.)
0 8,000
1 03 3,000 61 6,000 5,000
2 91 12,000 96 10,000 7,000
3 38 5,000 30 6,000 6,000
4 55 7,000 32 6,000 7,000
5 17 3,000 03 4,000 6,000
6 46 5,000 88 8,000 3,000
7 32 5,000 48 6,000 2,000
8 43 5,000 28 4,000 3,000
9 69 7,000 88 8,000 2,000
10 72 7,000 18 4,000 5,000
11 24 5,000 71 8,000 2,000
12 22 5,000 99 10,000 -3,000

You might also like