76
DECISION MODELING DECISION MODELING WITH WITH MICROSOFT EXCEL MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Monte Carlo Simulation Part 2

DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Embed Size (px)

Citation preview

Page 1: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

DECISION MODELINGDECISION MODELINGWITH WITH

MICROSOFT EXCELMICROSOFT EXCEL

Chapter 9

Copyright 2001Prentice Hall

Monte Carlo SimulationMonte Carlo Simulation

Part 2

Page 2: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Simulation can be used for models in which the question Simulation can be used for models in which the question is “How much of this should we do?”is “How much of this should we do?”

We will now use an inventory control model to provide We will now use an inventory control model to provide an illustration of simulation.an illustration of simulation.THE OMELET PAN PROMOTION:THE OMELET PAN PROMOTION:HOW MANY PANS TO ORDER?HOW MANY PANS TO ORDER?

In Foslins, certain sections of the housewares In Foslins, certain sections of the housewares department have just suffered their second consecutive department have just suffered their second consecutive bad year. bad year.

An Inventory Control Example:An Inventory Control Example:Foslins HousewaresFoslins Housewares

Due to competition, the gourmet cooking, glassware, Due to competition, the gourmet cooking, glassware, stainless flatware, and contemporary dishes sections of stainless flatware, and contemporary dishes sections of Foslins are not generating enough revenue to justify the Foslins are not generating enough revenue to justify the amount of floor space.amount of floor space.

Page 3: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

To fight back, the chief buyer reorganized the sections To fight back, the chief buyer reorganized the sections that are in trouble to create a store within a store. that are in trouble to create a store within a store.

With these changes, plus the store’s reputation for With these changes, plus the store’s reputation for quality and service, she feels that Foslins can effectively quality and service, she feels that Foslins can effectively compete.compete.

An “International Dining Month” promotion will be An “International Dining Month” promotion will be featured in October to introduce the new facility.featured in October to introduce the new facility.

Five specially made articles (each from a different Five specially made articles (each from a different country) will be featured on sale. For example, a copper country) will be featured on sale. For example, a copper omelet pan from France, a set of 12 long-stem wine omelet pan from France, a set of 12 long-stem wine glasses from Spain, etc.glasses from Spain, etc.

All items must be ordered 6 months in advance. Any All items must be ordered 6 months in advance. Any unsold items after October will be sold to a discount unsold items after October will be sold to a discount chain at a reduced price. If they run out, a more chain at a reduced price. If they run out, a more expensive item from the regular line will be substituted. expensive item from the regular line will be substituted.

Page 4: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Consider the special omelet pans:Consider the special omelet pans:

Buying price: Buying price: $22.00$22.00

Selling price: Selling price: $35.00$35.00

Discounted price: Discounted price: $15.00 $15.00 (at the end of October)(at the end of October)

Selling price if substituted: Selling price if substituted: $35.00$35.00

Regular pans:Regular pans:

Buying price: Buying price: $32.00$32.00

Normal selling price: Normal selling price: $65.00$65.00

Now, without knowing the demand for this special Now, without knowing the demand for this special product, how many pans should be ordered in advance?product, how many pans should be ordered in advance?

Page 5: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

For example, suppose you order 1000 pans and the For example, suppose you order 1000 pans and the demand turned out to be 1100 pans. demand turned out to be 1100 pans.

In this situation, you would be 100 pans short and would In this situation, you would be 100 pans short and would have to buy 100 regular pans and sell them at the sale have to buy 100 regular pans and sell them at the sale price in order to make up the deficit.price in order to make up the deficit.

The net profit would be:The net profit would be:

$35(1100) - $32(100) - $22(1000) = $12,300 $35(1100) - $32(100) - $22(1000) = $12,300

In general, let In general, let yy = number of pans ordered and = number of pans ordered and DD = demand. Then for = demand. Then for D > yD > y, ,

Profit = 35D – 32(D – y) – 22yProfit = 35D – 32(D – y) – 22y

Profit = 3D + 10yProfit = 3D + 10y

Page 6: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

In another scenario, suppose you order 1000 pans and In another scenario, suppose you order 1000 pans and the demand turned out to be 200 pans. the demand turned out to be 200 pans.

In this situation, you would have an excess of 800 pans In this situation, you would have an excess of 800 pans and would have to sell the addition pans at $15 each and and would have to sell the addition pans at $15 each and take a loss.take a loss.

The net profit would be:The net profit would be:

$35(200) + $15(800) - $22(1000) = -$3000$35(200) + $15(800) - $22(1000) = -$3000

In general, for In general, for D < yD < y, ,

Profit = 35D + 15(y – D) – 22yProfit = 35D + 15(y – D) – 22y

Profit = 20D - 7yProfit = 20D - 7y

For For D = yD = y, the two formulas are identical. , the two formulas are identical.

Page 7: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

This spreadsheet assumes an order of 11 omelet pans This spreadsheet assumes an order of 11 omelet pans and a random demand of 8 (i.e., y = 11 and D = 8).and a random demand of 8 (i.e., y = 11 and D = 8).

=IF(B3>=B5,E3*B5+E4*B7-E5*B3,E3*B5-E8*B9-E5*B3)=IF(B3>=B5,E3*B5+E4*B7-E5*B3,E3*B5-E8*B9-E5*B3)

=MAX(0,B3-B5)=MAX(0,B3-B5)=MAX(0,B5-B3)=MAX(0,B5-B3)

Since the order quantity is greater than demand, (y >D) Since the order quantity is greater than demand, (y >D) there are 3 extra pans. Thus, the profit is $83.there are 3 extra pans. Thus, the profit is $83.

Page 8: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

PROFIT VERSUS ORDER QUANTITYPROFIT VERSUS ORDER QUANTITY

Now, assume that demand has the following Now, assume that demand has the following distribution:distribution:

Prob {demand = 8} = 0.1Prob {demand = 8} = 0.1Prob {demand = 9} = 0.2Prob {demand = 9} = 0.2Prob {demand = 10} = 0.3Prob {demand = 10} = 0.3Prob {demand = 11} = 0.2Prob {demand = 11} = 0.2Prob {demand = 12} = 0.1Prob {demand = 12} = 0.1Prob {demand = 13} = 0.1Prob {demand = 13} = 0.1

Note: These demands have been chosen artificially Note: These demands have been chosen artificially small in order to simplify the example.small in order to simplify the example.

