1 chapter 18 if mathematical analysis is too difficult, we can try each possibility out on paper....

45
1 Chapter 18 If mathematical analysis is too difficult, we can try each possibility out on paper. That way we can find which alternative appears to work best over a series of hypothetical futures. Simulation

Upload: cristina-shaw

Post on 14-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

1

Chapter 18

If mathematical analysis is too difficult, we can try each possibility out on paper. That way we can find which alternative appears to work best over a series of hypothetical futures.

Simulation

2

Monte Carlo Simulation

Simulation is a trial and error approach. Possible future cases are generated in

accordance with underlying probabilities. Reality is duplicated using simple book-

keeping type record keeping. No complex mathematics is needed.

Numerical solutions are provided because: Analytic solutions may be difficult to obtain. Models require unrealistic assumptions.

3

Queuing Simulation ofSammy Lee’s Barbershop

Probability distributions are obtained for times between arrival and for service.

Random numbers generate time events. A log is kept.

Reality is duplicated just as if real customers were arriving for haircuts.

Times are not real. Customers are not real. The log entries are analyzed for key

summary statistics. These may be analogous to what would be

instead obtained from a mathematical model.

4

Queuing Simulation ofSammy Lee’s Barbershop

5

PERT Simulation

Simulation is a valuable tool in PERT because: Activity completion times are uncertain. The three-time-estimate approach gives useful

probability distributions. Traditional methods erroneously focus on

single paths. Simulation simply runs the project on paper

many times. Project completion times may be evaluated

statistically.

6

Probabilities for Time to Construct a House

The following data apply.

7

Simulating House Construction with PERT

QuickQuant provided these simulation results.

8

Simulating House Construction with PERT

The second QuickQuant screen tells us about unexpected longest paths.

The a priori critical path was of longest duration only 437 times out of 500. In some projects, it may be longest as little as 1% of the time, or less.

9

SimulationSpreadsheet Templates and Software

Simulation Templates

Palisade Decision Tools @RISK 4.0

10

Simulation Spreadsheet Templates

M/M/1 discrete arrivals and service M/M/1 exponential arrivals and service M/M/1 repeated simulation with Excel’s data table option Inventory, Discrete Demand,

Backordering Forecasting two parameter exponential

smoothing Risk Analysis Palisade Decision Tools @RISK 4.0

11

Generating Random Numbers(Figure 18-6)

123456789

101112

A B C D E

20 Random Numbers

0.04513 0.543800.81522 0.904100.49520 0.331190.59232 0.841400.39428 0.575530.40504 0.507530.10550 0.689530.29177 0.047960.70949 0.209350.10150 0.26348

3456789

101112

A B=RAND() =RAND()=RAND() =RAND()=RAND() =RAND()=RAND() =RAND()=RAND() =RAND()=RAND() =RAND()=RAND() =RAND()=RAND() =RAND()=RAND() =RAND()=RAND() =RAND()

Entering =RAND() in a cell returns a random number between zero and one.

=100*RAND() returns a two digit random number between 00 and 99

12

Simulation of Sammy Lee’s Barbershop (Figure 18-7)

1

23456789

101112131415161718192021222324252627353637383940414243

A B C D E F G

Time Clock Clock time Clock timeBetween time at at begin. Service at end of Waiting

Trial Arrivals arrival of service time service time1 0:10 9:10 AM 9:10 AM 0:25 9:35 AM 0:002 0:10 9:20 AM 9:35 AM 0:15 9:50 AM 0:153 0:25 9:45 AM 9:50 AM 0:10 10:00 AM 0:054 0:20 10:05 AM 10:05 AM 0:15 10:20 AM 0:005 0:20 10:25 AM 10:25 AM 0:20 10:45 AM 0:006 0:05 10:30 AM 10:45 AM 0:15 11:00 AM 0:157 0:10 10:40 AM 11:00 AM 0:10 11:10 AM 0:208 0:15 10:55 AM 11:10 AM 0:05 11:15 AM 0:159 0:15 11:10 AM 11:15 AM 0:20 11:35 AM 0:05

10 0:05 11:15 AM 11:35 AM 0:20 11:55 AM 0:2011 0:20 11:35 AM 11:55 AM 0:10 12:05 PM 0:2012 0:15 11:50 AM 12:05 PM 0:15 12:20 PM 0:1513 0:15 12:05 PM 12:20 PM 0:30 12:50 PM 0:1514 0:20 12:25 PM 12:50 PM 0:15 1:05 PM 0:2515 0:25 12:50 PM 1:05 PM 0:30 1:35 PM 0:1516 0:15 1:05 PM 1:35 PM 0:10 1:45 PM 0:3017 0:25 1:30 PM 1:45 PM 0:15 2:00 PM 0:1518 0:15 1:45 PM 2:00 PM 0:15 2:15 PM 0:1519 0:10 1:55 PM 2:15 PM 0:15 2:30 PM 0:2020 0:30 2:25 PM 2:30 PM 0:15 2:45 PM 0:05

Average 0:16:15 0:16:15 0:13:30

Sammy Lee's Barbershop Simulation Example

6789

B C D=VLOOKUP(RAND(),$A$29:$B$34,2) =+B6+9/(24) =+C6=VLOOKUP(RAND(),$A$29:$B$34,2) =+C6+B7 =IF(C7<F6,F6,C7)=VLOOKUP(RAND(),$A$29:$B$34,2) =+C7+B8 =IF(C8<F7,F7,C8)=VLOOKUP(RAND(),A$29:B$34,2) =+C8+B9 =IF(C9<F8,F8,C9)

26B C D E F G

=AVERAGE(B6:B25) =AVERAGE(E6:E25) =AVERAGE(G6:G25)

678

E F G=VLOOKUP(RAND(),$D$29:$E$34,2) =D6+E6 =D6-C6=VLOOKUP(RAND(),$D$29:$E$34,2) =D7+E7 =D7-C7=VLOOKUP(RAND(),$D$29:$E$34,2) =D8+E8 =D8-C8

4. If more than 20 trials are desired, copy the formulas down until the desired number is obtained. The ranges in the three average formulas must be adjusted to take this into account.

4. If more than 20 trials are desired, copy the formulas down until the desired number is obtained. The ranges in the three average formulas must be adjusted to take this into account.

