You are on page 1of 11

Operations Research | Richa Saxena

Chapter 6

SIMULATION
1. A bakery keeps stock of a popular brand of cake. Previous experience shows the daily demand pattern for the
item with associated probabilities, as given below:

Daily demand 0 10 20 30 40 50
Probability 0.01 0.20 0.15 0.50 0.12 0.02
Simulate the demand for the next ten days and estimate the daily average demand for the cakes based on
simulated data.

(a) Use the following sequence of random to estimate.


Random numbers: 40 19 87 83 73 84 29 09 02 20

Random Number Interval (RNI) Generator


Cummulative Random Number
Demand Probability
Probability Interval (RNI)
0 0.01 0.01 00-00
10 0.20 0.21 01-21
20 0.15 0.36 22-35
30 0.50 0.86 36-85
40 0.12 0.98 86-97
50 0.02 1.00 98-99

Simulation Worksheet
Day RN Demand Day RN Demand
1 40 30 6 84 30
2 19 10 7 29 20
3 87 40 8 09 10
4 78 30 9 02 10
5 73 30 10 20 10
Total 220
Average 22
(b) Use any two sequences of 10 random numbers to estimate the demand pattern.
Simulation Worksheet
Day RN1 Demand RN2 Demand
1 35 20 82 30
2 52 30 95 40
3 90 40 18 10
4 13 10 96 40
5 23 30 20 10
6 73 30 84 30
7 34 20 56 30
1
Operations Research | Richa Saxena
8 57 30 11 10
9 35 20 52 30
10 83 30 03 10
Total 260 240
Average 26 24

2. A confectioner sells confectionery items. Past data of demand per week in hundred kilograms with frequency is
given below:
Demand/week 0 5 10 15 20 25
Frequency 2 11 8 21 5 3
(a) Using the following sequence of random numbers, generate the demand for the next 15 weeks. Also, find
out the average demand per week.
Random numbers: 35 52 90 13 23 73 34 57
35 83 94 56 67 66 60
Random Number Interval (RNI) Generator
Demand Frequency Probability C.P. RNI
0 2 0.04 0.04 00-03
1 11 0.22 0.26 04-25
2 8 0.16 0.42 26-41
3 21 0.42 0.84 42-83
4 5 0.10 0.94 84-93
5 3 0.06 1.00 94-99
(b) Use any sequence of 15 random numbers from the table to estimate the demand.
Simulation Worksheet
Simulation Worksheet
Day RN1 (a) Demand RN2 (b) Demand
1 35 2 82 3
2 52 3 95 5
3 90 4 18 1
4 13 1 96 5
5 23 1 20 1
6 73 3 84 4
7 34 2 56 3
8 57 3 11 1
9 35 2 52 3
10 83 3 03 0
11 94 5 30 2
12 56 3 25 1
13 67 3 65 3
14 66 3 48 3
15 60 3 59 3
Total 41 38
Average 2.73 2.53

3. A tourist car operator finds that during the past few months, the usage of the cars has varied so much that the cost

2
Operations Research | Richa Saxena
of maintaining the car has varied considerably. During the past 200 days, the demand for cars fluctuated as
follows:
Trips/week 0 1 2 3 4 5
Frequency 16 24 30 60 40 30
Using the following random numbers, simulate the demand for 15 weeks.
Random Numbers:
82 95 18 96 20 84 56 11 52 03 30 25 65 48 59
Also, find the average demand per week.
Random Number Interval (RNI) Generator
Demand Frequency Probability C.P. RNI
0 16 0.08 0.08 00-07
1 24 0.12 0.20 08-19
2 30 0.15 0.35 20-34
3 60 0.30 0.65 35-64
4 40 0.20 0.85 65-84
5 30 0.15 1.00 85-99

Simulation Worksheet
Day RN Demand
1 82 4
2 95 5
3 18 1
4 96 5
5 20 2
6 84 4
7 56 3
8 11 1
9 52 3
10 3 0
11 30 2
12 25 2
13 65 4
14 48 3
15 59 3
Total 42
Average 2.8

4. The production line for a truck manufacturing company turns out about 50 trucks per day. The schedule is
affected by a variety of reasons and can be described by probability distribution as follows:
Production/day 45 46 47 48 49 50 51 52 53 54 55
Probability 0.03 0.05 0.07 0.10 0.15 0.20 0.15 0.10 0.07 0.05 0.03

