Table of Contents Chapter 16 Computer Simulation with
Table of Contents Chapter 16 (Computer Simulation with Crystal Ball) A Case Study: Freddie the Newsboy’s Problem (Section 16. 1) Bidding for a Construction Project (Section 16. 2) Project Management: Reliable Construction Co. (Section 16. 3) Cash Flow Management: Everglade Golden Years Co. (Section 16. 4) Financial Risk Analysis: Think-Big Development Co. (Section 16. 5) Revenue Management in the Travel Industry (Section 16. 6) Choosing the Right Distribution (Section 16. 7) Decision Making with Decision Tables (Section 16. 8) Optimizing with Opt. Quest (Section 16. 9) 16. 2– 16. 24 16. 25– 16. 31 16. 32– 16. 43 16. 44– 16. 49 16. 50– 16. 55 16. 56– 16. 61 16. 62– 16. 83 16. 84– 16. 99 16. 100– 16. 118 Monte-Carlo Simulation with Crystal Ball (UW Lecture) 16. 119– 16. 137 These slides are based upon a lecture from the MBA core course in Management Science at the University of Washington (as taught by one of the authors). Mc. Graw-Hill/Irwin 1 © The Mc. Graw-Hill Companies, Inc. , 2003
Freddie the Newsboy • Freddie runs a newsstand in a prominent downtown location of a major city. • Freddie sells a variety of newspapers and magazines. The most expensive of the newspapers is the Financial Journal. • Cost data for the Financial Journal: – Freddie pays $1. 50 per copy delivered. – Freddie charges $2. 50 per copy. – Freddie’s refund is $0. 50 per unsold copy. • Sales data for the Financial Journal: – Freddie sells anywhere between 40 and 70 copies a day. – The frequency of the numbers between 40 and 70 are roughly equal. Mc. Graw-Hill/Irwin 2 © The Mc. Graw-Hill Companies, Inc. , 2003
Spreadsheet Model for Applying Simulation Mc. Graw-Hill/Irwin 3 © The Mc. Graw-Hill Companies, Inc. , 2003
Application of Crystal Ball • Four steps must be taken to use Crystal Ball on a spreadsheet model: 1. Define the random input cells. 2. Define the output cells to forecast. 3. Set the run preferences. 4. Run the simulation. Mc. Graw-Hill/Irwin 4 © The Mc. Graw-Hill Companies, Inc. , 2003
Step 1: Define the Random Input Cells • A random input cell is an input cell that has a random value. • An assumed probability distribution must be entered into the cell rather than a single number. • Crystal Ball refers to each such random input cell as an assumption cell. • Procedure to define an assumption cell: 1. 2. 3. 4. 5. 6. Select the cell by clicking on it. If the cell does not already contain a value, enter any number into the cell. Click on the Define Assumption button (first button in Crystal Ball toolbar). Select a probability distribution from the Distribution Gallery. Click OK to bring up the dialogue box for the selected distribution. Use the dialogue box to enter parameters for the distribution (preferably referring to cells on the spreadsheet that contain these parameters). 7. Click on OK. Mc. Graw-Hill/Irwin 5 © The Mc. Graw-Hill Companies, Inc. , 2003
The Crystal Ball Toolbar Mc. Graw-Hill/Irwin 6 © The Mc. Graw-Hill Companies, Inc. , 2003
Crystal Ball Distribution Gallery Mc. Graw-Hill/Irwin 7 © The Mc. Graw-Hill Companies, Inc. , 2003
Crystal Ball Uniform Distribution Dialogue Box Mc. Graw-Hill/Irwin 8 © The Mc. Graw-Hill Companies, Inc. , 2003
Static versus Dynamic Option • When cell references are used to enter parameters for a distribution, the Distribution Dialogue Box gives a choice between the “Static” option and the “Dynamic” option. • The static option means that each cell reference is only evaluated once, at the beginning of the simulation run, and then each parameter value (e. g. , Min and Max) is used for all trials of the simulation. • The dynamic option means that each cell reference is evaluated for each separate trial. This would be needed if the parameter value might change from trial to trial because it depends on another assumption cell. Mc. Graw-Hill/Irwin 9 © The Mc. Graw-Hill Companies, Inc. , 2003
Step 2: Define the Output Cells to Forecast • Crystal Ball refers to the output of a computer simulation as a forecast, since it is forecasting the underlying probability distribution when it is in operation. • Each output cell that is being used to forecast a measure of performance is referred to as a forecast cell. • Procedure for defining a forecast cell: 1. Select the cell. 2. Click on the Define Forecast button (3 rd button) in the Crystal Ball toolbar, which brings up the Define Forecast dialogue box. 3. This dialogue box can be used to define a name and (optionally) units for the forecast cell. 4. Click on OK. Mc. Graw-Hill/Irwin 10 © The Mc. Graw-Hill Companies, Inc. , 2003
Crystal Ball Define Forecast Dialogue Box Mc. Graw-Hill/Irwin 11 © The Mc. Graw-Hill Companies, Inc. , 2003
Step 3: Set the Run Preferences • Setting run preferences refers to such things as choosing the number of trials to run and deciding on other options regarding how to perform the simulation. • This step begins by clicking on the Run Preferences button on the Crystal Ball toolbar. • The Run Preferences dialogue box has six tabs to set various types of options. • The Trials tab allows you to specify the maximum number of trials to run for the computer simulation. Mc. Graw-Hill/Irwin 12 © The Mc. Graw-Hill Companies, Inc. , 2003
The Crystal Ball Run Preferences Dialogue Box Mc. Graw-Hill/Irwin 13 © The Mc. Graw-Hill Companies, Inc. , 2003
Step #4: Run the Simulation • To begin running the simulation, click on the Start Simulation button. • Once started, a forecast window displays the results of the computer simulation as it runs. • The following can be obtained by choosing the corresponding option under the View menu in the forecast window display: – – – Frequency chart Statistics table Percentiles table Cumulative chart Reverse cumulative chart Mc. Graw-Hill/Irwin 14 © The Mc. Graw-Hill Companies, Inc. , 2003
The Frequency Chart for Freddie’s Profit Mc. Graw-Hill/Irwin 15 © The Mc. Graw-Hill Companies, Inc. , 2003
The Statistics Table for Freddie’s Profit Mc. Graw-Hill/Irwin 16 © The Mc. Graw-Hill Companies, Inc. , 2003
The Percentiles Table for Freddie’s Profit Mc. Graw-Hill/Irwin 17 © The Mc. Graw-Hill Companies, Inc. , 2003
The Cumulative Chart for Freddie’s Profit Mc. Graw-Hill/Irwin 18 © The Mc. Graw-Hill Companies, Inc. , 2003
The Reverse Cumulative Chart for Freddie’s Profit Mc. Graw-Hill/Irwin 19 © The Mc. Graw-Hill Companies, Inc. , 2003
Certainty that Profit ≥ $40 Mc. Graw-Hill/Irwin 20 © The Mc. Graw-Hill Companies, Inc. , 2003
How Accurate Are the Simulation Results? • An important number provided by the simulation is the mean profit of $46. 67. • This sample average provides an estimate of the true mean of the distribution. The true mean might be somewhat different than $46. 67. • The mean standard error (on the Statistics Chart) of $0. 60 gives some indication of how accurate the estimate might be. The true mean will typically (approximately 68% of the time) be within the mean standard error of the estimated value. – It is about 68% likely that the true mean profit is between $46. 07 and $47. 27. • The mean standard error can be reduced by increasing the number of trials. However, cutting the mean standard error in half typically requires approximately ƒour times as many trials. Mc. Graw-Hill/Irwin 21 © The Mc. Graw-Hill Companies, Inc. , 2003
Precision Control: Expanded Define Forecast Dialogue Box Mc. Graw-Hill/Irwin 22 © The Mc. Graw-Hill Companies, Inc. , 2003
Results with Precision Control 750 trials were required to get the 95% confidence interval around the mean within $1. Mc. Graw-Hill/Irwin 23 © The Mc. Graw-Hill Companies, Inc. , 2003
Results with Precision Control This table shows the precision obtained for the various percentiles of profit after 750 trials. Mc. Graw-Hill/Irwin 24 © The Mc. Graw-Hill Companies, Inc. , 2003
Bidding for a Project: Reliable Construction Co. • Reliable Construction Co. is bidding to construct a new plant for a major manufacturer. • Reliable estimates the cost of the project to be $4. 55 million, There also is an additional cost of approximately $50, 000 for preparing the bid. • Three other construction companies also were invited to submit bids for the project. – Competitor 1 is known to use a 30 percent profit margin, but are unpredictable bidders because of an inability to accurately estimate the true cost of the project. Previous bids have ranged from 5% below the expected cost to 60% above. – Competitor 2 uses a 25% profit margin, but is more accurate at predicting the true cost. In the past, they have missed this profit margin by up to 15% in either direction. – Competitor 3 is unusually accurate in estimating project cost. It is equally likely to set its profit margin anywhere between 20% and 30%. Question: How much should Reliable bid for this project? Mc. Graw-Hill/Irwin 25 © The Mc. Graw-Hill Companies, Inc. , 2003
Spreadsheet Model for Applying Computer Simulation Mc. Graw-Hill/Irwin 26 © The Mc. Graw-Hill Companies, Inc. , 2003
Triangular Distribution for Competitor 2 Mc. Graw-Hill/Irwin 27 © The Mc. Graw-Hill Companies, Inc. , 2003
Frequency Chart for Reliable’s Bidding Problem Mc. Graw-Hill/Irwin 28 © The Mc. Graw-Hill Companies, Inc. , 2003
Statistics Table for Reliable’s Bidding Problem Mc. Graw-Hill/Irwin 29 © The Mc. Graw-Hill Companies, Inc. , 2003
Percentiles Table for Reliable’s Bidding Problem Mc. Graw-Hill/Irwin 30 © The Mc. Graw-Hill Companies, Inc. , 2003
Cumulative Chart for Reliable’s Bidding Problem Mc. Graw-Hill/Irwin 31 © The Mc. Graw-Hill Companies, Inc. , 2003
Project Management: Reliable Construction Co. • Reliable Construction Co. has won the bid to construct a new plant for a major manufacturer. • The contract includes a large penalty if construction is not completed by the deadline 47 weeks from now. • There are 14 tasks that need to be completed to finish the project. – (a) excavate, (b) foundation, (c) rough wall, (d) roof, (e) exterior plumbing, (f) interior plumbing, (g) exterior siding, (h) exterior painting, (i) electrical work, (j) wallboard, (k) flooring, (l) interior painting, (m) exterior fixtures, (n) interior fixtures. – For each task, three estimates of their completion time have been made—a mostlikely, an optimistic, and a pessimistic estimate Question: What is the probability that the project will complete by the deadline? Mc. Graw-Hill/Irwin 32 © The Mc. Graw-Hill Companies, Inc. , 2003
Project Network for Reliable Construction Co. Mc. Graw-Hill/Irwin 33 © The Mc. Graw-Hill Companies, Inc. , 2003
The Triangular Distribution for an Activity Duration Mc. Graw-Hill/Irwin 34 © The Mc. Graw-Hill Companies, Inc. , 2003
Spreadsheet Model for Applying Computer Simulation Mc. Graw-Hill/Irwin 35 © The Mc. Graw-Hill Companies, Inc. , 2003
The Triangular Distribution Dialogue Box Mc. Graw-Hill/Irwin 36 © The Mc. Graw-Hill Companies, Inc. , 2003
The Frequency Chart for Reliable’s Project Duration Mc. Graw-Hill/Irwin 37 © The Mc. Graw-Hill Companies, Inc. , 2003
The Statistics Table for Reliable’s Project Duration Mc. Graw-Hill/Irwin 38 © The Mc. Graw-Hill Companies, Inc. , 2003
The Percentiles Table for Reliable’s Project Duration Mc. Graw-Hill/Irwin 39 © The Mc. Graw-Hill Companies, Inc. , 2003
Probability of Meeting the Project Deadline Mc. Graw-Hill/Irwin 40 © The Mc. Graw-Hill Companies, Inc. , 2003
Probability of Meeting the Project Deadline Mc. Graw-Hill/Irwin 41 © The Mc. Graw-Hill Companies, Inc. , 2003
Calculate Sensitivity Option Mc. Graw-Hill/Irwin 42 © The Mc. Graw-Hill Companies, Inc. , 2003
The Sensitivity Chart for Reliable’s Project Mc. Graw-Hill/Irwin 43 © The Mc. Graw-Hill Companies, Inc. , 2003
Cash Flow Management: Everglade Golden Years Co. • Because of a temporary decline in business and some current or future construction costs, the company is facing some negative cash flows in the next few years. • A long-term (10 -year) loan can be taken now at a 7% annual interest rate. • A series of short-term (1 -year) loans can be taken as needed at 10% interest. • The cash flows over the next 10 years are not certain. For each year, an estimate of the minimum, most-likely, and maximum cash flow has been made. Question: How large of a long-term loan should Everglade take out now? Mc. Graw-Hill/Irwin 44 © The Mc. Graw-Hill Companies, Inc. , 2003
Projected Net Cash Flows Mc. Graw-Hill/Irwin Year Projected Net Cash Flow (millions of dollars) 2003 – 8 2004 – 2 2005 – 4 2006 3 2007 6 2008 3 2009 – 4 2010 7 2011 – 2 2012 10 45 © The Mc. Graw-Hill Companies, Inc. , 2003
Linear Programming Spreadsheet Model Mc. Graw-Hill/Irwin 46 © The Mc. Graw-Hill Companies, Inc. , 2003
Spreadsheet Model for Applying Computer Simulation Mc. Graw-Hill/Irwin 47 © The Mc. Graw-Hill Companies, Inc. , 2003
Frequency Chart for Everglade’s Ending Balance Mc. Graw-Hill/Irwin 48 © The Mc. Graw-Hill Companies, Inc. , 2003
Cumulative Chart for Everglade’s Ending Balance Mc. Graw-Hill/Irwin 49 © The Mc. Graw-Hill Companies, Inc. , 2003
Financial Risk Analysis: Think-Big Development Co. • The Think-Big Development Co. is a major investor in commercial real estate development projects. • It has been considering taking a share in three large construction projects—a high-rise office building, a hotel, and a shopping center. • In each case, three years will be spent in construction, they will retain ownership for another three years while establishing the property, and then sell the property in the seventh year. • Proposal: Don’t take any share in the high-rise, take a 16. 5% share of the hotel, and take a 13. 11% share of the shopping center. • Management wants risk analysis to be performed (with computer simulation) to obtain a risk profile (frequency distribution) of what the total NPV might turn out to be for this proposal. Mc. Graw-Hill/Irwin 50 © The Mc. Graw-Hill Companies, Inc. , 2003
Estimated Cash Flows for 100 Percent Share Hotel Project Shopping Center Project Year Cash Flow ($1, 000, 000 s) 0 – 80 0 – 90 1 Normal (– 80, 5) 1 Normal (– 50, 5) 2 Normal (– 80, 10) 2 Normal (– 20, 5) 3 Normal (– 70, 15) 3 Normal (– 60, 10) 4 Normal (+30, 20) 4 Normal (+15, 15) 5 Normal (+40, 20) 5 Normal (+25, 15) 6 Normal (+50, 20) 6 Normal (+40, 15) 7 Uniform (200, 844) 7 Uniform (160, 600) Mc. Graw-Hill/Irwin 51 © The Mc. Graw-Hill Companies, Inc. , 2003
Spreadsheet Model for Applying Computer Simulation Mc. Graw-Hill/Irwin 52 © The Mc. Graw-Hill Companies, Inc. , 2003
The Normal Distribution Dialogue Box Mc. Graw-Hill/Irwin 53 © The Mc. Graw-Hill Companies, Inc. , 2003
Risk Profile (Frequency Chart) for Think-Big Mc. Graw-Hill/Irwin 54 © The Mc. Graw-Hill Companies, Inc. , 2003
Percentiles Chart for Think-Big Mc. Graw-Hill/Irwin 55 © The Mc. Graw-Hill Companies, Inc. , 2003
Transcontinental Airlines Overbooking Problem • • Transcontinental has a daily flight (excluding weekends) from San Francisco to Chicago that is mainly used by business travelers. There are 150 seats available in a single cabin. The average fare per seat is $300. This is a nonrefundable fare, so no-shows forfeit the entire fare. The fixed cost of operating the flight is $30, 000. The average number of reservation requests for this flight has been 195, with a standard deviation of 30. Only 80% of passengers with a reservation actually show up to take the flight, so it makes sense to take more than 150 reservations (overbooking). If more passengers arrive to take the flight than there are seats, some passengers must be “bumped”. The total cost (including rebooking, travel vouchers, and lost goodwill) is estimated to be $450. Question: How many reservations should Transcontinental accept for this flight? Mc. Graw-Hill/Irwin 56 © The Mc. Graw-Hill Companies, Inc. , 2003
Spreadsheet Model for Applying Computer Simulation Mc. Graw-Hill/Irwin 57 © The Mc. Graw-Hill Companies, Inc. , 2003
Binomial Distribution with Dynamic Option for Number that Show Mc. Graw-Hill/Irwin 58 © The Mc. Graw-Hill Companies, Inc. , 2003
Frequency Chart for Profit Mc. Graw-Hill/Irwin 59 © The Mc. Graw-Hill Companies, Inc. , 2003
Frequency Chart for Number of Filled Seats Mc. Graw-Hill/Irwin 60 © The Mc. Graw-Hill Companies, Inc. , 2003
Frequency Chart for Number Denied Boarding Mc. Graw-Hill/Irwin 61 © The Mc. Graw-Hill Companies, Inc. , 2003
Choosing the Right Distribution • A continuous distribution is used if any values are possible, including both integer and fractional numbers, over the entire range of possible values. • A discrete distribution is used if only certain specific values (e. g. , only some integer values) are possible. • However, if the only possible values are integer numbers over a relatively broad range, a continuous distribution may be used as an approximation by rounding any fractional value to the nearest integer. Mc. Graw-Hill/Irwin 62 © The Mc. Graw-Hill Companies, Inc. , 2003
A Popular Central-Tendency Distribution: Normal • • Mc. Graw-Hill/Irwin Some value most likely (the mean) Values close to mean more likely Symmetric (as likely above as below mean) Extreme values possible, but rare 63 © The Mc. Graw-Hill Companies, Inc. , 2003
A Popular Central-Tendency Distribution: Triangular • • Mc. Graw-Hill/Irwin Some value most likely Values close to most likely value more common Can be asymmetric Fixed upper and lower bound 64 © The Mc. Graw-Hill Companies, Inc. , 2003
A Popular Central-Tendency Distribution: Lognormal • • Mc. Graw-Hill/Irwin Some value most likely Positively skewed (below mean more likely) Values cannot fall below zero Extreme values (high end only) possible, but rare 65 © The Mc. Graw-Hill Companies, Inc. , 2003
The Uniform Distribution • • Mc. Graw-Hill/Irwin Fixed minimum and maximum value All values equally likely 66 © The Mc. Graw-Hill Companies, Inc. , 2003
A Three-Parameter Distribution: Weibull • • • Random value above some number (location) Shape > 0 (usually ≤ 10) Shape < 3 becomes more positively-skewed (below mean more likely) until it resembles exponential distribution (equivalent at Shape = 1) Symmetrical at Shape = 3. 25, becomes negatively skewed above that Scale defines width Mc. Graw-Hill/Irwin 67 © The Mc. Graw-Hill Companies, Inc. , 2003
A Three-Parameter Distribution: Beta • • Mc. Graw-Hill/Irwin Random value between 0 and some positive number (Scale) Shape specified using two positive values (alpha, beta) Alpha < beta: positively skewed (below mean more likely) Beta < alpha: negatively skewed 68 © The Mc. Graw-Hill Companies, Inc. , 2003
A Distribution for Random Events: Exponential • • • Widely used to describe time between random events (e. g. , time between arrivals) Events are independent Rate = average number of events per unit time (e. g. , arrivals per hour) Mc. Graw-Hill/Irwin 69 © The Mc. Graw-Hill Companies, Inc. , 2003
A Distribution for Random Events: Poisson • • Describes the number of times an event occurs during a given period of time or space Occurrences are independent Any number of events is possible Rate = average number of events per unit of time, assumed constant over time Mc. Graw-Hill/Irwin 70 © The Mc. Graw-Hill Companies, Inc. , 2003
Distribution for Number of Times an Event Occurs: Binomial • • Describes number of times an event occurs in a fixed number of trials (e. g. , number of heads in 10 flips of a coin) For each trial, only two outcomes are possible Trials independent Probability remains the same for each trial Mc. Graw-Hill/Irwin 71 © The Mc. Graw-Hill Companies, Inc. , 2003
Distribution for Number of Trials Until Event Occurs: Geometric • • Describes number of trials until an event occurs (e. g. , number of times to spin roulette wheel until you win) Probability same for each trial Continue until succeed Number of trials unlimited Mc. Graw-Hill/Irwin 72 © The Mc. Graw-Hill Companies, Inc. , 2003
Distribution for Number of Trials Until n Events Occur: Negative Binomial • • • Describes number of trials until an event occurs n times Same as geometric when Shape = n = 1 Probability same for each trial Continue until nth success Number of trials unlimited Mc. Graw-Hill/Irwin 73 © The Mc. Graw-Hill Companies, Inc. , 2003
The Custom Distribution (Set of Discrete Values) • • • Enter set of values with varying probabilities For each discrete value, enter “Value” and “Prob. ” (leave other boxes blank) Clicking Enter clears boxes for entering next discrete value Mc. Graw-Hill/Irwin 74 © The Mc. Graw-Hill Companies, Inc. , 2003
The Custom Distribution (Range of Discrete Values) • • Enter range of discrete values, each equally likely Enter lower and upper end of range in “Value” and “Value 2” Enter the total probability for the whole set in “Prob. ” Enter the distance between discrete values in “Step” Mc. Graw-Hill/Irwin 75 © The Mc. Graw-Hill Companies, Inc. , 2003
The Custom Distribution (Continuous Distribution) • • • Enter the lower and upper end of range in “Value” and “Value 2” Enter the total probability for the range in “Prob. ” Leave “Step” blank for a continuous distribution Drag the corners of the distribution graph up or down to change relative probabilities Dragging corners may affect total probability. Click on “Rescale” to reset total probability. Mc. Graw-Hill/Irwin 76 © The Mc. Graw-Hill Companies, Inc. , 2003
The Custom Distribution (Combination) • • • Any combination of discrete values, ranges of discrete values, or continuous distributions can be entered Input each element, click on Enter, input next element, etc. If cumulative probabilities do not add to 1, click on “Rescale” Mc. Graw-Hill/Irwin 77 © The Mc. Graw-Hill Companies, Inc. , 2003
Historical Demand Data for the Financial Times Mc. Graw-Hill/Irwin 78 © The Mc. Graw-Hill Companies, Inc. , 2003
Procedure for Fitting the Best Distribution to Data 1. Gather the data needed to identify the best distribution to enter into an assumption cell. 2. Enter the data into the spreadsheet containing your simulation model. 3. Select the cell that you want to define as an assumption cell that contains the distribution that best fits the data. 4. Choose Define Assumption from the Crystal Ball toolbar, which brings up the Distribution Gallery dialogue box. 5. Click the Fit button on the dialogue box, which brings up the Fit Distribution dialogue box. 6. Use the Range box in this dialogue box to enter the range of the historical data in your worksheet. 7. Click the Next button in the dialogue box, which brings up the Second Fit Distribution Dialogue box. Mc. Graw-Hill/Irwin 79 © The Mc. Graw-Hill Companies, Inc. , 2003
Procedure for Fitting the Best Distribution to Data 8. Use this dialogue box to specify which continuous distributions are being considered for fitting. (Discrete distributions are not considered by this procedure. ) 9. Also use this dialogue box to select which ranking method should be used to evaluate how well a distribution fits the data. (The default is the chi-square test. ) 10. Click OK, which brings up the comparison chart that identifies the distribution (including its parameter values) that best fits the data. 11. If desired, the Next Distribution button can be clicked repeatedly for identifying the other types of distributions that are next in line for fitting the data well. 12. After choosing the distribution that you want to use, click the Accept button while that distribution is showing. This will enter the appropriate parameters into the dialogue box for this distribution. Clicking OK then enters this distribution into the assumption cell. Mc. Graw-Hill/Irwin 80 © The Mc. Graw-Hill Companies, Inc. , 2003
The First Fit Distribution Dialogue Box Mc. Graw-Hill/Irwin 81 © The Mc. Graw-Hill Companies, Inc. , 2003
The Second Fit Distribution Dialogue Box Mc. Graw-Hill/Irwin 82 © The Mc. Graw-Hill Companies, Inc. , 2003
Comparison Chart Showing Best Fit Mc. Graw-Hill/Irwin 83 © The Mc. Graw-Hill Companies, Inc. , 2003
Decision Making with Decision Tables • Many simulation models include at least one decision variable – Examples: Order quantity, Bid, Number of reservations to accept • Crystal Ball can be used to evaluate a particular value of the decision variable by providing a wealth of output for the forecast cells. • However, this approach does not identify an optimal solution for the decision variable(s). • Trial and error can be used to try different values of the decision variable(s). – Run a simulation for each, and see which one provides the best estimate of the chosen measure of performance. • The Decision Table tool in Crystal Ball does this approach in a systematic way. Mc. Graw-Hill/Irwin 84 © The Mc. Graw-Hill Companies, Inc. , 2003
Procedure for Defining a Decision Variable 1. Select the cell containing the decision variable. 2. If the cell does not already contain a value, enter any number into the cell. 3. Click on the Define Decision button in the Crystal Ball toolbar, which brings up the Define Decision Variable dialogue box. 4. Enter the lower and upper limit of the range of values to be simulated for the decision variable. 5. Click on either Continuous or Discrete to define the type of variable. 6. If Discrete is selected in Step 5, use the Step box to specify the difference between the successive possible values (not just those to be simulated). 7. Click on OK. Mc. Graw-Hill/Irwin 85 © The Mc. Graw-Hill Companies, Inc. , 2003
Define Decision Variable Dialogue Box Mc. Graw-Hill/Irwin 86 © The Mc. Graw-Hill Companies, Inc. , 2003
Decision Table: Specify Target Cell Mc. Graw-Hill/Irwin 87 © The Mc. Graw-Hill Companies, Inc. , 2003
Decision Table: Specify Decision Variable(s) to Vary Mc. Graw-Hill/Irwin 88 © The Mc. Graw-Hill Companies, Inc. , 2003
Decision Table: Specify Options Mc. Graw-Hill/Irwin 89 © The Mc. Graw-Hill Companies, Inc. , 2003
The Decision Table for Freddie’s Order Quantity Mc. Graw-Hill/Irwin 90 © The Mc. Graw-Hill Companies, Inc. , 2003
Overlay Chart Comparing Order Quantities of 55 and 60 Mc. Graw-Hill/Irwin 91 © The Mc. Graw-Hill Companies, Inc. , 2003
Trend Chart for Freddie’s Order Quantity Mc. Graw-Hill/Irwin 92 © The Mc. Graw-Hill Companies, Inc. , 2003
Decision Variable for Reliable’s Bidding Problem Mc. Graw-Hill/Irwin 93 © The Mc. Graw-Hill Companies, Inc. , 2003
Decision Table: Specify Target Cell Mc. Graw-Hill/Irwin 94 © The Mc. Graw-Hill Companies, Inc. , 2003
Decision Table: Specify Decision Variable Mc. Graw-Hill/Irwin 95 © The Mc. Graw-Hill Companies, Inc. , 2003
Decision Table: Specify Options Mc. Graw-Hill/Irwin 96 © The Mc. Graw-Hill Companies, Inc. , 2003
Decision Table for Reliable’s Bid Mc. Graw-Hill/Irwin 97 © The Mc. Graw-Hill Companies, Inc. , 2003
Decision Table for Transcontinental’s Reservations to Accept Mc. Graw-Hill/Irwin 98 © The Mc. Graw-Hill Companies, Inc. , 2003
Trend Chart for Transcontinental’s Reservations to Accept Mc. Graw-Hill/Irwin 99 © The Mc. Graw-Hill Companies, Inc. , 2003
Optimizing with Opt. Quest • Crystal Ball includes a module called Opt. Quest that automatically searches for an optimal solution for a simulation model with any number of decision variables. • The search is conducted by executing a series of simulation runs of leading candidates to be the actual optimal solution. • The results of each run are used to determine the most promising remaining candidate to try next. • A powerful search engine (based on genetic algorithms) conducts an intelligent and efficient search. Mc. Graw-Hill/Irwin 100 © The Mc. Graw-Hill Companies, Inc. , 2003
Recommended Crystal Ball Run Preferences Mc. Graw-Hill/Irwin 101 © The Mc. Graw-Hill Companies, Inc. , 2003
Recommended Crystal Ball Run Preferences Mc. Graw-Hill/Irwin 102 © The Mc. Graw-Hill Companies, Inc. , 2003
Recommended Crystal Ball Run Preferences Mc. Graw-Hill/Irwin 103 © The Mc. Graw-Hill Companies, Inc. , 2003
Procedure for Applying Opt. Quest 1. Formulate your simulation model on a spreadsheet. 2. Use Crystal Ball to complete your formulation by defining your assumption cells, forecast cells, and decision variables, as well as setting your run preferences. 3. Choose Opt. Quest from the Crystal Ball Tools menu and select New under the File menu. 4. Use the Decision Variable Selection dialogue box to select your decision variables. 5. Use the Constraints dialogue box to specify your constraints (if any). 6. Use the Forecast Selection dialogue box to specify the running time. 7. Use the Options dialogue box to specify the running time. 8. Select Start from the Run menu to run the optimization. 9. Choose Copy to Excel from the Edit menu to copy your results to your spreadsheet model. Mc. Graw-Hill/Irwin 104 © The Mc. Graw-Hill Companies, Inc. , 2003
Opt. Quest for Freddie’s Problem: Selecting Variables and Specifying Constraints Mc. Graw-Hill/Irwin 105 © The Mc. Graw-Hill Companies, Inc. , 2003
Opt. Quest for Freddie’s Problem: Specifying Objective and Running Time Mc. Graw-Hill/Irwin 106 © The Mc. Graw-Hill Companies, Inc. , 2003
Opt. Quest Results for Freddie’s Problem Mc. Graw-Hill/Irwin 107 © The Mc. Graw-Hill Companies, Inc. , 2003
Project Selection: Tazer Corp. • Tazer Corp. , a pharmaceutical manufacturing company, is beginning the search for a breakthrough drug. • The following five potential R&D projects have been identified: – Project Up: Develop a more effective antidepressant that does not cause serious mood swings. – Project Stable: Develop a drug that addresses manic depression. – Project Choice: Develop a less intrusive birth control method for women. – Project Hope: Develop a vaccine to prevent HIV infection. – Project Release: Develop a more effective drug to lower blood pressure. • $1. 2 billion is available (enough for only two or three projects). Question: Which projects should Tazer Corp. undertake? Mc. Graw-Hill/Irwin 108 © The Mc. Graw-Hill Companies, Inc. , 2003
Data for Tazer Corp. Project Selection Revenue ($millions) if Successful Project R&D Investment ($millions) Success Rate Mean Standard Deviation Up $400 50% $1, 400 $400 Stable 300 35 1, 200 400 Choice 600 35 2, 200 600 Hope 500 20 3, 000 900 Release 200 45 600 200 Mc. Graw-Hill/Irwin 109 © The Mc. Graw-Hill Companies, Inc. , 2003
Spreadsheet Model for Applying Computer Simulation Mc. Graw-Hill/Irwin 110 © The Mc. Graw-Hill Companies, Inc. , 2003
Binary Decision Variables Mc. Graw-Hill/Irwin 111 © The Mc. Graw-Hill Companies, Inc. , 2003
Opt. Quest for Tazer’s Project Selection: Selecting Variables and Specifying Constraints Mc. Graw-Hill/Irwin 112 © The Mc. Graw-Hill Companies, Inc. , 2003
Opt. Quest for Freddie’s Problem: Specifying Objective and Running Time Mc. Graw-Hill/Irwin 113 © The Mc. Graw-Hill Companies, Inc. , 2003
Opt. Quest Results for Tazer’s Project Selection Mc. Graw-Hill/Irwin 114 © The Mc. Graw-Hill Companies, Inc. , 2003
Frequency Chart for Tazer’s Total Profit Mc. Graw-Hill/Irwin 115 © The Mc. Graw-Hill Companies, Inc. , 2003
Maximizing Probability (Profit ≥ $100 million) Mc. Graw-Hill/Irwin 116 © The Mc. Graw-Hill Companies, Inc. , 2003
Maximizing Probability (Profit ≥ $100 million) Mc. Graw-Hill/Irwin 117 © The Mc. Graw-Hill Companies, Inc. , 2003
Frequency Chart for Tazer’s Project Selection Mc. Graw-Hill/Irwin 118 © The Mc. Graw-Hill Companies, Inc. , 2003
Monte-Carlo Simulation with Crystal Ball 1. Setup Spreadsheet Build a spreadsheet that will calculate the performance measure (e. g. , profit) in terms of the inputs (random or not). For random inputs, just enter any number. 2. Define Assumptions (Random Variables) Define which cells are random and what distributions they should follow. 3. Define Forecast (Output or Performance Measure) Define which cell(s) you are interested in forecasting (typically the performance measure, e. g. , profit). 4. Choose Number of Trials Select the number of trials. If you would later like to generate the Sensitivity Analysis chart, choose “Sensitivity Analysis” under Options in Run Preferences. 5. Run Simulation Run the simulation. If you would like to change parameters and re-run the simulation, you should “reset” the simulation (click on the “Reset Simulation button on the toolbar or in the Run menu) first. 6. View Results The forecast window showing the results of the simulation appears automatically after (or during) the simulation. Many different results are available (frequency chart, cumulative chart, statistics, percentiles, sensitivity analysis, and trend chart). The results can be copied into the worksheet. Mc. Graw-Hill/Irwin 119 © The Mc. Graw-Hill Companies, Inc. , 2003
The Crystal Ball Toolbar Mc. Graw-Hill/Irwin 120 © The Mc. Graw-Hill Companies, Inc. , 2003
Freddie the Newsboy • Freddie runs a newsstand in a prominent downtown location of a major city. • Freddie sells a variety of newspapers and magazines. The most expensive of the newspapers is the Financial Journal. • Cost data for the Financial Journal: – Freddie pays $1. 50 per copy delivered. – Freddie charges $2. 50 per copy. – Freddie’s refund is $0. 50 per unsold copy. • Sales data for the Financial Journal: – Freddie sells anywhere between 40 and 70 copies a day. – The frequency of the numbers between 40 and 70 are roughly equal. Mc. Graw-Hill/Irwin 121 © The Mc. Graw-Hill Companies, Inc. , 2003
Step #1 (Setup Spreadsheet) Mc. Graw-Hill/Irwin 122 © The Mc. Graw-Hill Companies, Inc. , 2003
Step #2 (Define Assumptions) • Select a cell that contains a random variable. • Click on the “Define Assumptions” button in the toolbar (or in Cell menu): • Select the type of distribution. • Provide the parameters of the distribution. Mc. Graw-Hill/Irwin 123 © The Mc. Graw-Hill Companies, Inc. , 2003
Step #2 (Define Assumptions) Mc. Graw-Hill/Irwin 124 © The Mc. Graw-Hill Companies, Inc. , 2003
Step #2 (Define Assumptions) Mc. Graw-Hill/Irwin 125 © The Mc. Graw-Hill Companies, Inc. , 2003
Step #3 (Define Forecast) • Select the cell that contains the output variable to forecast. • Click on the “Define Forecast” button in the toolbar (or in the Cell menu): Fill in the Define Forecast dialogue box: Mc. Graw-Hill/Irwin 126 © The Mc. Graw-Hill Companies, Inc. , 2003
Step #4 (Choose Number of Trials) • Click on the “Run Preferences” button in the toolbar (or in the Run menu): • Select the number of trials to run: Mc. Graw-Hill/Irwin 127 © The Mc. Graw-Hill Companies, Inc. , 2003
Step #5 (Run Simulation) Click on the “Start Simulation” button in the toolbar (or Run in the Run menu): Mc. Graw-Hill/Irwin 128 © The Mc. Graw-Hill Companies, Inc. , 2003
Step #6 (View Results) The results of the simulation can be viewed in a variety of different ways (frequency chart, cumulative chart, statistics, and percentiles). Choose different options under the View menu in the forecast window. Mc. Graw-Hill/Irwin 129 © The Mc. Graw-Hill Companies, Inc. , 2003
Step #6 (View Results) The results can be copied into a worksheet or Word document (choose Copy under the Edit menu in the simulation output window). Mc. Graw-Hill/Irwin 130 © The Mc. Graw-Hill Companies, Inc. , 2003
Step #6 (View Results) Mc. Graw-Hill/Irwin 131 © The Mc. Graw-Hill Companies, Inc. , 2003
Step #6 (View Results) Mc. Graw-Hill/Irwin 132 © The Mc. Graw-Hill Companies, Inc. , 2003
Certainty that Profit ≥ $40 Mc. Graw-Hill/Irwin 133 © The Mc. Graw-Hill Companies, Inc. , 2003
Fitting a Distribution • Crystal Ball can be used to “fit” a distribution to data. • The following data has been collected for the previous 100 phone calls to a mail-order house: Mc. Graw-Hill/Irwin 134 © The Mc. Graw-Hill Companies, Inc. , 2003
Using Crystal Ball to Fit Data to a Distribution 1. Select a spreadsheet cell for which you want to fit a distribution. 2. Choose Define Assumption. 3. Click the Fit button, then select the source of the fitted data. 4. Click the Next button, then select the distributions to try to fit. 5. Click OK. Mc. Graw-Hill/Irwin 135 © The Mc. Graw-Hill Companies, Inc. , 2003
Best Fit for the Interarrival Time Mc. Graw-Hill/Irwin 136 © The Mc. Graw-Hill Companies, Inc. , 2003
Best Fit for the Service Time Mc. Graw-Hill/Irwin 137 © The Mc. Graw-Hill Companies, Inc. , 2003
- Slides: 137