Some solutions of simulation

Embed Size (px)

Citation preview

  • 8/7/2019 Some solutions of simulation

    1/13

    - 1 -

    Ans. 6

    The numbers 00-99 are allocated in proportion to the probabilities associated with each event as given below:

    Daily Demand Probability CumulativeProbability

    Random NumbersAllocated

    0 0.01 0.01 00-00

    10 0.20 0.21 01-20

    20 0.15 0.36 21-35

    30 0.50 0.86 36-85

    40 0.12 0.98 8697

    50 0.02 1.00 98-99

    Let us simulate the demand for the next 10 days using the given random numbers in order to find out the stock

    position if the owner of the bakery decides to make 30 breads every day. We will also estimate the daily averagedemand for the bread on the basis of simulated data.

    Day Random Number Simulated Demand Stock if 30 breadsare prepared every

    day

    1 48 30 0

    2 78 30 0

    3 19 10 20

    4 51 30 20

    5 56 30 20

    6 77 30 20

    7 15 10 40

    8 14 10 60

    9 68 30 60

    10 9 10 80

    Total 220

    Daily average demand of the basis of simulated data = 22

    Ans. 7:

    The random numbers are established as in Table below:

    Production probability cumulative Random numberPer day probability196 0.05 0.05 00-04197 0.09 0.14 05-13198 0.12 0.26 14-25199 0.14 0.40 26-39200 0.20 0.60 40-59201 0.15 0.75 60-74202 0.11 0.86 75-85203 0.08 0.94 86-93

    204 0.06 1.00 94-99

  • 8/7/2019 Some solutions of simulation

    2/13

    - 2 -

    Based on the 15 random numbers given we simulate the production per day as above in table 2below.

    Random No. Estimated No. of mopeds waiting No. of emptyProduction spaces in the lorryPer day

    Opening current current TotalBalance excess short waiting

    Production production

    1 82 202 -- 2 -- 2 ---2 89 203 2 3 --- 5 ---3 78 202 5 2 --- 7 ---4 24 198 7 -- 2 5 ---5 53 200 5 --- -- 5 --6 61 201 5 1 --- 6 ---7 18 198 6 --- 2 4 ---

    8 45 200 4 --- -- 4 ---9 04 196 4 --- 4 0 ---10 23 198 0 --- 2 0 211 50 200 0 -- -- -- ---12 77 202 0 2 -- 2 ---13 27 199 2 --- 1 1 ---14 54 200 1 -- -- 1 ---15 10 197 1 --- 3 _-- __2

    Total 42 __4

    Average number of mopeds waiting =15

    42= 2.80

    Average number of empty spaces in lorry =15

    4= 0.266

    Ans. 8:If the numbers 00-99 are allocated in proportion to the probabilities associated with eachcategory of work, then various kinds of dental work can be sampled, using random numbertable :-

    Type Probability Random Numbers

    Filling 0.40 00-39Crown 0.15 40-54

    Cleaning 0.15 55-69Extraction 0.10 70-79Checkup 0.20 80-99

    Using the given random numbers, a work sheet can now be completed as follows :-

    FUTURE EVENTS

    PATIENT SCHEDULED ARRIVAL RN CATEGORY SERVICE TIME

    1 8.00 40 Crown 60 minutes2 8.30 82 Checkup 15 minutes

    3 9.00 11 Filling 45 minutes4 9.30 34 Filling 45 minutes

  • 8/7/2019 Some solutions of simulation

    3/13

    - 3 -

    5 10.00 25 Filling 45 minutes6 10.30 66 Cleaning 15 minutes7 11.00 17 Filling 45 minutes8 11.30 79 Extraction 45 minutes

    Now, let us simulate the dentists clinic for four hours starting at 8.00 A.M.

    STATUS

    Time Event Number of the patient Patientsbeing served (time to go) waiting

    8.0 1st patient arrives 1st(60) -8.30 2nd arrives 1st(30) 2nd9.00 1st departs

    3rd arrives 2nd(15) 3rd9.15 2nd departs 3rd(45) -

    9.30 4

    th

    arrives 3

    rd

    (30) 4

    th

    10.00 3rd departs5th arrives 4th(45) 5th

    10.30 6th arrives 4th(15) 5th & 6th10.45 4th departs 5th(45) 6th11.00 7th arrives 5th(30) 6th & 7th11.30 5th departs

    8th arrives 6th(15) 7th & 8th11.45 6th departs 7th(45) 8th12.00 End 7th(30) 8th12.30 - 8th(45) -

    The dentist was not idle during the entire simulated period :-The waiting times for the patients were as follows :-

    Patient Arrival Service Starts Waiting (Minutes)

    1 8.00 8.00 02 8.30 9.00 303 9.00 9.15 154 9.30 10.00 305 10.00 10.45 456 10.30 11.30 607 11.00 11.45 45

    8 11.30 12.30 60Total 285

    The average waiting time of a patient was285

    15= 35.625 minutes.

    Ans. 9: Random allocation tables are as under:

    Time Arrival Arrivals Random Time Service Service Random(Mts) (Proba.) cumulative No. (Mts) (Proba.) Cumulative No.

    Probability allocated Probability allocated

    1 0.05 0.05 00-04 1 0.10 0.10 00-09

  • 8/7/2019 Some solutions of simulation

    4/13

    - 4 -

    2 0.20 0.25 05-24 2 0.20 0.30 10-293 0.35 0.60 25-59 3 0.40 0.70 30-694 0.25 0.85 60-84 4 0.20 0.90 70-895 0.10 0.95 85-94 5 0.10 1.00 90-996 0.05 1.00 95-99

    Simulation of ten trails:

    R. No. Arrival Mts. Time Start R. No. Time Mts. FinishTime

    Waiting Time

    Clerk Passanger

    60 4 9.04 9.04 09 1 9.05 4

    16 2 9.06 9.06 12 2 9.08 1

    08 2 9.08 9.08 18 2 9.10

    36 3 9.11 9.11 65 3 9.14 1

    38 3 9.14 9.14 25 2 9.16

    07 2 9.16 9.16 11 2 9.18

    08 2 9.18 9.18 79 4 9.22

    59 3 9.21 9.22 61 3 9.25 1

    53 3 9.24 9.25 77 4 9.29 1

    03 1 9.25 9.29 10 2 9.31 _ 4

    Total 6 6

    In half an hour trial, the clerk was idle for 6 minutes and the passengers had to wait for 6 minutes.

    Ans. 10:

    From the frequency distribut ion of arrivals and service times, probabilities and cumulat ive probabilities are

    first worked out as shown in the following table:

    Timebetweenarrivals

    Frequency ProbabilityCum.Prob.

    ServiceTime

    Frequency

    Prob.Cum.Prob.

    1

    2

    3

    4

    5

    6

    5

    20

    35

    25

    10

    5

    0.05

    0.20

    0.35

    0.25

    0.10

    0.05

    0.05

    0.25

    0.60

    0.85

    0.95

    1.00

    1

    2

    3

    4

    5

    6

    1

    2

    4

    2

    1

    0

    0.10

    0.20

    0.40

    0.20

    0.10

    0.00

    0.10

    0.30

    0.70

    0.90

    1.00

    1.00

    Total 100 10

    The random numbers to various intervals have been allotted in the following table:

    Time betweenarrivals

    Probability Randomnumbersallotted

    Service Time Probability Randomnumbersallotted

  • 8/7/2019 Some solutions of simulation

    5/13

    - 5 -

    1

    2

    3

    4

    56

    0.05

    0.20

    0.35

    0.25

    0.100.05

    00-04

    05-24

    25-59

    60-84

    85-9495-99

    1

    2

    3

    4

    56

    0.10

    0.20

    0.40

    0.20

    0.100.00

    00-09

    10-29

    30-69

    70-89

    90-99-

    Simulation Work Sheet

    RandomNumber

    Time tillnext

    arrival

    ArrivalTimea.m.

    Servicebeginsa.m.

    Randomnumber

    Servicetime

    ServiceEndsa.m.

    Clerk

    Waiting

    time

    CustomerwaitingTime

    Timespend bycustomerin system

    Lengthof

    waitingline

    64 4 11.04 11.04 30 3 11.07 04 - 3 -

    04 1 11.05 11.07 75 4 11.11 - 2 6 1

    02 1 11.06 11.11 38 3 11.14 - 5 8 2

    70 4 11.10 11.14 24 2 11.16 - 4 6 2

    03 1 11.11 11.16 57 3 11.19 - 5 8 2

    60 4 11.15 11.19 09 1 11.20 - 4 5 2

    16 2 11.17 11.20 12 2 11.22 - 3 5 2

    18 2 11.19 11.22 18 2 11.24 - 3 5 2

    36 3 11.22 11.24 65 3 11.27 - 2 5 1

    38 3 11.25 11.27 25 2 11.29 - 2 4 1

    07 2 11.27 11.29 11 2 11.31 - 2 4 1

    08 2 11.29 11.31 79 4 11.35 - 2 6 1

    59 3 11.32 11.35 61 3 11.38 - 3 6 153 3 11.35 11.38 77 4 11.42 - 3 7 1

    01 1 11.36 11.42 10 2 11.44 - 6 8 2

    62 4 11.40 11.44 16 2 11.46 - 4 6 2

    36 3 11.43 11.46 55 3 11.49 - 3 6 2

    27 3 11.46 11.49 52 3 11.52 - 3 6 1

    97 6 11.52 11.52 59 3 11.55 - - 3 -

    86 5 3 2 - 3 -

    20 57

    11.57 11.57 63

    54

    12.00

    6 56 26

    Average queue length =Number of customers in waiting line

    Number of arrivals=

    261.3

    20

    Average waiting time per customer =56

    2.820

    minutes

    Average service time =54

    2.720

    minutes

    Ans. 11:

    Cumulative frequency distribution for Ramu is derived below. Also fitted against it are the eight given randomnumbers. In parentheses are shown the serial numbers of random numbers.

  • 8/7/2019 Some solutions of simulation

    6/13

    - 6 -

    10 4 01 (2) 00 (7) 03 (8)

    20 10

    30 20 14 (1)

    40 40

    50 80 44 (4) 61 (5)

    60 91 82 (6)

    70 96 95 (3)

    80 100

    Thus the eight times are: 30, 10, 70, 50, 60, 10 and 10 respectively.

    Like wise we can derive eight times for Raju also.

    Col-1 Col-2 Col-3 (2 Col-2)

    10 4 8

    20 9 1830 15 30 25 (4)

    40 22 44 36 (1) 34 (8) 41 (6)

    50 32 64 55 (3) 56 (7)

    60 40 80 76 (2)

    70 46 92

    80 50 100 97 (5)

    (Note that cumulative frequency has been multiplied by 2 in column 3 so that all the given random numbers areutilized).

    Thus, Rajus times are: 40, 60, 50, 30, 80 40, 50 and 40 seconds respectively.

    Ramus and Rajus times are shown below to observe for waiting time, if any.

    1 2 3 4

    Ramu Cum. Times Raju Initial Rajus cumulative time with 30 secondsincluded

    30 30 40 70

    10 40 60 130

    70 110 50 180

    50 160 30 210

    50 210 80 290

    60 270 40 330

    10 280 70 400

    10 290 40 440

    Since col. 4 is consistently greater than Co.2, no subsequent waiting is involved.

    Ans. 12: 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 & the random no allocation are given

    below:

  • 8/7/2019 Some solutions of simulation

    7/13

    - 7 -

    Event Probability Cumulative RandomProbability numbers

    Assigned

    No rain 0.50 0.50 00-491 cm rain 0.25 0.75 50-74

    2 cm rain 0.15 0.90 75-893 cm rain 0.05 0.95 90-944 cm rain 0.03 0.98 95-975 cm rain 0.02 1.00 98-99

    Table 1 Rain on previous daySimilarly, if it did not rain the previous day, the necessary distribution and the random numberallocation is given below:

    Event Probability Cumulative RandomProbability numbers

    Assigned

    No rain 0.75 0.75 00-741 cm rain 0.15 0.90 75-892 cm rain 0.06 0.96 90-953 0.04 1.00 96-99

    Table 2- No rain on previous dayLet us now simulate the rain fall for 10 days using the given random numbers. For the first day it isassumed that it had not rained the day before:

    Day Random Numbers Event1 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 1)8 06 No rain (from table 1)9 78 1 cm rain (from table 2)10 76 2 cm rain (from table 1)

    Hence, during the simulated period, it did not rain on 6 days out of 10 days. The total rain fall duringthe period was 5 cm.

    Ans.13:

    The probabilities of occurrence of A, B and C defects are 0.15, 0.20 and 0.10 respectively. So, tilenumbers 00-99 are allocated in proportion to the probabilities associated with each of the threedefects

    Defect-A Defect-B Defect-C

    Exists Random Exists? Random Exists? Random

    Numbers numbers numbers

    Assigned assignedassigned

    Yes 00-14 yes 00-19 yes 00-09

    No 15-99 No 20-99 no 10-99

  • 8/7/2019 Some solutions of simulation

    8/13

    - 8 -

    Let us now simulate the output of the assembly line for 10 items using the given random numbers inorder to determine the number of items without any defect, the number of items scrapped and thetotal minutes of rework time required:

    Item RN for RN for RN for whether ReworkRemarks

    No. defect A defect B defect C any defect time (inExists 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

    7 83 10 56 B 15 ---

    8 63 13 11 B 15 ---

    9 47 57 52 None -- --10 52 09 03 B,C 15+30 =45 --

    During the simulated period, 5 out of the ten items had no defects, one item was scrapped and 90minutes of total rework time was required by 3 items.

    Answer 14:

    The question is not happily worded, if we go by the language of the question, the following solution can be worked

    out:

    First of all, random numbers 00-99 are allocated in proportion to the probabilities associated with demand as givenbelow:

    Demand Probability Cum. Probability Random Nos.

    0 0.05 0.05 00-04

    1 0.10 0.15 05-14

    2 0.30 0.45 15-44

    3 0.45 0.90 45-89

    4 0.10 1.00 90-99

    Based on the ten random numbers given, we simulate the demand per day in the table given below.

    It is given that stock n hand = 8 and stock on order = 6 (expected next day). Let us now consider both the options

    stated in the question.

    Option A: Order 5 Books, when the inventory at the beginning of the day plus orders outstanding is less than 8

    books:

    Day RandomNo.

    SalesDemand

    Op.Stock in

    hand

    Qty.Order

    Qty.Recd. Atend ofthe day

    TotalQty. onorder

    ClosingStock

    1 89 3 8 - - 6 5

    2 34 2 5 - 6 - 9

    3 78 3 9 - - - 6

    4 63 3 6 5 - 5 3

  • 8/7/2019 Some solutions of simulation

    9/13

    - 9 -

    5 61 3 3 - - 5 0

    6 81 3 0 0

    7 39 2

    8 16 2

    9 13 110 73 3

    Now on day 6, there is stock out position since 5 units will be received at the end of the day and demand occurringduring the day can not be met. Hence, it will into be possible to proceed further and we will have to leave the answer

    at this stage.

    RandomNo.

    SalesDemand

    OpeningStock in

    hand

    Qty.Order

    Qty.Recd. Atend ofthe day

    TotalQty. onorder

    ClosingStock

    1 89 3 8 -- -- 6 5

    2 34 2 5 -- 6 -- 9

    3 78 3 9 -- -- -- 6

    4 63 3 6 8 -- 8 3

    5 61 3 3 -- -- 8 0

    6 81 3 0 -- 8 --

    7 39 2

    8 16 2

    9 13 1

    10 73 3

    Now on day 6, there is stock out position since 8 units will be received at the end of the day and demand occurring

    during the day can not be met. Hence, it is not possible to proceed further and we may leave the answer at thisstage.

    Alternatively, if we assume that the demand occurring during the day can be met out of stock received at the end of

    the day, the solution will be as follows:

    Stock in hand = 8 and stock on order = 6 (expected next day)

    RandomNo.

    SalesDemand

    OpeningStock in

    hand

    Qty.Order

    Qty.Recd. Atend of

    the day

    TotalQty. onorder

    ClosingStock

    1 89 3 8 -- -- 6 5

    2 34 2 5 -- 6 -- 9

    3 78 3 9 -- -- -- 6

    4 63 3 6 5 -- 5 3

    5 61 3 3 -- -- 5 0

    6 81 3 0 5 5 5 2

    7 39 2 2 5 -- 10 0

    8 16 2 0 -- 5 5 3

    9 13 1 3 -- 5 -- 7

    10 73 3 7 5 -- 5 4

  • 8/7/2019 Some solutions of simulation

    10/13

    - 10 -

    Carrying Cost = 39 0.50 = Rs.19.50

    Ordering Cost = 4 10 = Rs.40.00

    Total Cost = Rs.59.50

    Option B: Order 8 Books, when the inventory at the beginning of the day plus orders outstanding is less than 8

    books:

    RandomNo.

    SalesDemand

    OpeningStock in

    hand

    Qty.Order

    Qty.Recd. Atend ofthe day

    TotalQty. onorder

    ClosingStock

    1 89 3 8 -- -- 6 5

    2 34 2 5 -- 6 -- 9

    3 78 3 9 -- -- -- 6

    4 63 3 6 8 -- 8 3

    5 61 3 3 -- -- 8 06 81 3 0 -- 8 -- 5

    7 39 2 5 8 -- 8 3

    8 16 2 3 -- -- 8 1

    9 13 1 1 -- 8 -- 8

    10 73 3 8 -- -- -- 5

    Carrying Cost = 45 0.50 = Rs.22.50

    Ordering Cost = 2 10 = Rs.20.00

    Total Cost = Rs.42.50

    Since Option B has lower cost, Manager should order 8 books.

    Ans.15

    Demand (Tons) Probability Cumulative Probability Random Nos. Allocated

    1 0.15 0.15 00-14

    2 0.30 0.45 15-44

    3 0.45 0.90 45-89

    4 0.10 1.00 90-99

    Option-I

    RN Demand Opening

    Stock

    Receipts Closing

    Stock

    Op.Stock

    on Order

    Order Cl.Stock on

    Order

    88 3 8 - 5 - - 6

    41 2 5 6 9 - - -

    67 3 9 - 6 - 5 5

    63 3 6 - 3 5 - 5

    48 3 3 - 0 5 5 10

    74 3 0 5 2 5 5 10

    27 2 2 - 0 10 - 10

    16 2 0 5 3 5 - 5

    11 1 3 5 7 - 5 5

    64 3 7 - 4 5 - 5

    49 3 4 - 1 5 5 1021 2 1 5 4 5 - 5

  • 8/7/2019 Some solutions of simulation

    11/13

    - 11 -

    44

    (Rs.)

    No of order placed 5

    Ordering cost (5x1000)

    Closing Stock 44

    Carrying cost (44x50)Total

    5,000

    2,2007,200

    Option-II

    RN Demand Opening

    Stock

    Receipts Closing

    Stock

    Op.Stock

    on Order

    Order Cl.Stock on

    Order

    88 3 8 - 5 - - 6

    41 2 5 6 9 - - -

    67 3 9 - 6 - 8 8

    63 3 6 - 3 8 - 8

    48 3 3 - 0 8 - 874 3 0 8 5 - 8 8

    27 2 5 - 3 8 - 8

    16 2 3 - 1 8 - 8

    11 1 1 8 8 - - -

    64 3 8 - 5 - 8 8

    49 3 5 - 2 8 - 8

    21 2 2 - 0

    47

    8 - 8

    (Rs.)

    No of orders 3 Ordering cost 3 x 1000Closing stock 47 Carrying cost 47x50

    Total

    3,0002,350

    5,350

    Analysis: Since the cost of inventory is less in Option II, it is suggested to implement.

    Ans. 16

    (i) Allocation of random numbers

    Demand Probability Cumulative probability Allocated RN

    0

  • 8/7/2019 Some solutions of simulation

    12/13

    - 12 -

    1 27 450 450 300 3375 12000 2175

    2 15 150 150 600 1125 2400 -1275

    3 56 750 750 -- 5625 -- 5625

    4 17 150 150 600 1125 2400 -1275

    5 98 1650 750 -- 5625 --- 5625 9006 71 750 750 -- 5625 -- 5625

    7 51 750 750 -- 5625 -- 2175

    8 32 450 450 300 3375 1200 5625

    9 62 750 750 -- 5625 -- 5625 300

    10 83 1050 750 -- 5625 -- 5625 900

    11 96 1650 750 -- 5625 -- 5625

    12 69 750 750 -- 5625 5625

    54000 7200 46800 2100

    (iii) Loss on lost sale 21007.5 = Rs15750.

    Ans. 17

    The demand and supply patterns yield the following probability distribution. The numbers 00-99 are

    allocated in proportion to the probabilities associated with each event.

    Availability(Kg.)

    Prob. Cum.Prob.

    RandomNumbersallocated

    Demand(Kg)

    Prob. Cum.Prob.

    Randomnumber

    allocated

    10 0.08 0.08 00-07 10 0.10 0.10 00-0920 0.10 0.18 08-17 20 0.22 0.32 10-31

    30 0.38 0.56 18-55 30 0.40 0.72 32-71

    40 0.30 0.86 56-85 40 0.20 0.92 72-91

    50 0.14 1.00 86-99 50 0.08 1.00 92-99

    Let us simulate the supply and demand for the next six days using the given random numbers in order to find the

    profit if the cost of the commodity is Rs.20 per kg, the selling price is Rs.30 per kg, loss on any unsatisfied demandis Rs.8 per kg and unsold commodities at the end of the day have no saleable value.

    Day Random

    no.

    Supply

    availability

    Random

    no.

    Demand Buying

    costRs.

    Selling

    costRs.

    Loss for

    unsatisfieddemand

    Profit

    1 31 30 18 20 600 600 -- --

    2 63 40 84 40 800 1200 -- 400

    3 15 20 32 40 400 600 160 40

    4 07 10 32 30 200 300 160 -60

    5 43 30 75 40 600 900 80 220

    6 81 40 27 20 800 600 -- -200

    During the simulated period of six days, the net profit of the retailer is

    = (400 + 40 + 220) (60 + 200)

  • 8/7/2019 Some solutions of simulation

    13/13

    - 13 -

    = 660 260

    = Rs.400

    Ans. 19:

    Random No. Coding Table - ReceiptsAmount (Rs. In crores) Probability Cum. Probability Random No. Interval

    30 0.20 0.20 00-1942 0.40 0.60 20-5936 0.25 0.85 60-8499 0.15 1.00 85-99

    Random No. Coding Table - PaymentsAmount (Rs. In crores) Probability Cum. Probability Random No. Interval

    33 0.15 0.15 00-1460 0.20 0.35 15-3439 0.40 0.75 35-74

    57 0.25 1.00 75-99

    Simulation TableWeek Op.Balance Receipts Payments Cl.Balance

    RandomNo.

    Amount(in crores)

    RandomNo.

    Amount(in crores)

    1 15 17 30 78 57 -122 -12 43 42 16 60 -303 -30 74 36 35 39 -334 -33 31 42 23 60 -515 -51 72 36 44 39 -546 -54 46 42 92 57 -697 -69 51 42 58 39 -66

    8 -66 68 36 8 33 -639 -63 93 99 58 39 -310 -3 54 42 78 57 -1811 -18 96 99 54 39 4212 42 9 30 77 57 15

    (i) Probability is = 10 12 = 0.83

    (ii) Total Shortfall is Rs. 399 crores. Therefore average shortfall is 399 12 = Rs. 33.25 croresAlternatively, average shortfall is 399 10 = Rs. 39.90 crores

    (iii) There will be a shortfall in 5 months i.e. 4,5,6,7,8. therefore the probability is 5 12 = 0.42