1. Enter the arrival distribution in A29:B34 and the service distribution in D29:E34 (shown next).

1. Enter the arrival distribution in A29:B34 and the service distribution in D29:E34 (shown next).

3. Depress the F9 key to get a new simulation.

3. Depress the F9 key to get a new simulation.

2. Average results, Wq, W, Lq, and L are in cells G28:H31 (shown after the arrival and service distributions).

2. Average results, Wq, W, Lq, and L are in cells G28:H31 (shown after the arrival and service distributions).

13

Arrival and Service Distributions(Figure 18-8)

2829303132333435

A B C D E F

0 0:05 0 0:050.1 0:10 0.05 0:10

0.25 0:15 0.25 0:150.5 0:20 0.65 0:20

0.75 0:25 0.85 0:250.9 0:30 0.95 0:30

Arrival Distribution Service Distribution

293031323334

E=5/(24*60)=10/(24*60)=15/(24*60)=20/(24*60)=25/(24*60)=30/(24*60)

293031323334

B=5/(24*60)=10/(24*60)=15/(24*60)=20/(24*60)=25/(24*60)=30/(24*60)

If the arrival and service distributions have more than 6 probabilities then the table ranges in columns B and E must be adjusted to take this into account.

If the arrival and service distributions have more than 6 probabilities then the table ranges in columns B and E must be adjusted to take this into account.

14

Summary Results(Figure 18-9)

Average results: Wq, W, Lq, and L.Average results: Wq, W, Lq, and L.

2728

2930

31

G H I J K

Wq = 00:13:30

W = 00:29:45Lq = 0.78

L = 1.72

28

2930

31

H

=G26

=SUM(E6:E25,G6:G25)/20=SUM(G6:G25)/(F25-(C6-B6))

=SUM(G6:G25,E6:E25)/(F25-(C6-B6))

15

Inventory Simulation Data (Figure 18-15 top portion)

123456789

10

111213141516171819202122232425

A B C D E F G H I

INVENTORY SIMULATION (Backordering, Deterministic Demand)

PROBLEM: XYZ Copy Paper Policy

Problem InformationFixed Cost per Order: k = 20Unit Cost of Procuring an Item: c = 2Annual Holding Cost per Dollar Value: h = 0.25Penalty for Each Item Short: pS = 2

Selling Price per Unit: pR = 4

Number of Periods per Year: 12Beginning Inventory: 200Order Quantity: Q = 438Reorder Point: r = 200Lead Time: 1

Period Demand1 1502 1003 2004 2505 2006 1507 3008 250

Discrete Demand, BackorderingDiscrete Demand, Backordering

2. Enter the problem information

in G6:G15.

2. Enter the problem information

in G6:G15.

1. Enter the problem name in C3.

1. Enter the problem name in C3.

3. Enter the demands in D18:E25. If you have more than 8 periods, expand the table down to include all your demands.

3. Enter the demands in D18:E25. If you have more than 8 periods, expand the table down to include all your demands.

16

Inventory Simulation Results(Figure 18-15 bottom portion)

272829303132333435363738394041

42

434445464748495051

A B C D E F G H I J K LSimulation Results (Backordering)

Number of periods 8Procurement cost $2628.00Ordering cost $60.00Holding cost $45.50Shortage cost $296.00Total cost $3029.50Ending inventory -86Value of ending inventory -$172.00Net cost $3201.50Average net cost per period $400.19Number of trial periods simulated 8

PeriodBeginning Inventory

Quantity Received

Order Quantity Due In Demand

Ending Inventory

Procurement Cost

Order Cost

Holding Cost

Shortage Cost Total Cost

1 200 0 438 2 150 50 $0.00 $0.00 $5.21 $0.00 $5.212 50 438 0 - 100 388 $876.00 $20.00 $9.13 $0.00 $905.133 388 0 0 - 200 188 $0.00 $0.00 $12.00 $0.00 $12.004 188 0 438 5 250 -62 $0.00 $0.00 $3.92 $124.00 $127.925 -62 438 0 - 200 176 $876.00 $20.00 $3.67 $0.00 $899.676 176 0 438 7 150 26 $0.00 $0.00 $4.21 $0.00 $4.217 26 438 0 - 300 164 $876.00 $20.00 $3.96 $0.00 $899.968 164 0 438 9 250 -86 $0.00 $0.00 $3.42 $172.00 $175.42

Ave. 141 164 219 200 106 $328.50 $7.50 $5.69 $37.00 $378.69

Log of Inventory Simulation (Backordering)

123456789

10

111213141516171819202122232425

A B C D E F G H I

INVENTORY SIMULATION (Backordering, Deterministic Demand)

PROBLEM: XYZ Copy Paper Policy

Problem InformationFixed Cost per Order: k = 20Unit Cost of Procuring an Item: c = 2Annual Holding Cost per Dollar Value: h = 0.25Penalty for Each Item Short: pS = 2

Selling Price per Unit: pR = 4

Number of Periods per Year: 12Beginning Inventory: 200Order Quantity: Q = 438Reorder Point: r = 200Lead Time: 1

Period Demand1 1502 1003 2004 2505 2006 1507 3008 250

3. If more than 8 demands are entered in D18:E25 (shown previously) copy row 50 down the same number of rows and adjust the AVERAGE formulas in row 51 to include all the periods.

3. If more than 8 demands are entered in D18:E25 (shown previously) copy row 50 down the same number of rows and adjust the AVERAGE formulas in row 51 to include all the periods.

1. Simulation results.1. Simulation results. 2. The simulation details for each period.2. The simulation details for each period.

17

Inventory Simulation Formulas

272829303132333435363738394041

42

434445464748495051

A B C D E F G H I J K LSimulation Results (Backordering)

Number of periods 8Procurement cost $2628.00Ordering cost $60.00Holding cost $45.50Shortage cost $296.00Total cost $3029.50Ending inventory -86Value of ending inventory -$172.00Net cost $3201.50Average net cost per period $400.19Number of trial periods simulated 8

Period