Page 9: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

To generate random demand for this probability To generate random demand for this probability distribution in Crystal Ball, enter this discrete distribution in Crystal Ball, enter this discrete distribution in a two-column format for Crystal Ball.distribution in a two-column format for Crystal Ball.

Page 10: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Now, click on Now, click on cell B5. Next, cell B5. Next, click on the click on the Define Define AssumptionsAssumptions icon, icon, choose choose Custom Custom distribution distribution and click and click OKOK..

Page 11: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

In the resulting dialog, click on the In the resulting dialog, click on the DataData button button

Page 12: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Now, enter the spreadsheet cell range where the discrete Now, enter the spreadsheet cell range where the discrete distribution was placed and click distribution was placed and click OKOK..

Page 13: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

After clicking After clicking OKOK, the distribution will be displayed:, the distribution will be displayed:

Click Click OKOK again to accept these settings. again to accept these settings.

Page 14: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

To determine the expected profit through the use of the To determine the expected profit through the use of the simulations, click on cell B11 and then click on the simulations, click on cell B11 and then click on the Define ForecastDefine Forecast icon. icon.

If not already selected, choose If not already selected, choose LargeLarge as the window size as the window size and and When Stopped (Faster)When Stopped (Faster). Click . Click OKOK..

Page 15: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

In order to use simulation to calculate the average profit, In order to use simulation to calculate the average profit, first generate a number of trials, setting y = 11. first generate a number of trials, setting y = 11.

The profit that results on any given trial depends on the The profit that results on any given trial depends on the value of demand that was generated on that trial.value of demand that was generated on that trial.

The average profit over all trials is the expected profit.The average profit over all trials is the expected profit.

To do this, click on the To do this, click on the Run PreferencesRun Preferences icon and icon and change the change the Maximum Number of TrialsMaximum Number of Trials to 500. to 500.

Click Click OKOK..

Page 16: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Next, click on the Next, click on the Start SimulationStart Simulation icon and after icon and after Crystal Ball has run the 500 iterations, the following Crystal Ball has run the 500 iterations, the following dialog will appear:dialog will appear:

Click Click OKOK and Crystal Ball will automatically produce a and Crystal Ball will automatically produce a histogram.histogram.

Page 17: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

To look at the statistics from the simulation, go to the To look at the statistics from the simulation, go to the Crystal Ball Crystal Ball ViewView menu and choose menu and choose StatisticsStatistics..

Based on these trials, the best estimate of the expected Based on these trials, the best estimate of the expected profit of ordering 11 omelet pans is $123.24. profit of ordering 11 omelet pans is $123.24. Note that since both the demand and the average profit Note that since both the demand and the average profit are random variables, running the simulation again will are random variables, running the simulation again will most likely result in a different average profit.most likely result in a different average profit.

Page 18: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Expected Value versus Order Quantity.Expected Value versus Order Quantity. To calculate the To calculate the true true expected profitexpected profit using the spreadsheet and Crystal using the spreadsheet and Crystal Ball, simply enter each demand in cell B5 (one at a time), Ball, simply enter each demand in cell B5 (one at a time), run the simulation and then record the average profit. run the simulation and then record the average profit.

These average profits will then be multiplied by their These average profits will then be multiplied by their respective probabilities. The sum of these values will respective probabilities. The sum of these values will give the true expected profit.give the true expected profit.

Page 19: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Simulated versus Expected Profits.Simulated versus Expected Profits. For any particular For any particular order quantity, the average profit generated by the order quantity, the average profit generated by the spreadsheet simulator does not equal the true expected spreadsheet simulator does not equal the true expected profit. The implication of this fact on the process of profit. The implication of this fact on the process of making a decision is interesting. making a decision is interesting.

The computed expected profits and simulated average The computed expected profits and simulated average profits for order sizes of 9, 10,11, and 12 pans are shown profits for order sizes of 9, 10,11, and 12 pans are shown below:below:

Based on the max. profit, your decision would be to Based on the max. profit, your decision would be to order 10 pans for the true expected profit or 11 pans for order 10 pans for the true expected profit or 11 pans for the simulated average profit.the simulated average profit.

Page 20: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

The previous example illustrates that simulation, in The previous example illustrates that simulation, in general, is not guaranteed to achieve optimality.general, is not guaranteed to achieve optimality.

A simple way to increase the likelihood of achieving A simple way to increase the likelihood of achieving optimality is to optimality is to increase the number of trialsincrease the number of trials..

With simulation, your decision may be wrongly identified With simulation, your decision may be wrongly identified if care is not taken to simulate a sufficient number of if care is not taken to simulate a sufficient number of trials. trials. In a real problem you would not In a real problem you would not bothboth calculate the true calculate the true expected profit and use simulation to calculate an expected profit and use simulation to calculate an average profit.average profit.

Use simulation whenUse simulation whenit is computationally impractical or not even it is computationally impractical or not even possible to calculate the expected profit associated possible to calculate the expected profit associated with the alternative decisions,with the alternative decisions,or when it is important to assess the variability of or when it is important to assess the variability of the performance measure for various solutions.the performance measure for various solutions.

Page 21: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

RECAPITULATIONRECAPITULATION

To summarize:To summarize:

1.1. A spreadsheet simulator takes parameters and A spreadsheet simulator takes parameters and decisions as inputs and yields a performance decisions as inputs and yields a performance measure(s) as output. measure(s) as output.

2.2. Each iteration of the spreadsheet simulator will Each iteration of the spreadsheet simulator will generally yield a different value for the generally yield a different value for the performance measure. performance measure.

3.3. The performance measure (for an order size of 11) The performance measure (for an order size of 11) was profit. The 500 trials taken together combine was profit. The 500 trials taken together combine to produce a measure of goodness of the order to produce a measure of goodness of the order size: size: average profitaverage profit..

Page 22: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

More information can be obtained from the simulation. More information can be obtained from the simulation. Suppose you want to know how often a shortage Suppose you want to know how often a shortage occurred (i.e., demand exceeded quantity ordered), click occurred (i.e., demand exceeded quantity ordered), click on cell B9 and add it as a “Forecast” cell. Then, rerun on cell B9 and add it as a “Forecast” cell. Then, rerun the simulation. the simulation.

The results The results show that a show that a shortage shortage occurred in 95 occurred in 95 of the 500 of the 500 trials (20.6%). trials (20.6%).