Finished trucks are transported by train at the end of the day. If the train capacity is only 51, what will be the
average number waiting to be shipped and the average number of empty spaces in the train?

3
Operations Research | Richa Saxena

Use the following sequence of random numbers to simulate the production for the next 8 days:
37 35 63 25 50 71 95 16

RNI Generator
Production/day Probability CP RNI

45 0.03 0.03 00-02


46 0.05 0.08 03-07
47 0.07 0.15 08-14
48 0.10 0.25 15-24
49 0.15 0.40 25-39
50 0.20 0.60 40-59
51 0.15 0.75 60-74
52 0.10 0.85 75-84
53 0.07 0.92 85-91
54 0.05 0.97 92-96
55 0.03 1.00 97-99

Simulation Worksheet

Day RN Production Backlog Total Shipped Waiting Empty


Spaces
1 37 49  0  49 49  0  2
2 35 49  0 49 49  0  2
3 63  51  0 51 51  0  0
4 25  49  0 49 49  0  2
5 50  50  0 50 50  0  1
6 71  51  0 51 51  0  0
7 95  54  0 54 51  3  0
8 16  48  3 51 51  0  0
Average 50.5 3/8 7/8

5. A bookshop has studied the daily receipts and payments over the past 200 days and developed the following
information set.

Daily receipts (₹) Probability Daily payments (₹) Probability


3000 0.25 4000 0.35
5000 0.35 6000 0.45
7000 0.35 8000 0.15
12000 0.05 10000 0.05

Simulate the pattern of receipts and payments for 5 days, assuming further that the beginning bank balance is
Rs.8000. What is the estimated balance at the end of the period? What is the highest daily balance during this
period?

Use the following random numbers where the first two digits are for receipts and the last two digits are for
4
Operations Research | Richa Saxena
payments
3482, 7005, 3915, 3434, 4537

RNI Generator
Daily Probability C.P. RNI Daily Probability C.P. RNI
receipts payments
(₹) (₹)

3000 0.25 0.25 00-24 4000 0.35 0.35 00-34


5000 0.35 0.60 25-59 6000 0.45 0.80 35-79
7000 0.35 0.95 60-94 8000 0.15 0.95 80-94
12000 0.05 1.00 95-99 10000 0.05 1.00 95-99

6. A company manufactures around 200 mopeds per day. The schedule is affected by a variety of reasons and can
be described by probability distribution as follows:

Production/day 196 197 198 199 200 201 202 203 204
Probability 0.05 0.09 0.12 0.14 0.20 0.15 0.11 0.08 0.06

The finished mopeds are transported in a specially designed three-storeyed lorry that can accommodate only 200
mopeds. What will be the average number of mopeds waiting to be shipped and the average number of empty
spaces in the lorry?

Use the following sequence of random numbers to simulate the production for the next 8 days:
82 89 78 24 53 61 18 45 04 23
Same as Q4

7. A retailer deals in a perishable commodity. The daily demand and supply are random variables. The data for the
past 500 trading days are shown in the following demand and supply:

Supply Demand
Availability (kg) Number of days Demand (kg) Number of days
10 40 10 50
20 50 20 110
30 190 30 200
40 150 40 100
50 70 50 40
The retailer buys the commodity at ₹20 per kg and sells it at ₹30 per kg. Any commodity that remains at the end
of the day has no saleable value. Moreover, the loss (unearned profit) on any unsatisfied demand is ₹8 per kg.
5
Operations Research | Richa Saxena

Given the following pair of random numbers, stimulate six days of sales, demand and profit.
3118 6384 1579 0732 4375 8127

The first random number in the pair is for supply and the second random is for demand, viz., in the first pair
(3118), use 31 to simulate supply and 18 to simulate demand.

8. A company manufactures 50 items per day. The sale of these items depends upon demand which has the
following distribution:
Sales 47 48 49 50 51 52
Probability 0.10 0.15 0.20 0.35 0.15 0.05

The production costs and the sale price of each unit are Rs. 400 and Rs. 500, respectively. Any unsold product is
to be disposed of at a loss of Rs. 15 per unit. There is a penalty of Rs. 5 per unit if the demand is not met.
Using the following random numbers, estimate the total profit/loss for the company for the next 10 days:
35 52 90 13 23 73 34 57 35 83

6
Operations Research | Richa Saxena

9. Customers arrive at a ticket 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 computation for the first
10 customers. What is the average waiting time per customer? (Assume that the system starts at t=0)