1 200 0 438 2 150 50 $0.00 $0.00 $5.21 $0.00 $5.212 50 438 0 - 100 388 $876.00 $20.00 $9.13 $0.00 $905.133 388 0 0 - 200 188 $0.00 $0.00 $12.00 $0.00 $12.004 188 0 438 5 250 -62 $0.00 $0.00 $3.92 $124.00 $127.925 -62 438 0 - 200 176 $876.00 $20.00 $3.67 $0.00 $899.676 176 0 438 7 150 26 $0.00 $0.00 $4.21 $0.00 $4.217 26 438 0 - 300 164 $876.00 $20.00 $3.96 $0.00 $899.968 164 0 438 9 250 -86 $0.00 $0.00 $3.42 $172.00 $175.42

Ave.

123456789

10

111213141516171819202122232425

A B C D E F G H I

INVENTORY SIMULATION (Backordering, Deterministic Demand)

PROBLEM: XYZ Copy Paper Policy

Problem InformationFixed Cost per Order: k = 20Unit Cost of Procuring an Item: c = 2Annual Holding Cost per Dollar Value: h = 0.25Penalty for Each Item Short: pS = 2

Selling Price per Unit: pR = 4

Number of Periods per Year: 12Beginning Inventory: 200Order Quantity: Q = 438Reorder Point: r = 200Lead Time: 1

Period Demand1 1502 1003 2004 2505 2006 1507 3008 250

2829303132333435363738

F=MAX(D18:D25)=SUM(H43:H50)=SUM(I43:I50)=SUM(J43:J50)=SUM(K43:K50)=SUM(L43:L50)=G50=G50*G7=ABS(F35-F33)=F36/F28=MAX(D18:D25)

Simulation results formulas.Simulation results formulas.

18

Inventory Simulation Formulas

272829303132333435363738394041

42

434445464748495051

A B C D E F G H I J K LSimulation Results (Backordering)

Number of periods 8Procurement cost $2628.00Ordering cost $60.00Holding cost $45.50Shortage cost $296.00Total cost $3029.50Ending inventory -86Value of ending inventory -$172.00Net cost $3201.50Average net cost per period $400.19Number of trial periods simulated 8

PeriodBeginning Inventory

Quantity Received

Order Quantity Due In Demand

Ending Inventory

Procurement Cost

Order Cost

Holding Cost

Shortage Cost Total Cost

1 200 0 438 2 150 50 $0.00 $0.00 $5.21 $0.00 $5.212 50 438 0 - 100 388 $876.00 $20.00 $9.13 $0.00 $905.133 388 0 0 - 200 188 $0.00 $0.00 $12.00 $0.00 $12.004 188 0 438 5 250 -62 $0.00 $0.00 $3.92 $124.00 $127.925 -62 438 0 - 200 176 $876.00 $20.00 $3.67 $0.00 $899.676 176 0 438 7 150 26 $0.00 $0.00 $4.21 $0.00 $4.217 26 438 0 - 300 164 $876.00 $20.00 $3.96 $0.00 $899.968 164 0 438 9 250 -86 $0.00 $0.00 $3.42 $172.00 $175.42

Ave. 141 164 219 200 106 $328.50 $7.50 $5.69 $37.00 $378.69

Log of Inventory Simulation (Backordering)

123456789

10

111213141516171819202122232425

A B C D E F G H I

INVENTORY SIMULATION (Backordering, Deterministic Demand)

PROBLEM: XYZ Copy Paper Policy

Problem InformationFixed Cost per Order: k = 20Unit Cost of Procuring an Item: c = 2Annual Holding Cost per Dollar Value: h = 0.25Penalty for Each Item Short:

Selling Price per Unit:

Number of Periods per Year: 12Beginning Inventory: 200Order Quantity: Q = 438Reorder Point: r = 200Lead Time: 1

Period Demand1 1502 1003 2004 2505 2006 1507 3008 250

Simulation detail formulas.Simulation detail formulas.

51B

=AVERAGE(B43:B50)

434445

B C D E F=G12 =IF(A43<=$G$15,0,OFFSET(C43,-$G$15,1)) =IF(B43+C43<=$G$14,$G$13,0) =IF(D43>0,A43+$G$15,"-") =E18=G43 =IF(A44<=$G$15,0,OFFSET(C44,-$G$15,1)) =IF(B44+C44<=$G$14,$G$13,0) =IF(D44>0,A44+$G$15,"-") =E19=G44 =IF(A45<=$G$15,0,OFFSET(C45,-$G$15,1)) =IF(B45+C45<=$G$14,$G$13,0) =IF(D45>0,A45+$G$15,"-") =E20

434445

G H I=B43+C43-F43 =C43*$G$7 =IF(C43>0,$G$6,0)=B44+C44-F44 =C44*$G$7 =IF(C44=$G$13,$G$6,0)=B45+C45-F45 =C45*$G$7 =IF(H39=$G$13,$G$6,0)

434445

J K L=((IF(B43>0,B43,0)+IF(G43>0,G43,0))/2)*($G$8/$G$11)*$G$7 =IF(G43<0,-G43*$G$9,0) =H43+I43+J43+K43=((IF(B44>0,B44,0)+IF(G44>0,G44,0))/2)*($G$8/$G$11)*$G$7 =IF(G44<0,-G44*$G$9,0) =H44+I44+J44+K44=((IF(B45>0,B45,0)+IF(G45>0,G45,0))/2)*($G$8/$G$11)*$G$7 =IF(G45<0,-G45*$G$9,0) =H45+I45+J45+K45

19

Other Inventory Simulation Templates

Discrete Demand, Lost Sales

Normal Demand, Backordering

Normal Demand, Lost Sales

20

272829303132333435363738394041

42

434445464748495051

A B C D E F G H I J K L MSimulation Results (Lost Sales)

Number of periods 8Procurement cost $2628.00Ordering cost $60.00Holding cost $47.75Shortage cost $1096.00Total cost $3831.75Ending inventory 188Value of ending inventory $376.00Net cost $3455.75Average net cost per period $431.97Number of trial periods simulated 8

PeriodBeginning Inventory

Quantity Received

Order Quantity Due In Demand

Ending Inventory Lost Units

Procurement Cost

Order Cost

Holding Cost

Shortage Cost Total Cost