Indicators of variability are also important products of Indicators of variability are also important products of simulation studies. Management usually seeks policies simulation studies. Management usually seeks policies which have low variability.which have low variability.

Page 23: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

4.4. Increasing the number of simulation iterations Increasing the number of simulation iterations will usually improve the accuracy of the estimate will usually improve the accuracy of the estimate of the expected value of the performance of the expected value of the performance measure. measure.5.5. In a simulation, we can never be sure that the In a simulation, we can never be sure that the optimal decision has been found. Although, a optimal decision has been found. Although, a 95% or 99% confidence interval can be 95% or 99% confidence interval can be calculated. calculated.6.6. Management must assess four main factors : Management must assess four main factors :

a.a. Does the model capture the real problem? Does the model capture the real problem?

b.b. Are the influence of the starting and ending conditions Are the influence of the starting and ending conditions of the simulation properly accounted for? of the simulation properly accounted for?

c.c. Have enough trials been performed for each decision so Have enough trials been performed for each decision so

that the average value of the measure(s) of performance that the average value of the measure(s) of performance is a good indication of the true expected value? is a good indication of the true expected value?d.d. Have enough decisions been evaluated so that you can Have enough decisions been evaluated so that you can believe that the best answer found is “close enough” to believe that the best answer found is “close enough” to the optimum? the optimum?

Page 24: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Previously with the Foslins model, we had assumed a Previously with the Foslins model, we had assumed a simplified demand distribution. However, a more simplified demand distribution. However, a more realistic model of demand is the normal distribution with realistic model of demand is the normal distribution with a mean of 1000 and a standard deviation of 100. a mean of 1000 and a standard deviation of 100.

Simulation of Foslins’ Model with Simulation of Foslins’ Model with aa

More Realistic Demand More Realistic Demand AssumptionAssumption

The Foslins’ Spreadsheet: Simulating Demand More The Foslins’ Spreadsheet: Simulating Demand More Realistically.Realistically. To simulate 1000 trials, modify the To simulate 1000 trials, modify the Run Run PreferencesPreferences dialog to indicate the larger number of dialog to indicate the larger number of iterations. iterations.

In addition, use the same 1000 random values for In addition, use the same 1000 random values for demand in each of the upcoming simulations (for demand in each of the upcoming simulations (for different order quantities for comparison). This is different order quantities for comparison). This is known as setting the known as setting the seedseed value. value.

Page 25: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

The Foslins’ Spreadsheet: Simulating Demand More The Foslins’ Spreadsheet: Simulating Demand More Realistically.Realistically. In the spreadsheet, change the quantity In the spreadsheet, change the quantity ordered to 1020.ordered to 1020.

Also, change the random distribution of demand from a Also, change the random distribution of demand from a customized one to the normal distribution with a mean customized one to the normal distribution with a mean of 1000 and a standard deviation of 100.of 1000 and a standard deviation of 100.

Page 26: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

To simulate 1000 trials, click on the To simulate 1000 trials, click on the Run Preferences Run Preferences icon and change the number of iterations. icon and change the number of iterations.

Page 27: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Now, specify the seed value:Now, specify the seed value:

First, click on First, click on SamplingSampling in the in the Run PreferencesRun Preferences dialog. dialog.

Check the Check the use use Same Sequence Same Sequence …… option and option and enter an enter an Initial Initial Seed ValueSeed Value of of 422 (or any 422 (or any other number). other number). Click Click OKOK..

Note that the demands do not change. We want to Note that the demands do not change. We want to compare the average profit for compare the average profit for differentdifferent order quantities order quantities but the but the same same set of random demands. Profit will differ set of random demands. Profit will differ only because of different order quantities.only because of different order quantities.

Page 28: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Variance ReductionVariance Reduction is the process of decreasing is the process of decreasing variability in simulation results. variability in simulation results.

It is an important technique in reducing the amount of It is an important technique in reducing the amount of computation necessary to obtain valid simulation computation necessary to obtain valid simulation results. results.

With simulation, using the same sequence of random With simulation, using the same sequence of random variables provides us with complete control of the variables provides us with complete control of the random elements.random elements.

THE EFFECT OF ORDER QUANTITYTHE EFFECT OF ORDER QUANTITY

Click on the Click on the Start SimulationStart Simulation icon to begin the icon to begin the simulation. After 1000 iterations, the following dialog simulation. After 1000 iterations, the following dialog will open. will open.

Click Click OKOK to bring up a to bring up a histogram of the profit histogram of the profit values. values.

Page 29: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

The average The average profit for an order profit for an order quantity of 1020 quantity of 1020 pans is pans is $12,270.44. $12,270.44.

Here is the resulting histogram.Here is the resulting histogram.

You can view the You can view the statistics by statistics by clicking on the clicking on the View – StatisticsView – Statistics menu option.menu option.

Page 30: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

You can determine how the average profit varies for a You can determine how the average profit varies for a range of order quantities and a range of order quantities and a givengiven set of demands by set of demands by entering different order quantities in cell B3.entering different order quantities in cell B3.

First, place a new order quantity in cell B3.First, place a new order quantity in cell B3.

Finding the optimal order quantity is an iterative Finding the optimal order quantity is an iterative procedure -- change the order quantity and re-run the procedure -- change the order quantity and re-run the simulation. Then, compare the profits to find the simulation. Then, compare the profits to find the maximum profit. maximum profit.

Click on the Click on the Reset SimulationReset Simulation icon and in the icon and in the resulting dialog, click resulting dialog, click OKOK. Now, you can begin the . Now, you can begin the simulation again by clicking on the simulation again by clicking on the Start SimulationStart Simulation icon.icon.

Page 31: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

For example, suppose you ran 1000 iterations at each of For example, suppose you ran 1000 iterations at each of the following order quantities:the following order quantities:

OrderOrderQuantityQuantity

101010101013101310151015101610161017101710181018102010201025102510301030

ExpectedExpected

ProfitProfit

$12,270.29$12,270.29

$12,270.77$12,270.77$12,270.76$12,270.76

$12,270.71$12,270.71$12,270.44$12,270.44

$12,270.70$12,270.70

$12,268.34$12,268.34

$12,268.95$12,268.95

$12,264.60$12,264.60

