Professional Documents
Culture Documents
10(e).
SIMULATION
To make a proper understanding of a very big project, a small or pilot project is required i.e. a portrait of a big landscape. In this we will be able to know the technique of that . This is known as simulation.
Learning Objective
Introduction:
For various managerial problems discussed so far, we have been able to find a mathematical solution. However, in each of these cases the problem (e.g. linear programming or CPM/PERT) was simplified by certain assumptions so that the appropriate mathematical techniques could be employed. There are certain managerial situations which are so complex that mathematical solution is impossible given the current state of the art in mathematics. In many other cases, the solutions which result from simplifying assumptions are not suitable for the decision makers. In these cases, simulation offers a reasonable alternative.
What is simulation?
Simulation is a quantitative procedure which describes a process by developing a model of that process and then conducting a series of organized trial and error experiments to predict the behaviour of the process over time. Observing the experiments is much like observing the process in operating. To find how the real process would react to certain changes, we can introduce these changes in our model and simulate the reaction of the real process to them. For example, in designing an airplane, the designer can build a scale model and observe its behaviour in a wind tunnel. In simulation, we build mathematical models which we cannot solve and run them on trial data to simulate the behaviour or the system. Steps in the simulation process: All simulations vary in complexity form situation to situation. However, in general, one would have to go through the following steps: 1. 2. 3. 4. 5. 6. 7. 8. Define the problem or system you intend to simulate. Formulate the model you intend to use. Test the model, compare its behaviour with the behaviour of the actual problem environment. Identify and collect the data needed to test the model. Run the simulation. Analyze the results of the simulation and, if desired, change the solution you are evaluating. Return the simulation to test the new solution. Validate the simulation, that is, increase the chances that any inferences you draw about the real situation from running the simulation will be valid.
It may be noted that the fundamental principle of simulation is to make use of some device that can represent the phenomenon of a real-life system to enable us to understand the properties, behaviour and functional characteristics of the system. The device used can be any convenient means-a mathematical formula or a physical model. The aircrafts simulator to train pilots on new models of aircraft represents the use of physical model as a means of experimentation. The mathematical models of real-life situations in
investment analysis, scheduling or inventory control can be experimented; these are known as symbolic simulation models. These models can be either deterministic or probabilistic. The deterministic models can provide answers to what if type of questions in business problems. The probabilistic simulation models deal with random phenomenon and the method of simulation applied is known as Monte Carlo simulation.
87,
14,
98,
68
09
Using the sequence, simulate the demand for the next 10 days. Find out the stock situation if the owner of the bakery decides to make 35 cakes every day. Also estimate the daily average demand for the cakes on the basis of simulated data. Solution Computation of Random interval Demand 0 15 25 35 45 50 Probability 0.01 0.15 0.20 0.50 0.12 0.02 Probability .01 0.16 0.36 0.86 0.98 1.00 Random Interval 00 01-15 16-35 36-85 86-97 98-99 (In units) Closing stock (a+b-c) 0 0 20 20 20 10 30 15 15 35
Statement of Simulated Demand & Stocks Days 1 2 3 4 5 6 7 8 9 10 Opening stock (a) 0 0 0 20 20 20 10 30 15 15 Production (b) 35 35 35 35 35 35 35 35 35 35 Demand Random No 48 78 09 51 56 87 14 98 68 09 Units (C) 35 35 15 35 35 45 15 50 35 15
Problem 2 A company manufactures around 200 mopeds. Depending upon the availability of raw materials and other conditions, the daily production has been varying from 196 mopped to 204 mopped, whose probability distribution is as given below: Production per 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-storied lorry that can accommodate only 200 mopped. Using the following 15 random number 82, 89, 78, 24, 53, 61, 18, 45, 04, 23, 50, 77, 27, 54, 10 simulate the process to find out: (i) What will be the average number of mopeds waiting in the factory?
Solution Computation of Random interval Production Per day probability cumulative Random number probability 00-04 05-13 14-25 26-39 40-59 60-74 75-85 86-93 94-99
Simulated Closing stock & Empty space Statement Days Opening Production stock (a) Random No. Units (b) 1 0 82 202 2 2 89 203 3 5 78 202 4 7 24 198 5 5 53 200 6 5 61 201 7 6 18 198 8 4 45 200 9 4 04 196 10 0 23 198 11 0 50 200 12 0 77 202 13 2 27 199 14 1 54 200 15 1 10 197
Transfer in Lorry 200 200 200 200 200 200 200 200 200 198 200 200 200 200 198 Total Average
Empty space
Problem 3 Ramu and Raju are workers on a two-station assembly line. The distribution of activity times at their stations is as follows: Time in Time frequency Time frequency
Sec. For Ramu for Raju 10 4 4 20 6 5 30 10 6 40 20 7 50 40 10 60 11 8 70 5 6 80 4 4 The lost contribution is Rs. 300 per hour, if any job has to wait in the production line. (Cost of job lateness). (a) Simulate operation of the line for nine times for each workers. Use the random numbers given below: Operation 1 for Ramu : 14 61 01 82 96 00 44 23 74 operation 2 for Raju: 36 07 76 91 55 56 25 04 32 (b) Assuming Raju must wait until Ramu completes the first item before starting work, will he have to wait to process any of the other nine items? They are working as a group. Compute the total idle time of each worker for this batch of nine items. Also calculate the cost of job lateness. Solution Note 1: Time in seconds 10 20 30 40 50 60 70 80 Total Note 2: Time in seconds 10 20 30 40 50 60 70 80 Total (a) Computation of random interval for Raju Frequency Probability Probability 4 0.08 0.08 5 0.10 0.18 6 0.12 0.30 7 0.14 0.44 10 0.20 0.64 8 0.16 0.80 6 0.12 0.92 4 0.08 1.00 50 1.00 Random Interval 00-07 08-17 18-29 30-43 44-63 64-79 80-91 92-99 Computation of random interval for Ramu Frequency Probability Probability 4 0.04 0.04 6 0.06 0.10 10 0.10 0.20 20 0.20 0.40 40 0.40 0.80 11 0.11 0.91 5 0.05 0.96 4 0.04 1.00 100 1.00 Random Interval 00-03 04-09 10-19 20-39 40-79 80-90 91-95 96-99
Simulated Production statement for Ramu Units Start Random no. (a) 1 00 14 2 30 61
Finish (a+b) 30 80
Simulated Production statement for Raju Units Start Random no. (a) 1 00 36 2 40 07 3 50 76 4 110 91 5 180 55 6 230 56 7 280 25 8 310 04 9 320 32 (b) Units 1 2 3 4 5 6 7 8 9 Start 00 30 80 90 150 220 230 280 320 Simulated production statement when they act jointly Ramu Required 30 50 10 60 70 10 50 40 50 Finish 30 80 90 150 220 230 280 320 370 Start 30 80 90 150 220 270 320 350 370
Raju Required. 40 10 60 70 50 50 30 10 40
Total Idle time or Job lateness Total Idle time for the Batch: Ramu = 410 -370 Raju Lost of job lateness = 110 units @ Rs. 300 per 60 units = Rs. 550 40 units _50 units 90 units
Idle time Raju Job 30 -10 --------40 -40 -30 --10 50 110
Problem 4 Dr. Strong is a dentist who schedules all her patients for 30 minutes appointments. Some of the patients take more or less than 30 minutes depending on the type of dental work to be done. The following summary shows the various categories of work, their probabilities and the time needed to complete the work: Category Time required probability of category
Simulate the dentists clinic for four hours and determine the average waiting time for the patients as well as the idleness of the doctor. Assume that all the patients show up at the clinic 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 Solution Note 1: Computation of Random Interval Type Filling Crown Cleaning Extraction Checkup Probability 0.40 0.15 0.15 0.10 0.20 Probability .40 .55 .70 .80 1.00 Random Intervals 00-39 40 54 55-69 70-79 80-99
Note 2: Total Estimated working times of the Doctor = 4 hours Average service time per patients = 30 minutes. Therefore, No. of appointments = 4 hrs. 30 minutes per patients = 8 patients or appointment Answer: Simulated waiting time of patient & Doctors Reporting time Random Category Service of Doctors of patients no of work Start Req. in Finish minutes 8.00 AM 40 Crown 8 AM 60 9 AM 8.30 82 Check up 9 15 9.15 AM 9.00 11 Filling 9.15 45 10 9.30 34 10 45 10.45 10.00 25 10.45 45 11.30 10.30 66 Cleaning 11.30 15 11.45 11.00 17 Filling 11.45 45 12.30 PM 11.30 79 Extraction 12.30 PM 45 1.15 PM Total Avg. Waiting time Doctor Patients -----------30 15 30 45 60 45 60 285 35.63
Problem 5 A bakery chain delivers cakes to one of its retail stores each day. delivered each day is not constant but has the following distribution: Cakes delivered per day 10 11 12 13 14 Probability 0.05 0.10 0.15 0.35 0.20
The number of customers desiring cakes each day has the distribution: No. of customers 5 6 7 8 9 10 probability 0.10 0.15 0.20 0.40 0.10 0.05
Finally, the probability that a customer in need of cakes wants 1, 2, or 3 cakes described by Cakes to a customer 1 2 3 probability 0.40 0.40 0.20
Estimate by Monte Carlo methods the average number of cakes left over per day and the average number of sales per day owning to lack of cakes. Assume that left over cakes are given away at the end of each day. Random Nos for Cake delivery No of customer Cakes to customer 1 24 12 77 2 95 84 10 Run_________________________________ 3 4 5 6 10 45 84 87 72 36 05 51 58 01 02 97
Solution Note 1: Computation of Random interval of cake delivery No 10 11 12 13 14 15 16 Probability .05 .10 .15 .35 .20 .10 .05 1.00 Probability .05 .15 .30 .65 .85 .95 1.00 Random Intervals 00-04 04-14 15-29 30-64 65-84 85-94 95-99
Note 2: Computation of Random interval of Customers No of customers 5 6 7 8 9 10 Probability .10 .15 .20 .40 .10 .50 Probability .10 .25 .45 .85 .95 1.00 Random Intervals 00-09 10-24 25-44 45-84 85-94 95-99
Day
Answer: Statement of Simulated left over & lost sale Cake delivery No of customers Random no. Units (a) 12 16 11 13 14 15 Random no. 12 84 72 36 05 51 No. (b) 6 8 8 7 5 8
1 2 3 4 5 6
24 95 10 45 84 87
total Demand (d = b c) 12 8 16 7 5 24
1. Total ordering cost = No. of order ordering cost per order 2. Total Storing cost = Average stock Storing cost per unit 3. Stock out cost = Stock out units stock out cost per units
By Application of Monte Carlo simulation technique we can calculate the total inventory cost. Problem 6 A book store wishes to carry Mahabharata in stock. Demand is probabilistic and replenishment of stock takes 2 days (i.e. if an order is placed on March 1, it will be delivered at the end of the day on March 3). The probabilities of demand are given below : Demand (daily) 0 Probability 0.05 1 0.10 2 0.30 3 0.45 4 0.10
Each time an order is placed, the store incurs an ordering cost of Rs. 10 per order. The store also incurs a carrying cost of Re. 0.50 per book per day. The stock out cost is Rs. 18 per unit per day. The inventory carrying cost is calculated on the basis of stock at the end of each day. The demand of the day can be supplied from the receipt of the day. Order 5 books when the inventory at the beginning of the day plus orders outstanding is less than 8 books.
10
Currently (beginning of 1st day) the store has a stock of 8 books plus 6 books ordered two days ago and expected to arrive next day. Using Monte Carlo Simulation for 10 cycles, Find the total cost of inventory. The two digit random nos. are :89, 34, 78, 63, 61, 81, 93, 16, 13, 73
Solution Note 1: Computation of Random Interval Demand Probability 0 .05 1 .10 2 .30 3 .45 4 .10
Days
Simulated inventory Statement Opening stock Receipts Demand units In hands In Transit Random Units (c) (a) (b) No. (d) 8 5 9 6 3 0 2 0 3 7 6 6 0 0 5 (01) 5 (01) 5 (02) 5 (02+ 5 (03) 5 (03) 0 -6 ---5 (01) -5 (02) 5 (03) -89 34 78 63 61 81 93 16 13 73 3 2 3 3 3 3 4 2 1 3
1 2 3 4 5 6 7 8 9 10
ROL place order when (a +b <8) 8+6>8 5+6>8 9+0>8 6+0<8 3+5 =8 0+5<8 2+5<8 0+10>8 3+5 =8 7+0<8
(01) No order 02 03 No No 04
Total Cost of inventory Ordering cost = 4 order Rs. 10 Storing cost = 38 units Rs. 0.5 Stock out cost= 2 units Rs. 18 Total Rs. 40 19 __36 __95
Miscellaneous Problem
Problem 7 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 the 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 : Annual Demand (Price-Cost) per unit Investment Required Units Probability Rs. Probability Rs. Probability 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
11
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? Using the following random numbers for annual demand (price-cost) and the investment required: 28, 57, 60, 17, 64, 20, 27, 58, 61, 30, 19, 07, 90, 02, 57 28, 29, 83, 58, 41, 18, 67, 16, 71, 43, 68, 47, 24, 19, 97 Solution The yearly return can be determined by the formula: Return (R) = (Price cost) no. of units demanded Investment The results of the simulation are shown in the table given below: Trials Random No. of Demand Simulated demand (000) Random No. for profit (price-cost) per unit 19 07 90 02 57 28 29 83 58 41 simulated profit Random no. for investment Simulated investment (000) Simulated Return (%) demand profit per investment 6.36 4.00 14.55 3.50 9.33 5.83 5.83 13.10 10.18 7.00
1 2 3 4 5 6 7 8 9 10
28 57 60 17 64 20 27 58 61 30
35 40 40 35 40 35 35 40 40 35
5.00 3.00 10.00 3.00 7.00 5.00 5.00 9.00 7.00 7.00
18 67 16 71 43 68 47 24 19 97
2,750 3,000 2,750 3,000 3,000 3,000 3,000 2,750 2,750 3,500
Result: Above table shows that the highest likely return is 14.6% which is corresponding to the annual demand of 40,000 units resulting a profit of Rs. 10 per unit and the required investment will be Rs. 27,50,000. Problem 8 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 given by: Event probability No rain 0.50 1 cm. Rain 0.25 2 cm. Rain 0.15 3 cm. Rain 0.05 4 cm. Rain 0.03 5 cm. Rain 0.02
12
Simulate the citys whether for days & 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 70 06 78 76 for simulation. Assume that for the first day of the simulation it had not rained the day before. Solution The numbers 00-99 are allocated in proportion to the probabilities associated with each event if it rained on the previous day, the rain distribution and the random number allocated are given below: Event Probability Cumulative Random Probability numbers Assigned No rain 0.50 0.50 00-49 1 cm. Rain 0.25 0.75 50-74 2 cm. Rain 0.15 0.90 75-89 3 cm. Rain 0.05 0.95 90-94 4 cm. Rain 0.03 0.98 95-97 5 cm. Rain 0.02 1.00 98-99 Table 1: Rain on previous day Similarly, if it did not rain the previous day, the necessary distribution and the random number allocated is given below: Event probability cumulative Random Probability numbers Assigned No rain 0.75 0.75 00-74 1 cm. Rain 0.15 0.90 75-89 2 cm. Rain 0.06 0.96 90-95 3 cm. Rain 0.04 1.00 96-99 Table 2: No rain on previous day Let us now simulate tile rain fall for 10 days using the given random numbers. For tile first day it is assumed that it had not rained the day before: Day Random Event Numbers 1 67 No rain (from table 2) 2 63 No rain (from table 2) 3 39 no rain (from table 2) 4 55 No rain (from table 2) 5 29 no rain (from table 2) 6 78 1 cm. Rain (from table 2) 7 70 1 cm. Rain (from table 2)
13
Hence, during the simulated period, it did not rain on 6 days out of 10 days. The total rain fell during the period was 5 cm. _________
Problem 9 The output of a production line is checked by an inspector for one or more of three different types 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 rework 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 off the assembly line, determine tile number of items without any defects, the number scrapped and the total minutes of rework time. Use the following random numbers. RN for defect A 48 55 91 RN for defect B 47 36 57 RN for defect C 82 95 18
40
93
01
83
63
47
52
04
79
55
10
13
57
09
96
20
84
56
11
52
03
Solution The probabilities of occurrence of A, B and C defects are 0.15, 0.20 and 0.10 respectively. So, tile numbers 00-99 are allocated in proportion to the probabilities associated with each of the three defects Defect-A Random Numbers Assigned 00-14 15-99 Defect-B Random numbers assigned 00-19 20-99 Defect-C Exists? Random numbers assigned yes 00-09 no 10-99
Exists
Exists?
Yes No
yes No
Let us now simulate the output of the assembly line for 10 items using the given random numbers in order to determine the number of items without any defect, the number of items scrapped and the total minutes of rework time required: Item RN for RN for RN for whether Rework Remarks No. defect A defect B defect C any defect time (in Exists minutes) 1 48 47 82 none --2 555 36 95 none --3 91 57 18 none --4 40 04 96 B 15 -5 93 79 20 None --6 01 55 84 A -Scrap
14
During the simulated period, 5 out of the ten items had no defects, one item was scrapped and 90 minutes of total rework time was required by 3 items. _____ Problem 10 With a view to improving the quality of customer services, a Bank is interested in making an assessment of the waiting time of its customers coming to one of its branches located in a residential area. This branch has only one tellers counter. The arrived rate of the customers and the service rate of the teller are given below: Time between two consecutive arrivals of customers(in minutes) Probability
3 0.17 4 0.25 5 0.25 6 0.20 7 0.13 Service time by the teller Probability (in minutes) 3 0.10 4 0.30 5 0.40 6 0.15 7 0.05 You are required to simulate 10 arrivals of customers in the system starting 11 AM and show the waiting time of the customers and idle time of the teller. Use the following random numbers taking the first two random numbers digits each for trial and 20 on: 11,56,23.72,94,83,83,02,97,99,83,10,93,34,33,53,49,94,37 and 97. Solution Computation Of Random Interval : Time between two Consecutive arrivals of Customers (in minutes) 3 4 5 6 7 Probability Cumulative probability 0.17 0.42 0.67 0.87 1.00 Random Interval.
00 -16 17 - 41 42 - 66 67 - 86 87 99
15
Statement of simulated idle time S.NO. RanArrive Arrival Service dom l time time begins No. in A.M. A.M. Minutes 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Total 11 23 94 83 97 83 93 33 49 37 3 4 7 6 7 6 7 4 5 4 11.03 11.07 11.14 11.20 11.27 11.33 11.40 11.44 11.49 11.53 11.03 11.08 11.14 11.20 11.27 11.34 11.40 11.44 11.49 11.55
Random No 56 72 83 02 99 10 34 53 94 97
Service Service Waiting time Idle time ends for customer time of minutes A.M. (in minutes) Teller 5 5 6 3 7 4 4 5 6 7 11.08 11.13 11.20 11.23 11.34 11.38 11.44 11.49 11.55 12.02 4 1 1 2 10 3 1 4 2 -
Random Number
Random number
Number of deviations
16
Simulated sale price p. u. Simulated Fixed cost Simulated Variable cost Simulated Contribution p. u.
= 5,000 +400 (-0.8) = 4,680 = 300 +5 1.8 = Rs. 309 = 5,80,000 + 10,000 0.4 = Rs. 5,84,000 = 175 +6 0.2 = 176.2 = Simulated sale Simulated variable cost = 309 -176.2 = Rs. 132.8 p. u. = Simulated Fixed cost Simulated Contribution = 5,84,000 138.8 = 4,397.59 i.e. 4,398 units = 11,680 units @ Rs. 132.80 per unit 5,84,000 = Rs. 37,504
17