1 200 0 438 2 150 50 0 $0.00 $0.00 $5.21 $0.00 $5.212 50 438 0 - 100 388 0 $876.00 $20.00 $9.13 $0.00 $905.133 388 0 0 - 200 188 0 $0.00 $0.00 $12.00 $0.00 $12.004 188 0 438 5 250 0 62 $0.00 $0.00 $3.92 $248.00 $251.925 0 438 0 - 200 238 0 $876.00 $20.00 $4.96 $0.00 $900.966 238 0 0 - 150 88 0 $0.00 $0.00 $6.79 $0.00 $6.797 88 0 438 8 300 0 212 $0.00 $0.00 $1.83 $848.00 $849.838 0 438 0 - 250 188 0 $876.00 $20.00 $3.92 $0.00 $899.92

Ave. 144 164 164 200 143 34 $328.50 $7.50 $5.97 $137.00 $478.97

Log of Inventory Simulation (Lost Sales)

Discrete Demand, Lost SalesInventory Simulation Results

Bottom Portion of SpreadsheetBottom Portion of Spreadsheet

1. The data section (top portion) of the spreadsheet is identical with the backorders case seen previously.

1. The data section (top portion) of the spreadsheet is identical with the backorders case seen previously.

282930313233

F=MAX(D18:D25)=SUM(I43:I50)=SUM(J43:J50)=SUM(K43:K50)=SUM(L43:L50)=SUM(M43:M50)

4344

G H I J=IF(B43+C43-F43<0,0,B43+C43-F43) =IF(B43+C43-F43<0,-B43-C43+F43,0) =C43*$G$7 =IF(C43>0,$G$6,0)=IF(B44+C44-F44<0,0,B44+C44-F44) =IF(B44+C44-F44<0,-B44-C44+F44,0) =C44*$G$7 =IF(C44=$G$13,$G$6,0)

4344

K L M=((IF(B43>0,B43,0)+IF(G43>0,G43,0))/2)*($G$8/$G$11)*$G$7 =H43*($G$9+$G$10-$G$7) =I43+J43+K43+L43=((IF(B44>0,B44,0)+IF(G44>0,G44,0))/2)*($G$8/$G$11)*$G$7 =H44*($G$9+$G$10-$G$7) =I44+J44+K44+L44

123456789

10

11121314151617181920212223242526272829303132333435363738394041

42

434445464748495051

A B C D E F G H I J K L M

INVENTORY SIMULATION (Lost Sales, Discrete Demand)

PROBLEM: XYZ Copy Paper Policy

Problem InformationFixed Cost per Order: k = 20Unit Cost of Procuring an Item: c = 2Annual Holding Cost per Dollar Value: h = 0.25Penalty for Each Item Short: pS = 2

Selling Price per Unit: pR = 4

Number of Periods per Year: 12Beginning Inventory: 200Order Quantity: Q = 438Reorder Point: r = 200Lead Time: 1

Period Demand1 1502 1003 2004 2505 2006 1507 3008 250

Simulation Results (Lost Sales)Number of periods 8Procurement cost $2628.00Ordering cost $60.00Holding cost $47.75Shortage cost $1096.00Total cost $3831.75Ending inventory 188Value of ending inventory $376.00Net cost $3455.75Average net cost per period $431.97Number of trial periods simulated 8

PeriodBeginning Inventory

Quantity Received

Order Quantity Due In Demand

Ending Inventory Lost Units

Procurement Cost

Order Cost

Holding Cost

Shortage Cost Total Cost

1 200 0 438 2 150 50 0 $0.00 $0.00 $5.21 $0.00 $5.212 50 438 0 - 100 388 0 $876.00 $20.00 $9.13 $0.00 $905.133 388 0 0 - 200 188 0 $0.00 $0.00 $12.00 $0.00 $12.004 188 0 438 5 250 0 62 $0.00 $0.00 $3.92 $248.00 $251.925 0 438 0 - 200 238 0 $876.00 $20.00 $4.96 $0.00 $900.966 238 0 0 - 150 88 0 $0.00 $0.00 $6.79 $0.00 $6.797 88 0 438 8 300 0 212 $0.00 $0.00 $1.83 $848.00 $849.838 0 438 0 - 250 188 0 $876.00 $20.00 $3.92 $0.00 $899.92

Ave. 144 164 164 200 143 34 $328.50 $7.50 $5.97 $137.00 $478.97

Log of Inventory Simulation (Lost Sales)

3. Formulas not shown are the same as for the backorders case.

3. Formulas not shown are the same as for the backorders case.

2. Modifications are in columns G, H, and K. The: ending inventory cannot be negative, lost sales are computed, and the lost sales shortage cost is utilized.

2. Modifications are in columns G, H, and K. The: ending inventory cannot be negative, lost sales are computed, and the lost sales shortage cost is utilized.

21

Inventory Simulations with Normal Demand

For normally distributed demands, the spreadsheets are similar to the discrete demand cases. The only modifications are two new rows in the data section containing and the mean and standard deviation of the normal distribution, and the demands in column F are generated according to a normal distribution

=NORMINV(RAND(),,)

The templates for these cases are on the CD-ROM.

22

Forecasting Simulation(Figure 18-16)

1. Enter the problem name in C3.

1. Enter the problem name in C3. 2. Enter the

problem parameters in E7:E11

2. Enter the problem parameters in E7:E11

3. Depress the F9 key to get a new simulation.

3. Depress the F9 key to get a new simulation.

5. Mean Squared Error5. Mean Squared Error

4. Periods 12 - 96 are hidden so the results fit on one page.

4. Periods 12 - 96 are hidden so the results fit on one page.

123456789

1011

12

131415

1617181920212223242526

112113114115116117

A B C D E

PROBLEM: Sentinel Diesel Fuel Forecasting

Problem Parameters

Slope of Actual Trend Line = 20Standard Deviation for Actual Trend Line = 5Smoothing Constant = 0.10Trend Smoothing Constant = 0.20Number of Trials = 100

Period Actual Trend Trend Forecastt Sales, Yt Tt Slope, bt Sales, Ft

1 1,000 2 1,026 1,000 25.83 1,045 1,028 26.2 1,025.8 4 1,062 1,055 26.38 1,054.0 5 1,079 1,081 26.3 1,081.2 6 1,096 1,106 26.1 1,107.3 7 1,120 1,131 25.9 1,132.3 8 1,140 1,155 25.5 1,157.0 9 1,155 1,178 25.0 1,180.7