So, this iterative process has shown that an order So, this iterative process has shown that an order quantity of 1017 gives a maximum profit of $12,270.77. quantity of 1017 gives a maximum profit of $12,270.77.

Page 32: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

However, this quantity that maximizes profit may not However, this quantity that maximizes profit may not maximize the true maximize the true expectedexpected profit. Indeed, it may be profit. Indeed, it may be impossible to guarantee that the optimal solution will be impossible to guarantee that the optimal solution will be found using simulation.found using simulation.

Remember, the optimal solution is theoretical as Remember, the optimal solution is theoretical as opposed to a real-world concept. At best, an optimal opposed to a real-world concept. At best, an optimal solution represents a “good decision” for the real-world solution represents a “good decision” for the real-world problem.problem.

Since the average profit for order quantities between Since the average profit for order quantities between 1015 and 1018 only varied by a couple of pennies, even 1015 and 1018 only varied by a couple of pennies, even if we didn’t get the exact optimal order quantity, we are if we didn’t get the exact optimal order quantity, we are confident that we are “close enough.”confident that we are “close enough.”

Page 33: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

The Probability Distribution of Profit.The Probability Distribution of Profit. To find out more To find out more about the solution suggested by simulation (ordering about the solution suggested by simulation (ordering 1017 pans), we can look at the probability distribution.1017 pans), we can look at the probability distribution.

This histogram This histogram visually visually describes the describes the range of risk range of risk that Foslins will that Foslins will be taking in be taking in ordering 1017 ordering 1017 pans. pans.

The peaked distribution means that there is a definite The peaked distribution means that there is a definite probability that the profit will exceed the mean profit. probability that the profit will exceed the mean profit. The area to the left means that there is some chance of The area to the left means that there is some chance of obtaining a profit below the expected profit. However, obtaining a profit below the expected profit. However, there is little chance of loosing money.there is little chance of loosing money.

Page 34: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Here is a revenue management example from the service Here is a revenue management example from the service industry. The airlines were the first to pioneer the use of industry. The airlines were the first to pioneer the use of these tools. these tools.

Midwest Express:Midwest Express:Airline Overbooking ModelAirline Overbooking Model

American Airlines (AA) started the practice of auctioning American Airlines (AA) started the practice of auctioning off the value of a seat on a given flight when more off the value of a seat on a given flight when more customers showed up than it had seats available.customers showed up than it had seats available.

AA estimates that overbooking alone adds over $200 AA estimates that overbooking alone adds over $200 million per year to its bottom line. million per year to its bottom line.

Other areas besides overbooking that are practiced in Other areas besides overbooking that are practiced in the revenue management area include forecasting, seat the revenue management area include forecasting, seat allocation among the various fare classes, and control of allocation among the various fare classes, and control of the entire network of flight legs.the entire network of flight legs.

Page 35: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Midwest Express is headquartered in Milwaukee, Midwest Express is headquartered in Milwaukee, Wisconsin and was started by the large consumer Wisconsin and was started by the large consumer products company Kimberly Clark, which has large products company Kimberly Clark, which has large operations in nearby Appleton, Wisconsin. operations in nearby Appleton, Wisconsin.

After reviewing the historical data on the percentage of After reviewing the historical data on the percentage of no-shows, it was found that the average no-show rate no-shows, it was found that the average no-show rate for Flight 227 from Milwaukee to San Francisco is 15%. for Flight 227 from Milwaukee to San Francisco is 15%.

The aircraft (MD88) has a capacity of 112 seats in a The aircraft (MD88) has a capacity of 112 seats in a single cabin. As all service is considered premium, single cabin. As all service is considered premium, there is no First Class/Coach cabin distinction. there is no First Class/Coach cabin distinction.

Demand for this primarily business route is strong and Demand for this primarily business route is strong and the average fare is $400. the average fare is $400.

Page 36: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

If only 112 reservations are accepted, then the flight will If only 112 reservations are accepted, then the flight will almost certainly go out with empty seats because of the almost certainly go out with empty seats because of the no-shows. These no-shows represent an opportunity no-shows. These no-shows represent an opportunity cost for Midwest Express.cost for Midwest Express.

On the other hand, if more reservations than seats are On the other hand, if more reservations than seats are accepted, then even after accounting for the no-shows, accepted, then even after accounting for the no-shows, there will still be a risk of overbooking seats. there will still be a risk of overbooking seats.

The normal procedure in the event that a customer is The normal procedure in the event that a customer is denied boarding, is to put the “extra” customers on the denied boarding, is to put the “extra” customers on the next available flight and provide them with some next available flight and provide them with some compensation (a free flight in the future, a voucher for a compensation (a free flight in the future, a voucher for a free meal and a hotel, etc.).free meal and a hotel, etc.).

On the average, the compensation usually costs On the average, the compensation usually costs Midwest Express around $600.Midwest Express around $600.

Page 37: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

This model assumes that This model assumes that the fares are fully the fares are fully refundable (if they don’t refundable (if they don’t show, they don’t pay).show, they don’t pay).

The goal is to find the The goal is to find the optimal overbooking level optimal overbooking level that maximizes profit.that maximizes profit.

=RiskSimtable({112,114,116,118,120,…,144,146})=RiskSimtable({112,114,116,118,120,…,144,146})

=RiskBinomial(B10,1-B7)=RiskBinomial(B10,1-B7)

=MAX(0,B12-B3)=MAX(0,B12-B3)

=MAX(0,B3-B12)=MAX(0,B3-B12)

=B12*B5-B14*B6=B12*B5-B14*B6

The more reservations that are accepted, the less likely The more reservations that are accepted, the less likely there will be empty seats, but the likelihood that a there will be empty seats, but the likelihood that a customer will be denied boarding is increased.customer will be denied boarding is increased.

Page 38: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

You can perform multiple trials using @Risk since the You can perform multiple trials using @Risk since the value returned will change every time the spreadsheet is value returned will change every time the spreadsheet is recalculated by pressing F9.recalculated by pressing F9.

In order to see the random values returned for each In order to see the random values returned for each iteration, set @Risk to iteration, set @Risk to Monte CarloMonte Carlo by clicking on the by clicking on the Change @Risk SettingsChange @Risk Settings icon and then on the icon and then on the SamplingSampling tab. tab.

In the In the Standard RecalcStandard Recalc section, click on section, click on Monte Monte CarloCarlo..