10. A Hairstylist schedules all his clients for 30-minute appointments every day. Some clients take more or less than
30 minutes, depending on the service type. The following summary shows the various categories of work, their
probabilities and the time needed to complete the work:

Category of service Time Required (minutes) Probability of category


Hair-colour 45 0.40
Hair-spa 60 0.15
7
Operations Research | Richa Saxena
Hair-cut 15 0.15
Head-massage 45 0.10
Hair-styling 15 0.20

Simulate the hairstylist’s parlour for four hours and determine the average waiting time for the clients as well as
the idleness of the hairstylist. Assume that all clients show up at the parlour at exactly their scheduled arrival time
starting at 8:00 a.m. Use the following random numbers for handling the above problem:
40 82 11 34 25 66 17 79

Step I: RNI generator


Category Time Prob CP RNI
Hair-colour 45 0.40 0.40 0-39
Hair-spa 60 0.15 0.55 40-54
Hair-cut 15 0.15 0.70 55-69
Head-massage 45 0.10 0.80 70-79
Hair-styling 15 0.20 1.00 80-99
 
Step II: Simulation Worksheet
Client Time RN ST SB SE WT IT
1 8:00 40 60 8:00 9:00 0 0
2 8:30 82 15 9:00 9:15 30 0
3 9:00 11 45 9:15 10:00 15 0
4 9:30 34 45 10:00 10:45 30 0
5 10:00 25 45 10:45 11:30 45 0
6 10:30 66 15 11:30 11:45 60 0
7 11:00 17 45 11:45 12:30 45 0
8 11:30 79 45 12:30 1:15 60 0
            285  
 
Average WT = 35.625
Idleness = nil
11. Inter-interval and service duration studies over the past few years for a single service channel queuing system
revealed the following patterns:
Inter-arrival time Service time
2 0.19 1 0.15
4 0.22 3 0.28
6 0.32 5 0.30
8 0.17 7 0.17
10 0.10 9 0.10

Using the random number table given below, simulate the queue behaviour for 60 minutes
1908 3227 5974 8196 2748 4507 2665 5278 7792
4649 8512 8363 3410 4206 4397 0753 1748 2375

Use the above Simulation to estimate:


(a) The probability of the server being idle.
(b) The mean time spent by the customer waiting for service.
Step I: RNI generator
IAT Prob CP RNI ST Prob CP RNI
2 0.19 0.19 0-18 1 0.15 0.15 0-14
4 0.22 0.41 19-40 3 0.28 0.43 15-42
6 0.32 0.73 41-72 5 0.30 0.73 43-72
8 0.17 0.90 73-89 7 0.17 0.90 73-89
8
Operations Research | Richa Saxena
10 0.10 1.00 90-99 9 0.10 1.00 90-99

Step II: Simulation Worksheet


Customer RN IAT AT RN ST SB SE WT IT
1 19 4 4 08 1 4 5 0 4
2 32 4 8 27 3 8 11 0 3
3 59 6 14 74 7 14 21 0 3
4 81 8 22 96 9 22 31 0 1
5 27 4 26 48 5 31 36 5 0
6 45 6 32 07 1 36 37 4 0
7 26 4 36 65 5 37 42 1 0
8 52 6 42 78 7 42 49 0 0
9 77 8 50 92 9 50 59 0 1
10 46 6 56 49 5 59 64 3 0
11 85 8 - 12 - - - - -
  13 12
 
(a) Probability of idleness = 12/64=18.75%
(b) Mean Waiting Time = 13/10=1.3

12. A bookstore wishes to carry a particular book in stock. The demand for the book is not certain, and there is a lead
time of 2 days for stock replenishment. The probabilities of demand are given below:

Demand (units/day) 0 1 2 3 4
Probability 0.05 0.10 0.30 0.45 0.10

Each time an order is placed, the store incurs an ordering cost of ₹10 per order. The store also incurs carrying
costs of ₹0.5 per book per day. The inventory carrying cost is calculated based on stock at the end of each day.
The manager of the bookstore wishes to compare two options for his inventory decision:

A] Order 5 books when the present inventory plus any outstanding order falls below 8 books
B] Order 8 books when the present inventory plus any outstanding order falls below 8 books

Currently (beginning of 1st day), the store has a stock of 8 books plus 6 books ordered two days ago and are
expected to arrive the next day. Carryout simulation runs to recommend an appropriate option.

Use the following random numbers:


89 34 78 63 61 81 39 16 13 73
Step I: RNI Generator
Demand Prob CP RNI
0 0.05 0.05 0-4
1 0.10 0.15 5-14
2 0.30 0.45 15-44
3 0.45 0.90 45-89
5 0.10 1.00 90-99
Step II: [A] Simulation Worksheet
Day Opening Arrivals Total Stock RN Demand Closing Order
Stock Stock
1 8 0 8 89 3 5 -
2 5 6 11 34 2 9 -
3 9 0 9 78 3 6 5
4 6 0 6 63 3 3 -
5 3 0 3 61 3 0 5

9
Operations Research | Richa Saxena
6 0 5 5 81 3 2 5
7 2 0 2 39 2 0 -
8 0 5 5 16 2 3 -
9 3 5 8 13 1 7 5
10 7 0 7 73 3 4 -
            39 (4)
 
Total Cost = 39 X0.50 + 4X10 = 59.50
Do plan [B] and compare the cost.
13. A company manufactures 30 units per day. The sale of these items depends upon demand which has the
following distribution:
Sales (units/day) 27 28 29 30 31 32
Probability 0.10 0.15 0.20 0.35 0.15 0.05

Each unit’s production cost and sale prices are ₹40 and ₹50, respectively. Any unsold product is disposed of at a
loss of ₹15 per unit. There is a penalty of ₹5 per unit if the demand is not met. Using the following random
numbers, estimate the total profit/loss for the company for the next ten days:
10 99 65 99 95 01 79 11 16 20

If the company decides to produce 29 units per day, what is the advantage or disadvantage?

Same as Q8

14. PHC Plumbing and Heating Company maintains a stock of 30-gallon water heaters that it sells to homeowners
and installs for them. The owner likes the idea of having a large supply on hand to meet all customer demand, but
he also recognises that it is expensive. He examines hot water sales over the past 50 weeks and notes the
following:

Sales (units/week) 4 5 6 7 8 9 10
Number of weeks 6 5 9 12 8 7 3

Using the random numbers given below, simulate demand for 20 weeks and answer the following questions:
(a) If PHC maintains a constant supply of 8 water heaters in any given week, how many times will it be out of
stock during the 20-week simulation period?
(b) What is the average number of heaters demanded per week over the 20-week period?

Random Numbers:
10 24 03 32 23 59 95 34 34 51
08 48 66 97 03 96 46 74 77 44

Same as Q1 to Q3
15. Consider the case of a dealer of a certain product for which the probability distribution of daily demand and the
probability distribution of lead time, both developed empirically by the observations made over a long span of
period, are as follows:

Sales (units/day) 3 4 5 6 7 8 9 10 11 12
Probability 0.02 0.08 0.11 0.16 0.19 0.13 0.10 0.08 0.07 0.06

Probability distribution of lead time:


Lead time 2 3 4 5
Probability 0.20 0.30 0.35 0.15
10
Operations Research | Richa Saxena

The ordering cost is known to be ₹ 80 per order, the holding cost per unit is ₹ 2, while the unit shortage cost,
representing the loss in profits, is ₹ 20 per unit per day. The beginning inventory is 30 units. The dealer is
anxious to know, for the re-order quantity of 40 units and re-order level of 20 units, what would be the total
inventory costs (made up of ordering, holding, and shortage costs).

Use Simulation to assess the situation for 20 days.

Use the following Random Numbers


For Sales:
68 13 09 20 73 07 92 99 93 18
24 22 07 29 57 33 49 65 92 98

For Lead time


47 74 25 21 47
Same as Q12

Revision Problems
501. Minimise Z=40 x 1+ 70 x 2 +90 x 3
Subject to
x 1+ 2 x 2 +3 x3 ≥ 40
x 1+ x2 +3 x 3 ≥ 60
x1, x2 , x3 ≥ 0
502. Minimise Z=12 x 1 +8 x 2+ 8 x 3
Subject to
4 x1 + 4 x 2+ 4 x 3 ≥ 3
3 x 1+ x 2−9 x 3 ≥2
x1, x2 , x3 ≥ 0

503. A finished product must weigh exactly 150 grams. The two raw materials used in manufacturing the
product is A and B, with cost ₹2 and ₹8 per unit, respectively. Strength considerations dictate that the brick
should have at least 14 units of B and not more than 20 units of A. Each unit of A and B weighs 5 and 10
grams, respectively. How many units of each type of raw material should be used for each unit of the final
product to minimise cost? Formulate the above as a linear programming problem. Solve it using the
simplex method.

11

You might also like