10 1,184 1,201 24.6 1,203.2 11 1,200 1,223 24.1 1,225.9 97 2,919 2,918 19.6 2,917.8 98 2,941 2,938 19.7 2,937.6 99 2,963 2,958 19.8 2,957.6

100 2,976 2,978 19.8 2,978.0

MSE = 456.82

FORECASTING SIMULATION RESULTS

1617

B1000=1000+$E$7*A16+ NORMINV(RAND(),0,$E$8)

23

Repeating Simulations with Excel’s Data Table Option (Figure 18-17)

43B C D E

=$H$28 =$H$29 =$H$30 =$H$31

42434445464748139140141142143

A B C D EWq W Lq L

Trial 12.50 29.25 0.6757 1.58111 17.75 37.50 0.8256 1.74422 3.75 19.25 0.1807 0.92773 1.75 17.75 0.0729 0.73964 6.75 22.75 0.3418 1.15195 24.75 43.75 1.1786 2.0833

96 17.75 34.00 0.9221 1.766297 4.75 20.00 0.2500 1.052698 2.75 17.50 0.1358 0.864299 12.50 29.75 0.6757 1.6081

100 6.75 24.50 0.3553 1.2895

1. To repeat the barbershop simulation 100 times, enter the numbers 1, 2, . . . , 100 in cells A44:A143.

1. To repeat the barbershop simulation 100 times, enter the numbers 1, 2, . . . , 100 in cells A44:A143.

2. Enter the formulas shown in cells B43:D43 (they refer back to Fig 18-8 shown previously).

2. Enter the formulas shown in cells B43:D43 (they refer back to Fig 18-8 shown previously).

3. Highlight cells A43:E143, click on Data on the menu bar and select Table to get the Table dialog box shown next.

3. Highlight cells A43:E143, click on Data on the menu bar and select Table to get the Table dialog box shown next.

4. Click the cursor in the Column input cell line, then on an empty cell, and then click the OK button. Cells A44:E143 will fill with the results of 100 simulations. The numbers you obtain will be different because of the random nature of the simulation process.

4. Click the cursor in the Column input cell line, then on an empty cell, and then click the OK button. Cells A44:E143 will fill with the results of 100 simulations. The numbers you obtain will be different because of the random nature of the simulation process.

24

Repeating Simulations with Excel’s Data Table Option (Figure 18-17)

Clicking on Data and selecting the Data Table option yields the Table dialog box.

Click in the Column input cell line, then click on any empty cell, and finally click the OK button. The result is 100 repetitions of the barbershop simulation.

If a different number of repetitions is desired, highlight a different number of rows (the number of repetitions is equal to the number of rows highlighted).

If a different number of repetitions is desired, highlight a different number of rows (the number of repetitions is equal to the number of rows highlighted).

25

Frequency Distribution(Figure 18-18)

Frequency Distribution of L, the Mean Number of Customers in the Barbershop

0

5

10

15

20

25

0.25 0.75 1 1.25 1.5 1.75 2 2.25 2.5 2.75 3 3.25 3.5 More

L, Mean number of Customers in the Barbershop

Freq

uenc

y

1. Using the Chart Wizard to graph the results of repeated simulation trials makes it easy to see how simulations results vary.

1. Using the Chart Wizard to graph the results of repeated simulation trials makes it easy to see how simulations results vary.

2. Here the 100 repetitions of L are graphed for the barbershop simulation. The L from the one simulation in Fig 18-9 is 1.72. It appears to be a rather untypical value.

2. Here the 100 repetitions of L are graphed for the barbershop simulation. The L from the one simulation in Fig 18-9 is 1.72. It appears to be a rather untypical value.

26

M/M/S Data Table SimulationTemplate

12

3

4

56789

10111213

15161718

A B C D E F G H I J K L

BASIC QUEUING SYSTEM EVALUATION -- MULTIPLE SERVERS

PROBLEM: Million Teller Bank Min Cost = $37.64 Lq = 0.27

Optimal S = 3 Wq = 0.31

Parameter Values:Mean Customer Arrival Rate: lambda = 0.875

Mean Customer Service Rate: mu= 0.564Customer Cost per Unit of Time = 6Server Cost per Unit of Time = 12

Server Customer Total Customer Total TotalServers P0 Lq L Wq W Cost Cost(Wq) Cost(Wq) Cost(W) Cost(W) Cost(Wq)

2 0.1267 2.3322 3.8824 2.6666 4.4389 $24.00 $13.99 $37.99 $23.29 $47.29 $37.993 0.1986 0.2727 1.8228 0.3118 2.0841 $36.00 $1.64 $37.64 $10.94 $46.94 $37.644 0.2099 0.0522 1.6023 0.0596 1.8320 $48.00 $0.31 $48.31 $9.61 $57.61 $48.315 0.2118 0.0103 1.5604 0.0118 1.7841 $60.00 $0.06 $60.06 $9.36 $69.36 $60.06

This portion of the spreadsheet calculates optimal number of servers and the corresponding minimum cost, Lq, and Wq for the M/M/S model. This information is used as input for a 100 trial simulation using Excel’s Data Table option, shown next.

This portion of the spreadsheet calculates optimal number of servers and the corresponding minimum cost, Lq, and Wq for the M/M/S model. This information is used as input for a 100 trial simulation using Excel’s Data Table option, shown next.

1. Enter the problem name in C3.

1. Enter the problem name in C3.

2. Enter the problem parameters in E7:E11

2. Enter the problem parameters in E7:E11

3

4

I

=MIN(L14:L100)

=MATCH(I3,L14:L100,0)

3

4

L

=VLOOKUP(I4,A14:F100,3)

=VLOOKUP(I4,A14:F100,5)

27

M/M/S Data Table SimulationTemplate

Each time the F9 key is depressed a new 100 trial simulation is obtained.

Each time the F9 key is depressed a new 100 trial simulation is obtained.

19

202122232425116117118119120

N O P Q R S TTrial Min Cost Opt S Lq Wq

0.890 0.739 $28.10 2 0.68 0.771 2.256 0.566 $72.87 5 2.146 0.9512 0.691 0.704 $25.87 2 0.311 0.4503 6.201 0.553 $175.35 13 3.225 0.5204 1.763 0.317 $95.02 7 1.836 1.0425 2.325 0.234 $156.45 12 2.075 0.89296 1.676 0.346 $85.48 6 2.246 1.34097 0.677 0.088 $127.03 10 1.172 1.73098 0.192 0.055 $65.00 5 0.833 4.34599 0.282 0.463 $17.70 1 0.949 3.369100 0.016 0.441 $12.01 1 0.001 0.086