Page 39: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Now, use simulation to determine the optimal Now, use simulation to determine the optimal overbooking level. To see which value maximizes overbooking level. To see which value maximizes Midwest Express’ profit, consider the range of Midwest Express’ profit, consider the range of reservations from 112 to 146 in increments of 2.reservations from 112 to 146 in increments of 2.

To do this, enter the following formula into cell B10:To do this, enter the following formula into cell B10:

=RiskSimtable({112,114,116,118,120,…,144,146})=RiskSimtable({112,114,116,118,120,…,144,146})

Now, click on the Now, click on the @Risk icon. In the @Risk icon. In the resulting resulting Simulations Simulations SettingsSettings dialog, click on dialog, click on the the IterationsIterations tab. Change tab. Change the number of iterations to the number of iterations to 10001000 and the number of and the number of simulations to simulations to 1818..

Page 40: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Now, click on cell B19 and then click on the Now, click on cell B19 and then click on the Add Output Add Output CellCell icon to add this cell to the simulation. icon to add this cell to the simulation.

Click on the Click on the Run SimulationRun Simulation icon to start the icon to start the simulation.simulation.

The The SimulatingSimulating dialog will appear in which dialog will appear in which you can observe the status of the you can observe the status of the simulation.simulation.

Page 41: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

@Risk automatically displays the results of these 18 @Risk automatically displays the results of these 18 simulations:simulations:

Click on the Click on the Merge Sim#’sMerge Sim#’s button. button.

Page 42: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

The following information will be displayed.The following information will be displayed.

As shown in Sim#1, if only 112 reservations are As shown in Sim#1, if only 112 reservations are accepted, the avg. profit would be $38,080.accepted, the avg. profit would be $38,080.

As the no. of reservations are increased, the avg. profit As the no. of reservations are increased, the avg. profit increases then starts to decline. increases then starts to decline.

The max. profit of $43,901 occurs at 134 reservations.The max. profit of $43,901 occurs at 134 reservations.

Page 43: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Capacity BalancingCapacity Balancing

Now, let’s explore the assertion that capacity should be Now, let’s explore the assertion that capacity should be “balanced” throughout a manufacturing plant. “balanced” throughout a manufacturing plant. MODELING A WORK CELLMODELING A WORK CELL

Consider the following work cell:Consider the following work cell:

processes it at the first processes it at the first work station (WS1),work station (WS1),

WS1WS1

and then processes it at and then processes it at WS2.WS2.

WS2WS2Raw MaterialRaw Material

This cell takes a raw material,This cell takes a raw material,

WIPWIP

holds it in a temporary storage area holds it in a temporary storage area if the 2if the 2ndnd work station is busy, work station is busy,

Page 44: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

The completed part is used in assembly at the rate of 3 The completed part is used in assembly at the rate of 3 per hour.per hour.The goals are toThe goals are to

Meet the demand for this part on the assembly Meet the demand for this part on the assembly line,line,

Keep work in process (WIP) between the two work Keep work in process (WIP) between the two work stations downstations down

Minimize the capacity of the work stations subject Minimize the capacity of the work stations subject to achieving the first two goals.to achieving the first two goals.

Page 45: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

SIMULATING BALANCED CAPACITYSIMULATING BALANCED CAPACITYSince the assembly area needs the part at a rate of 3 per Since the assembly area needs the part at a rate of 3 per hour, set the capacity of both work stations at 3 per hour, set the capacity of both work stations at 3 per hour. The Capacities of WS1 and WS2 are hour. The Capacities of WS1 and WS2 are balancedbalanced..

However, because of processing time variability, a work However, because of processing time variability, a work station might be able to process anywhere from 1 to 5 station might be able to process anywhere from 1 to 5 units per hour. units per hour.

Suppose that during any given hour, a work station will Suppose that during any given hour, a work station will have the capability of processing 1, 2, 3, 4, or 5 units have the capability of processing 1, 2, 3, 4, or 5 units with equal probability (discrete uniform distribution).with equal probability (discrete uniform distribution).

Then the Then the averageaverage output of that work station will be 3 output of that work station will be 3 units per hour units per hour provided it always has something on provided it always has something on which to work. which to work.

Page 46: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Assume that sufficient raw material will always be Assume that sufficient raw material will always be available to WS1 so that it will never be available to WS1 so that it will never be starvedstarved..

However, because the processing times are variable at However, because the processing times are variable at WS1, there may be times when WS2 is idle for lack of WS1, there may be times when WS2 is idle for lack of material.material.

Page 47: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

The Initial Conditions.The Initial Conditions. The following spreadsheet The following spreadsheet displays the first 16 simulated hours of operation of the displays the first 16 simulated hours of operation of the work cell. work cell.

The initial conditions at the beginning of the first hour of The initial conditions at the beginning of the first hour of the simulation are no work in process (WIP), and WS1 the simulation are no work in process (WIP), and WS1 and WS2 are idle. and WS2 are idle.

=MIN(B10,D10) =MIN(B10,D10) =B10 + C10 – E10=B10 + C10 – E10

=AVERAGE($F$10:F10)=AVERAGE($F$10:F10)

=F10=F10

Page 48: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Now, enter a discrete uniform random number generator Now, enter a discrete uniform random number generator in cell C10 (WS1 Output) and cell D10 (Potential WS2 in cell C10 (WS1 Output) and cell D10 (Potential WS2 Output) to produce one of 5 possible values with equal Output) to produce one of 5 possible values with equal probability.probability.

First, type in the data in a tabular format for Crystal Ball.First, type in the data in a tabular format for Crystal Ball.

Page 49: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Now, to enter the discrete uniform random number Now, to enter the discrete uniform random number generators for generators for WS1 OutputWS1 Output and and Potential WS2 OutputPotential WS2 Output in in Crystal Ball, click on cell C10 and enter Crystal Ball, click on cell C10 and enter

= CD.Custom($C$2:$D$6)= CD.Custom($C$2:$D$6)

With the cursor still on cell C10, click on Excel’s With the cursor still on cell C10, click on Excel’s CopyCopy icon and then highlight the range C10:D25. Next, click icon and then highlight the range C10:D25. Next, click on Excel’s on Excel’s PastePaste icon to copy the uniform discrete icon to copy the uniform discrete distribution to all 32 of these cells. distribution to all 32 of these cells.

Highlight cells G10, G13, G16, G19, G22, and G25.Highlight cells G10, G13, G16, G19, G22, and G25.