28

Exponential Arrivals and Service(Figure 18-19)

123456789

10111213141516171819202122232425

A B C D E F G

Time Clock Clock time Clock timeBetween time at at begin. Service at end of Waiting

Trial Arrivals arrival of service time service time1 0:05 9:05 AM 9:05 AM 0:12 9:18 AM 0:002 0:17 9:23 AM 9:23 AM 0:23 9:46 AM 0:003 0:44 10:08 AM 10:08 AM 0:12 10:20 AM 0:004 0:17 10:25 AM 10:25 AM 0:14 10:39 AM 0:005 0:06 10:31 AM 10:39 AM 0:01 10:40 AM 0:076 0:02 10:34 AM 10:40 AM 0:02 10:43 AM 0:067 0:29 11:03 AM 11:03 AM 0:05 11:09 AM 0:008 0:15 11:19 AM 11:19 AM 0:17 11:37 AM 0:009 0:00 11:20 AM 11:37 AM 0:22 11:59 AM 0:17

10 0:09 11:29 AM 11:59 AM 0:05 12:05 PM 0:2911 0:39 12:09 PM 12:09 PM 1:02 1:11 PM 0:0012 0:31 12:40 PM 1:11 PM 0:00 1:11 PM 0:3013 0:23 1:04 PM 1:11 PM 0:06 1:17 PM 0:0614 0:24 1:28 PM 1:28 PM 0:06 1:34 PM 0:0015 0:10 1:38 PM 1:38 PM 0:00 1:39 PM 0:0016 0:07 1:45 PM 1:45 PM 0:31 2:17 PM 0:0017 0:15 2:01 PM 2:17 PM 0:20 2:38 PM 0:1618 0:12 2:14 PM 2:38 PM 0:24 3:02 PM 0:2419 0:01 2:15 PM 3:02 PM 0:13 3:16 PM 0:4620 0:45 3:01 PM 3:16 PM 0:37 3:54 PM 0:14

Sammy Lee's Barbershop Simulation ExampleExpnential Arrivals and Service Times

6E

=-E$36*LN(RAND())/(24*60)6B

=-B$36*LN(RAND())/(24*60)1. To redo the barbershop simulation in Fig. 18-7 with exponential interarrival and service times, the formulas in B6 and E6 are changed (as shown) and copied down to row 25 (trial 20).

1. To redo the barbershop simulation in Fig. 18-7 with exponential interarrival and service times, the formulas in B6 and E6 are changed (as shown) and copied down to row 25 (trial 20).

2. Cell B36 in the formula in cell B6 contains o the mean interarrival time.

2. Cell B36 in the formula in cell B6 contains o the mean interarrival time.

3. Cell E36 in the formula in cell E6 contains o the mean service time.

3. Cell E36 in the formula in cell E6 contains o the mean service time.

29

Four Seasons Villages(Figure 18-21)

123456789

1011121314151617181920212223242526272829

A B C D E F

RevenueHotel 20,400,000$ Motel 5,740,000$ Restaurants 12,770,000$ Theaters 14,640,000$ Bowling 1,960,000$ Billards 850,000$ Archery 345,000$ Ice Skating 1,544,000$ Retail Stores 18,345,000$ Snack Shops 950,000$ Total Revenues 77,544,000$

ExpensesCommon Area 13,100,000$ Advertising 5,400,000$ Insurance 1,100,000$ Security Guards 5,100,000$ Parking Attendants 2,870,000$ Real Estate Taxes 8,530,000$ Land Lease 16,000,000$ Total Expenses 52,100,000$

Net Operating ProfitDepreciation 4,186,400$

Profit Before Taxes 47,913,600$ Taxes 22,998,528$

Net Profit After Taxes 24,915,072$ Return on Investment 19.93%

Four Seasons Villages

14D

=SUM(D4:D13)

23D

=SUM(D16:D22)

26272829

D=D23-D25=D26*0.48=D26-D27=D28/125000000

1. In financial analysis a result, such as a rate of return or return in investment, is calculated based on estimates of all the factors involved.

1. In financial analysis a result, such as a rate of return or return in investment, is calculated based on estimates of all the factors involved.

2. In this example, estimates of revenues and costs lead to a calculated return on investment of 19.90%

2. In this example, estimates of revenues and costs lead to a calculated return on investment of 19.90%

3.Because this analysis does not take possible uncertainties in revenues and costs into account, the calculated return on investment might be misleading.

3.Because this analysis does not take possible uncertainties in revenues and costs into account, the calculated return on investment might be misleading.

30

Risk Analysis

Risk Analysis considers the uncertainty in all the factors that affect a result. It uses simulation to determines the result’s probability distribution. Two ways of performing repeated simulations are:

Excel’s Data Table option

Palisade Decision Tool’s @RISK

31

Four Seasons Villges Risk Analysis(Figure 18-22)

123456789

1011121314151617181920212223242526272829

A B C D E F

StandardRevenue Normal Mean Deviation

Hotel 25,344,365$ 20,400,000$ 5,340,000$ Motel 5,686,791$ 5,740,000$ 1,000,000$ Restaurants 10,941,615$ 12,770,000$ 4,350,000$ Theaters 10,964,598$ 14,640,000$ 3,300,000$ Bowling 1,801,710$ 1,960,000$ 505,000$ Billards 820,415$ 850,000$ 200,000$ Archery 275,917$ 345,000$ 100,000$ Ice Skating 1,673,893$ 1,544,000$ 200,000$ Retail Stores 14,321,316$ 18,345,000$ 5,000,000$ Snack Shops 868,605$ 950,000$ 300,000$ Total Revenues 72,699,225$ 77,544,000$

ExpensesCommon Area 14,781,892$ 13,100,000$ 1,500,000$ Advertising 6,221,008$ 5,400,000$ 1,000,000$ Insurance 1,301,882$ 1,100,000$ 200,000$ Security Guards 4,617,922$ 5,100,000$ 1,000,000$ Parking Attendants 2,998,575$ 2,870,000$ 500,000$ Real Estate Taxes 8,457,940$ 8,530,000$ 100,000$ Land Lease 16,000,000$ 16,000,000$ -$ Total Expenses 54,379,219$ 52,100,000$