Click on the Click on the Define ForecastDefine Forecast icon and change the icon and change the Window sizeWindow size to to LargeLarge and the and the DisplayDisplay to to When Stopped When Stopped (faster)(faster) and click and click OKOK..

Repeat this step for each of the 6 forecast cells, or use Repeat this step for each of the 6 forecast cells, or use the Copy/Paste feature with the forecast cells.the Copy/Paste feature with the forecast cells.

Page 50: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Click on the Click on the Run PreferencesRun Preferences icon and change the icon and change the Maximum Number of TrialsMaximum Number of Trials to 1000 and click to 1000 and click OKOK..

Now click on the Now click on the Start SimulationStart Simulation icon and after icon and after Crystal Ball has run the 1000 iterations, it automatically Crystal Ball has run the 1000 iterations, it automatically produces an individual histogram for each of the 6 produces an individual histogram for each of the 6 forecast cells.forecast cells.

Page 51: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

To better view these, click on To better view these, click on Run – Open Trend ChartRun – Open Trend Chart..

Crystal Ball Crystal Ball plots the plots the

distribution of distribution of Average WIP Average WIP over the first over the first 16 hours by 16 hours by

using the six using the six selected selected

hours that we hours that we indicated.indicated.

The center band indicates the mean The center band indicates the mean ++ 25% and the next 25% and the next darker band is a 95% confidence interval.darker band is a 95% confidence interval.

This shows that the Average WIP seems to be growing This shows that the Average WIP seems to be growing slightly over the first 16 hours. slightly over the first 16 hours.

Page 52: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Beyond the Initial Conditions.Beyond the Initial Conditions. Now, expand the Now, expand the simulation beyond the 16 hours by copying the formulas simulation beyond the 16 hours by copying the formulas down for another 184 hours. Re-run Crystal Ball using down for another 184 hours. Re-run Crystal Ball using the same basic steps as in the previous example. the same basic steps as in the previous example. The resulting graph The resulting graph

of avg. WIP for the of avg. WIP for the first 200 hours of first 200 hours of

operation shows a operation shows a continual growth. continual growth. The longer the cell The longer the cell is in operation, the is in operation, the greater the amount greater the amount

of WIP that of WIP that accumulates.accumulates.

Here, the average arrival rate and the average service Here, the average arrival rate and the average service rate are equal when the capacities of the two work rate are equal when the capacities of the two work stations are balanced. Hence, the unexpected growth.stations are balanced. Hence, the unexpected growth.

Page 53: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Now, let’s add capacity to WS2 so that its average Now, let’s add capacity to WS2 so that its average production rate is 3.5 units per hour (using a discrete production rate is 3.5 units per hour (using a discrete uniform distribution between 2 and 5 units).uniform distribution between 2 and 5 units).

SIMULATING UNBALANCED CAPACITYSIMULATING UNBALANCED CAPACITY

Using the data from the previous spreadsheet, add the Using the data from the previous spreadsheet, add the following distribution for Workstation 2:following distribution for Workstation 2:

Now, change the formulas in cells D10:D209 to be:Now, change the formulas in cells D10:D209 to be:

= CD.Custom($G$2:$H$5)= CD.Custom($G$2:$H$5)

Select six forecast cells, spread evenly across the 200 Select six forecast cells, spread evenly across the 200 hours and run 1000 iterations. hours and run 1000 iterations.

Page 54: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

The resulting graph of average WIP over time shows a The resulting graph of average WIP over time shows a much lower average WIP.much lower average WIP.

These results suggest that there is no long-term growth These results suggest that there is no long-term growth in the Average WIP with the steady-state value lying in the Average WIP with the steady-state value lying somewhere between 5 and 7 units.somewhere between 5 and 7 units.

Page 55: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

In conclusion, the capacity of the two work stations In conclusion, the capacity of the two work stations should not be balanced (equal output rates). should not be balanced (equal output rates).

If WIP is to be kept to reasonable levels, then the If WIP is to be kept to reasonable levels, then the downstream work station (WS2) should have a downstream work station (WS2) should have a somewhat greater capacity.somewhat greater capacity.

By running the simulation for longer periods of time, the By running the simulation for longer periods of time, the effect of the initial conditions can be overcome, and the effect of the initial conditions can be overcome, and the true long-term behavior can be discerned. true long-term behavior can be discerned.

In general, simulation results are useful only when care In general, simulation results are useful only when care is taken in the experimental design to eliminate is taken in the experimental design to eliminate extraneous effects such as starting or ending extraneous effects such as starting or ending conditions. conditions.

Simulations that are too short may give misleading Simulations that are too short may give misleading results.results.

Page 56: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Optimization Under UncertaintyOptimization Under Uncertainty

We can now combine the optimization tools that we’ve We can now combine the optimization tools that we’ve discussed with the ability to do Monte Carlo simulation. discussed with the ability to do Monte Carlo simulation. Let’s demonstrate the use of optimization under Let’s demonstrate the use of optimization under uncertainty with OptQuest (available with Crystal Ball uncertainty with OptQuest (available with Crystal Ball Pro) on two very common examples – portfolio Pro) on two very common examples – portfolio allocation and project selection.allocation and project selection.

Suppose that we can choose to invest in one of three Suppose that we can choose to invest in one of three stocks – Intel, Microsoft, and Proctor & Gamble, or in a stocks – Intel, Microsoft, and Proctor & Gamble, or in a money market account. Letmoney market account. Let

WW represent the fraction invested in Money Market represent the fraction invested in Money Market

XX represent the fraction invested in Intel stock represent the fraction invested in Intel stock

YY represent the fraction invested in Microsoft stock represent the fraction invested in Microsoft stock

ZZ represent the fraction invested in P&G stock represent the fraction invested in P&G stock

Page 57: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Historically, based on the last 9 years, the average Historically, based on the last 9 years, the average annualized return has been: annualized return has been:

46.6%46.6% IntelIntel

62.1%62.1% MicrosoftMicrosoft

20.8%20.8% Procter & GambleProcter & Gamble

The constraints are:The constraints are: 5.2%5.2% Money MarketMoney Market

No more than 50% of the portfolio is to be in any No more than 50% of the portfolio is to be in any one asset.one asset.

The sum of the decision variables must be 100%.The sum of the decision variables must be 100%.