Net Operating ProfitDepreciation 4,354,205$ 4,186,400$ 200,000$

Profit Before Taxes 50,025,014$ 47,913,600$ Taxes 24,012,007$ 22,998,528$

Net Profit After Taxes 26,013,007$ 24,915,072$ Return on Investment 20.81% 19.93%

Four Seasons Villages 1. Revenues and some costs are assumed to be normally distributed with the means in column E and standard deviations in column F. The formulas are shown next.

1. Revenues and some costs are assumed to be normally distributed with the means in column E and standard deviations in column F. The formulas are shown next.

3. 100 simulations using either Excel’s data table option or @RISK yields the return on investment histogram shown next.

3. 100 simulations using either Excel’s data table option or @RISK yields the return on investment histogram shown next.

32

Return on Investment Histogram(Figure 18-23)

Histogram

010

2030

40

16% 17% 18% 19% 20% 21% 22% 23% 24% More

Return on Investment

Fre

qu

en

cy

This histogram indicates that the return on investment probably will be some what higher that the 19.9% original estimate. It also indicates that the chance of a negative return on investment is zero.

This histogram indicates that the return on investment probably will be some what higher that the 19.9% original estimate. It also indicates that the chance of a negative return on investment is zero.

33

Tornado Graph(Figure 18-24)

Correlations for Return on Investment /D29

Coefficient Value

0123456789

10111213141516

-.50-1.00 .00 .50 1.00

Theaters /D7 -.006

Motel /D5 .008

Billards /D9 -.02

Restaurants /D6 -.021

Retail Stores /D12 -.027

Archery /D10 -.036

Real Estate Taxes /D21 .037

Hotel /D4 -.049

Ice Skating /D11 .065

Bowling /D8 -.078

Insurance/D18 .087

Depreciation /D25 -.135

Parking Attendants /D20 .211

Security Guards /D19 .406

Advertising /D17 .456

Common Area /D16 .716

Corr Coeff calculated at end of bars

1. @RISK provides several analytical tools, including information on the sensitivity of each output variable to the input distributions.

1. @RISK provides several analytical tools, including information on the sensitivity of each output variable to the input distributions.

2. As an illustration, this Tornado graph shows the correlation between each input and the return on investment. The higher the correlation the more significant is the input in determining the output’s value.

2. As an illustration, this Tornado graph shows the correlation between each input and the return on investment. The higher the correlation the more significant is the input in determining the output’s value. 3. Here, the common area cost is the most significant factor.3. Here, the common area cost is the most significant factor.

34

Four Seasons Villges Risk Analysis Formulas

123456789

1011121314151617181920212223242526272829

A B C D E F

StandardRevenue Normal Mean Deviation

Hotel 25,344,365$ 20,400,000$ 5,340,000$ Motel 5,686,791$ 5,740,000$ 1,000,000$ Restaurants 10,941,615$ 12,770,000$ 4,350,000$ Theaters 10,964,598$ 14,640,000$ 3,300,000$ Bowling 1,801,710$ 1,960,000$ 505,000$ Billards 820,415$ 850,000$ 200,000$ Archery 275,917$ 345,000$ 100,000$ Ice Skating 1,673,893$ 1,544,000$ 200,000$ Retail Stores 14,321,316$ 18,345,000$ 5,000,000$ Snack Shops 868,605$ 950,000$ 300,000$ Total Revenues 72,699,225$ 77,544,000$

ExpensesCommon Area 14,781,892$ 13,100,000$ 1,500,000$ Advertising 6,221,008$ 5,400,000$ 1,000,000$ Insurance 1,301,882$ 1,100,000$ 200,000$ Security Guards 4,617,922$ 5,100,000$ 1,000,000$ Parking Attendants 2,998,575$ 2,870,000$ 500,000$ Real Estate Taxes 8,457,940$ 8,530,000$ 100,000$ Land Lease 16,000,000$ 16,000,000$ -$ Total Expenses 54,379,219$ 52,100,000$

Net Operating ProfitDepreciation 4,354,205$ 4,186,400$ 200,000$

Profit Before Taxes 50,025,014$ 47,913,600$ Taxes 24,012,007$ 22,998,528$

Net Profit After Taxes 26,013,007$ 24,915,072$ Return on Investment 20.81% 19.93%

Four Seasons Villages 1. If Excel’s Data Table option is used to do the simulation use the formula below in cell D4.

1. If Excel’s Data Table option is used to do the simulation use the formula below in cell D4.

4D

=NORMINV(RAND(),E4,F4)

3. The formula used in cell D4 is copied down to dells D5:D14, D16:D21, and D25.

3. The formula used in cell D4 is copied down to dells D5:D14, D16:D21, and D25.

4D

=RiskNormal(E4,F4)

2. If @RISK is used to do the simulation use the formula below in cell D4.

2. If @RISK is used to do the simulation use the formula below in cell D4.

35

Hypothesis Testing Using Excel

456789

10111213

A B26.3 28.528.6 30.025.4 28.829.2 25.327.6 28.425.6 26.526.4 27.227.7 29.328.2 26.229.0 27.5

Figure 18-25 contains customer waiting times for 10-trial simulations of two alternative queuing organizations A and B.

Figure 18-25 contains customer waiting times for 10-trial simulations of two alternative queuing organizations A and B.

Hypothesis testing helps determine if one alternative is better than another. The null hypothesis is that the mean waiting times are identical under the two alternatives, under the assumption that the variances are unequal. A 5% significance level is used for the test.

Hypothesis testing helps determine if one alternative is better than another. The null hypothesis is that the mean waiting times are identical under the two alternatives, under the assumption that the variances are unequal. A 5% significance level is used for the test.

36

Data Analysis Dialog Box

Click on tools on the menu bar, select the Data Analysis option, and the Data Analysis dialog box appears. In it highlight t-Test: Two-Sample Assuming Unequal Variances, and click the OK button to get the t-Test:Two-Sample Assuming Unequal Variances dialog box shown next.

Click on tools on the menu bar, select the Data Analysis option, and the Data Analysis dialog box appears. In it highlight t-Test: Two-Sample Assuming Unequal Variances, and click the OK button to get the t-Test:Two-Sample Assuming Unequal Variances dialog box shown next.

37

t-Test: Two Sample Assuming Unequal Variances Dialog Box (Figure 18-26)1. Enter A4:A13

in the Variable 1 Range line (or $A$4:$A$13).

1. Enter A4:A13 in the Variable 1 Range line (or $A$4:$A$13).

2. Enter B4:B13 in the Variable 1 Range line (or $B$4:$B$13).

2. Enter B4:B13 in the Variable 1 Range line (or $B$4:$B$13).

3. Leave the Hypothesized Mean Difference line blank or put a zero in it.

3. Leave the Hypothesized Mean Difference line blank or put a zero in it.

4. Enter 0.05 in the Alpha box.

4. Enter 0.05 in the Alpha box.

5. After selecting one of the options in the Output options section, click on the OK button.

5. After selecting one of the options in the Output options section, click on the OK button.

38

t-Test Results(Figure 18-27)

Variable 1 Variable 2Mean 27.4 27.77Variance 1.94 2.209Observations 10 10Hypothesized Mean Difference 0df 18t Stat -0.5744P(T<=t) one-tail 0.2864t Critical one-tail 1.7341P(T<=t) two-tail 0.5728t Critical two-tail 2.1009

The t value of -0.5744 is much smaller than the two-tailed critical value of 2.1009. The null hypothesis that the means do not differ must be accepted. There appears to be no significant difference between the two alternatives.

The t value of -0.5744 is much smaller than the two-tailed critical value of 2.1009. The null hypothesis that the means do not differ must be accepted. There appears to be no significant difference between the two alternatives.

39

Palisade Decision Tools@RISK

The @RISK 4.0 software program on the CD-ROM accompanying this book can be used to perform simulations. The software permits the use of more than 30 probability distributions, it has options for analyzing results and it has the capability to incorporate correlations between input variables.

A few of the common distributions it permits are beta, binomial, chi-square, exponential, gamma, geometric, hypergeometric, normal, Poisson, triangular, and uniform.

40

@RISK

To start @RISK, click on the Windows Start button, select Programs, Palisade Decision Tools, then @RISK 4.0.

Both Excel and @RISK will open. You will see the normal Excel screen with two new tool bars, one for Palisade Decision Tools and the other for @RISK. The icons on these tool bars that will be used will be explained in the following slides.

41

Four Seasons Villges with @RISK

123456789

1011121314151617181920212223242526272829

A B C D E F

StandardRevenue Normal Mean Deviation

Hotel 25,344,365$ 20,400,000$ 5,340,000$ Motel 5,686,791$ 5,740,000$ 1,000,000$ Restaurants 10,941,615$ 12,770,000$ 4,350,000$ Theaters 10,964,598$ 14,640,000$ 3,300,000$ Bowling 1,801,710$ 1,960,000$ 505,000$ Billards 820,415$ 850,000$ 200,000$ Archery 275,917$ 345,000$ 100,000$ Ice Skating 1,673,893$ 1,544,000$ 200,000$ Retail Stores 14,321,316$ 18,345,000$ 5,000,000$ Snack Shops 868,605$ 950,000$ 300,000$ Total Revenues 72,699,225$ 77,544,000$

ExpensesCommon Area 14,781,892$ 13,100,000$ 1,500,000$ Advertising 6,221,008$ 5,400,000$ 1,000,000$ Insurance 1,301,882$ 1,100,000$ 200,000$ Security Guards 4,617,922$ 5,100,000$ 1,000,000$ Parking Attendants 2,998,575$ 2,870,000$ 500,000$ Real Estate Taxes 8,457,940$ 8,530,000$ 100,000$ Land Lease 16,000,000$ 16,000,000$ -$ Total Expenses 54,379,219$ 52,100,000$

Net Operating ProfitDepreciation 4,354,205$ 4,186,400$ 200,000$

Profit Before Taxes 50,025,014$ 47,913,600$ Taxes 24,012,007$ 22,998,528$

Net Profit After Taxes 26,013,007$ 24,915,072$ Return on Investment 20.81% 19.93%

Four Seasons Villages

1. The formula is D4 is also in D5:D14, D16:D21, and D25.

1. The formula is D4 is also in D5:D14, D16:D21, and D25.

4D

=RiskNormal(E4,F4)

2. Add cell D29 to the list of outputs by highlighting the cell and clicking on the Add Outputs icon.

2. Add cell D29 to the list of outputs by highlighting the cell and clicking on the Add Outputs icon.

3. Click on the Simulation Settings icon and the Simulation Settings dialog box opens as shown next.

3. Click on the Simulation Settings icon and the Simulation Settings dialog box opens as shown next.

42

Simulation Settings Dialog BoxIteration Tab

1. Enter 100 in the # Iterations line.

1. Enter 100 in the # Iterations line.

2. Enter 1 in the # Simulations line.

2. Enter 1 in the # Simulations line.

3. Clicking on the Sampling tab yields the dialog box shown next.

3. Clicking on the Sampling tab yields the dialog box shown next.

43

Simulation Settings Dialog Box Sampling Tab

Under Standard Recalc click in the Monte Carlo button and then click the OK button.

Under Standard Recalc click in the Monte Carlo button and then click the OK button.

44

Summary StatisticsClicking on the Start Simulation icon gives the Summary Statistics in the box within the @RISK-Results dialog box

Clicking on the Start Simulation icon gives the Summary Statistics in the box within the @RISK-Results dialog box

The minimum, mean, and maximum of the return on investment plus all the input variables is given in this dialog box.

The minimum, mean, and maximum of the return on investment plus all the input variables is given in this dialog box.

45

@ RISK Reports

1. In the @RISK dialog box, click on Results on the menu bar, select Report Settings, and the @RISK Reports dialog box appears.

1. In the @RISK dialog box, click on Results on the menu bar, select Report Settings, and the @RISK Reports dialog box appears.

2. A variety of reports and options can be selected.

2. A variety of reports and options can be selected.

3. Here a Tornado Graph in Excel is selected (as seen previously in Fig- 18-24).

3. Here a Tornado Graph in Excel is selected (as seen previously in Fig- 18-24).