In order to optimize the portfolio, we can eitherIn order to optimize the portfolio, we can either

maximize return subject to a constraint to keep the maximize return subject to a constraint to keep the risk at some satisfactory level orrisk at some satisfactory level or

minimize risk subject to a constraint to keep the minimize risk subject to a constraint to keep the return at some satisfactory level.return at some satisfactory level.

Page 58: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

In this example, we will be minimizing risk. Set up a In this example, we will be minimizing risk. Set up a spreadsheet as shown below.spreadsheet as shown below.

=AVERAGE(C2:C10)=AVERAGE(C2:C10)

=COVAR($C$2:$C$10,C2:C10)=COVAR($C$2:$C$10,C2:C10)=COVAR($D$2:$D$10,D2:D10)=COVAR($D$2:$D$10,D2:D10)=COVAR($E$2:$E$10,E2:E10)=COVAR($E$2:$E$10,E2:E10)=COVAR($F$2:$F$10,F2:F10)=COVAR($F$2:$F$10,F2:F10)

=C17*C11=C17*C11 =SUM(C17:F17)=SUM(C17:F17)

SUMPRODUCT(MMULT(C17:F17,C13:F16),C17:F17)SUMPRODUCT(MMULT(C17:F17,C13:F16),C17:F17)

Page 59: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Here are the Solver results.Here are the Solver results.

These show These show that you should that you should invest in 0.51% invest in 0.51% of Intel, 20.7% of Intel, 20.7% of Microsoft, of Microsoft, 50% of P&G, 50% of P&G, and 28.8% of and 28.8% of money market money market accounts.accounts.

The minimum The minimum variance is variance is 0.0127.0.0127.

Page 60: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Now let’s use Crystal Ball with OptQuest. Perform the Now let’s use Crystal Ball with OptQuest. Perform the following steps:following steps:

1.1. Change cells C11:F11 to numbers rather than Change cells C11:F11 to numbers rather than formulas. Highlight cells C11:F11 and click on formulas. Highlight cells C11:F11 and click on Edit – CopyEdit – Copy and then click and then click Edit – Paste Special – Edit – Paste Special – ValuesValues and click and click OKOK..

StandardStandard Mean DeviationMean Deviation 46.6%46.6% .5646.5646 62.1%62.1% .3999.3999 20.8%20.8% .1334.1334 5.2%5.2% .0141.0141

2.2. Click on the Click on the Define AssumptionDefine Assumption icon to icon to specify the distribution for cells C11:F11. specify the distribution for cells C11:F11. Specify each as a normal distribution with the Specify each as a normal distribution with the following parameters, respectively:following parameters, respectively:

Page 61: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

3.3. Click on the Click on the Define ForecastDefine Forecast icon and select icon and select cell H17 (Portfolio Variance).cell H17 (Portfolio Variance).

4.4. Click on the Click on the Run Preferences Run Preferences icon and icon and change the maximum number of trials to 1000. change the maximum number of trials to 1000. Also, select Also, select Latin HypercubeLatin Hypercube as the sampling as the sampling method and method and Use Same SequenceUse Same Sequence as the random as the random

5.5. Click on the Click on the Define DecisionDefine Decision icon and define the icon and define the decision variables as cells C17:F17 (each as a decision variables as cells C17:F17 (each as a continuous variable with lower bound of 0% and continuous variable with lower bound of 0% and upper bound of 50%. Select the variable type as upper bound of 50%. Select the variable type as continuous.continuous.

Page 62: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

6.6. Click on the OptQuest icon to start the program. Click on the OptQuest icon to start the program.

7.7. In OptQuest, select In OptQuest, select File – New – YesFile – New – Yes to optimize to optimize all decision variables. Check that the all decision variables. Check that the TypeType Column indicates that these are continuous Column indicates that these are continuous values and click values and click OKOK. .

Page 63: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

8.8. Define the constraints as follows: Define the constraints as follows:

a. a. Intel% + Microsoft% + P&G% + MM% = 1Intel% + Microsoft% + P&G% + MM% = 1b. b. Intel% <= 0.5Intel% <= 0.5c. c. Microsoft% <= 0.5Microsoft% <= 0.5d. d. P&G% <= 0.5P&G% <= 0.5e. e. MM% <= 0.5MM% <= 0.5

f. f. 0.466*Intel% + 0.621*Microsoft% + 0.208*P&G0.466*Intel% + 0.621*Microsoft% + 0.208*P&G% + 0.052*MM% >=0.25% + 0.052*MM% >=0.25

Page 64: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

9.9. From the From the SelectSelect menu, choose menu, choose Minimize Minimize Objective Objective and clickand click OK OK..

10.10. In the In the OptionsOptions window, click window, click OKOK to accept the to accept the default process. To start the optimization default process. To start the optimization under uncertainty, click under uncertainty, click YesYes. .

Page 65: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

After 10 minutes, you should get results similar to After 10 minutes, you should get results similar to the following:the following:

Page 66: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

11.11. To interpret the results, select To interpret the results, select Edit – Copy to Edit – Copy to ExcelExcel which will copy the resulting values for which will copy the resulting values for the decision variables back into your the decision variables back into your spreadsheet and automatically give a spreadsheet and automatically give a frequency diagram for the chosen statistic. frequency diagram for the chosen statistic.

In the In the ForecastForecast window, you can also select window, you can also select View – StatisticsView – Statistics to view the summary to view the summary statistics.statistics.

The OptQuest engine basically gave the same answer as The OptQuest engine basically gave the same answer as Solver (in a much longer period of time). Solver (in a much longer period of time).

The result from OptQuest confirmed that after running The result from OptQuest confirmed that after running 1,000 random iterations, the average portfolio variance 1,000 random iterations, the average portfolio variance was indeed closely represented by the mean values was indeed closely represented by the mean values used in our original spreadsheet, which Solver used to used in our original spreadsheet, which Solver used to optimize.optimize.

Page 67: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Consider the R&D group at a major public utility that has Consider the R&D group at a major public utility that has identified eight possible projects for the coming year. identified eight possible projects for the coming year.

PROJECT SELECTIONPROJECT SELECTION

Each project has an initial investment required and the Each project has an initial investment required and the resulting NPV from a proforma cash flow analysis has resulting NPV from a proforma cash flow analysis has also been tabulated. also been tabulated.

The CFO of the company has only authorized $2 million The CFO of the company has only authorized $2 million to be spent on R&D projects for the coming year. If to be spent on R&D projects for the coming year. If implemented, these 8 projects would require an implemented, these 8 projects would require an investment of $2.8 million, so we much choose those investment of $2.8 million, so we much choose those projects which will return the largest NPV and still projects which will return the largest NPV and still remain within the budget.remain within the budget.

Page 68: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

=SUMPRODUCT(E5:E12,C5:C12)=SUMPRODUCT(E5:E12,C5:C12)

=C14 - C15=C14 - C15

=SUMPRODUCT(D5:D12,E5:E12)=SUMPRODUCT(D5:D12,E5:E12)

Set up the model for optimization using binary decision Set up the model for optimization using binary decision variables (yes/no) for each of the eight potential variables (yes/no) for each of the eight potential projects.projects.

Page 69: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

The resulting solution from Solver shows that projects 1, The resulting solution from Solver shows that projects 1, 2, 3, 4, and 7 should be chosen with the maximum NPV 2, 3, 4, and 7 should be chosen with the maximum NPV obtained of $3.55 million and using all $2 million of the obtained of $3.55 million and using all $2 million of the budget. budget.

This is an This is an application of application of

integer integer programming programming

where the NPVs where the NPVs are assumed to are assumed to

be certain. Now be certain. Now add some add some

uncertainty to uncertainty to the success of the success of

each project.each project.

Page 70: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

Now, due to the uncertainty of each project succeeding, Now, due to the uncertainty of each project succeeding, re-optimize with Solver (maximize cell G15, changing re-optimize with Solver (maximize cell G15, changing cells are E5:E12, constraint: C15 <= C14). cells are E5:E12, constraint: C15 <= C14).

This gives a new solution that recommends projects 1, This gives a new solution that recommends projects 1, 2, 4, 6, 7, with an expected NPV of $2.184 million and 2, 4, 6, 7, with an expected NPV of $2.184 million and spending only $1.85 million of the budgeted $2 million.spending only $1.85 million of the budgeted $2 million.

How do we know if this is the best decision, given all the How do we know if this is the best decision, given all the uncertainty? uncertainty?

With OptQuest we can specify that it maximize the 25With OptQuest we can specify that it maximize the 25 thth percentile of the NPV distribution that results from a percentile of the NPV distribution that results from a simulation of 1000 trials. simulation of 1000 trials.

Then, for each possible combination of decision Then, for each possible combination of decision variables (2variables (288 = 256 combinations), the software will make = 256 combinations), the software will make “intelligent” choices as it searches for the best “intelligent” choices as it searches for the best combination.combination.

Page 71: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

To set this up in OptQuest, follow the steps outlined To set this up in OptQuest, follow the steps outlined below:below:

1.1. Click on the Click on the Define AssumptionDefine Assumption icon and icon and define the assumption cells as F5:F12 (each as a define the assumption cells as F5:F12 (each as a binomial with success rate as given in the binomial with success rate as given in the original spreadsheet, and 1 trial).original spreadsheet, and 1 trial).

3.3. Click on the Click on the Define ForecastDefine Forecast icon and icon and specify cell G15 with “NPV” as Forecast name specify cell G15 with “NPV” as Forecast name and “Dollars” as the forecast units.and “Dollars” as the forecast units.

2.2. Define the decision variables as cells E5:E12 Define the decision variables as cells E5:E12 (each as a discrete variable with lower bound of (each as a discrete variable with lower bound of 0, upper bound of 1). 0, upper bound of 1).

4.4. Click on the Click on the Run PreferencesRun Preferences icon and icon and specify a maximum number of trials equal to specify a maximum number of trials equal to 1,000. Also, specify 1,000. Also, specify Latin HypercubeLatin Hypercube and and Use Use same sequencesame sequence with an initial seed value of with an initial seed value of 999999..

Page 72: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

5.5. Now, start OptQuest by clicking on its icon or by Now, start OptQuest by clicking on its icon or by going to the going to the Tools – OptQuestTools – OptQuest pull-down menu. pull-down menu.

6.6. In OptQuest, click on In OptQuest, click on File – NewFile – New and select and select YesYes to optimize all decision variables. Check that to optimize all decision variables. Check that the the TypeType column indicates that these are column indicates that these are discrete values.discrete values.

7.7. Define the single constraint as: Define the single constraint as:

250*Project1 + 650*Project2 + 250*Project3 + 250*Project1 + 650*Project2 + 250*Project3 + 500*Project4 + 700*Project5 + 30*Project6 + 500*Project4 + 700*Project5 + 30*Project6 + 350*Project7 + 70*Project 8 <= 2000350*Project7 + 70*Project 8 <= 2000

Page 73: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

8.8. From the From the SelectSelect drop-down menu, select drop-down menu, select Maximize ObjectiveMaximize Objective and change the and change the Forecast Forecast StatisticStatistic from the from the MeanMean to the to the PercentilePercentile and and enter the number enter the number 2525..

9.9. In the In the OptionsOptions window, click window, click OKOK to accept the to accept the default process. To begin the optimization default process. To begin the optimization under uncertainty, click under uncertainty, click YesYes..

Page 74: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

10.10. To interpret the results, select To interpret the results, select Edit – Copy to Edit – Copy to ExcelExcel to copy the resulting values for the to copy the resulting values for the decision variables to the spreadsheet and decision variables to the spreadsheet and automatically provide frequency diagrams of automatically provide frequency diagrams of the chosen statistic (NPV). the chosen statistic (NPV).

Under Under View View switch toswitch to Cumulative Chart Cumulative Chart and and enter the right-hand side value as $1.6 million.enter the right-hand side value as $1.6 million.

Page 75: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

In the In the ForecastForecast window, you can also select window, you can also select View – View – StatisticsStatistics to view the summary statistics. to view the summary statistics.

Page 76: DECISION MODELING WITH MICROSOFT EXCEL Chapter 9 Copyright 2001 Prentice Hall Monte Carlo Simulation Part 2

The results from OptQuest showed that the best projects The results from OptQuest showed that the best projects to choose are 1, 2, 5, 6, 7 which spend $1.98 million of to choose are 1, 2, 5, 6, 7 which spend $1.98 million of the budget and generate a maximum 25the budget and generate a maximum 25thth percentile percentile value of $1.6 million.value of $1.6 million.