Read ancmat03.qxd text version

ancmat03.qxd

11/16/06

3:28 PM

Page C1

SUPPLEMENT

Introduction to Simulation

LEARNING OBJECTIVES After completing this supplement you should be able to

1 2 3 4 5

C

Explain why simulation is a valuable tool for decision making. Define the steps involved in the simulation modeling process. Generate random numbers from various distributions in Excel. Develop and run a simulation model in Excel. Analyze the results from a simulation in Excel.

SUPPLEMENT OUTLINE

Uncertainty and Risk in Decision Making C2 Simulation Overview and Software C2 Simulation Modeling Process C3 Random Number Generation in Excel C4

Continuous Probability Distributions C8 Application of Simulation to Decision Making C12 Other Applications of Simulation C21 Simulation within OM: Putting It All Together C21

WHAT'S IN ACC

OM FOR ME?

FIN MKT OM HRM MIS

C1

ancmat03.qxd

11/16/06

3:28 PM

Page C2

C2 · SUPPLEMENT C

INTRODUCTION TO SIMULATION

H

ow do you deal with uncertainty in your everyday life? For example, you need to complete several assignments for different classes. You might estimate the time that each assignment will take in order to budget your time. You have probably encountered a situation in which an assignment actually took longer than you or your instructor estimated. This may have had an effect on your performance on other assignments. When there is uncertainty present, such as uncertainty in the amount of time necessary to complete an assignment, decisions become more complex. No longer can we rely on fixed values. We must be willing to consider variation in estimates. For example, you might estimate that an assignment will take between two and four hours. If you do this for several assignments, the key question is how long it will take to complete all assignments. Simulation is a tool that can directly take into account the uncertainty in a situation, incorporating the uncertainties from multiple sources. It has become one of the most useful analytical techniques in operations management for analyzing facility layouts, testing scheduling methods, and other important questions.

UNCERTAINTY AND RISK IN DECISION MAKING

Managers face decisions every day involving uncertainty. If a company is considering expanding a facility, there is uncertainty about whether future demand will be high enough to make the expansion financially attractive. The decision to expand, however, must be made before it is known what future demand will be. The uncertainty in demand implies the risk that the company will be hurt financially. Quantitative models can provide tremendous insight and assistance in decision making. Unfortunately, many quantitative models ignore the uncertainty present in the real situations. Sometimes this uncertainty is taken into account after a model is built when some different what-if scenarios are considered, or a sensitivity analysis is conducted, using methods similar to those discussed in Supplement A. However, oftentimes there is uncertainty about a number of factors, and it is difficult to do a complete scenario analysis. Computer simulation is a methodology that allows one to model the uncertainty directly and obtain a clear picture of the effect of that uncertainty on the "output" quantities of a model. That is, simulation allows a decision maker to accurately determine the effects of the uncertainty present in a situation.

Computer simulation A methodology that evaluates the performance of a system when one or more input values are uncertain.

SIMULATION OVERVIEW AND SOFTWARE

A computer simulation is a model that mimics what might happen in reality. In the broadest sense, every mathematical model is really a simulation. However, in this supplement we restrict ourselves to situations in which there is some uncertainty or randomness about some aspect of the system under consideration and we want to model that uncertainty directly. For example, future demand is uncertain in most business planning situations. Customers arrive to a restaurant drive-through window according to some random process rather than being equally spaced in time. Simula-

ancmat03.qxd

11/16/06

3:28 PM

Page C3

SIMULATION MODELING PROCESS · C3

tion allows us to model this random behavior and compute system performance measures, providing valuable information for decision makers. Simulation is one of the most commonly used analytical tools for complex systems. This supplement focuses on spreadsheet-based simulation models. Spreadsheet simulation is well suited to analyze many operational problems. We will apply MonteCarlo Simulation, which repeatedly takes samples from known probability distributions for the random parameters in a problem and computes the resulting output measures. Examples of decision situations amenable to Monte-Carlo Simulation include location and expansion decisions, inventory analyses, project planning, and relatively simple waiting line (queuing) systems. All of these situations typically involve uncertainty. In this supplement we will develop, run, and analyze these simulation models using only built-in Excel functionality. However, you should be aware that there are Excel add-ins available for simulation that provide more functions for probability distributions and analysis of the simulation results and eliminate some of the routine tasks involved in running the simulation model. Two leading Excel add-ins are Crystal Ball (http://www.decisioneering.com) and @Risk (http://www.palisade.com). Although relatively complex systems can be analyzed in spreadsheets, there are many software products available that are better able to handle large, complex systems. Many of these products employ what is known as discrete-event simulation, which is a methodology for modeling how the state of the system under investigation changes as different events (such as customer arrivals or departures) occur. For example, if you were planning the layout and operation of an entire new production or service facility, modeling the supply chain of a company, or reengineering complex business processes, a stand-alone simulation product using discrete-event simulation would be a better choice than a spreadsheet model. Products more suitable for complex systems modeling include ProModel (http://www.promodel.com), Extend (http://www.imaginethatinc.com), and ProcessModel (http://www.processmodel.com). OR/MS Today (http://www.lionhrtpub.com/ORMS.shtml), a publication of the Institute for Operations Research and Management Science (INFORMS), periodically publishes simulation software surveys.

Monte-Carlo Simulation A simulation that repeatedly samples from probability distributions and computes the resulting performance measures of the system.

Discrete-event simulation A methodology that models the state of a system as it changes as a result of certain events that occur randomly in time.

SIMULATION MODELING PROCESS

The process of developing and using a spreadsheet-based simulation model is similar to that for a regular spreadsheet model (see Supplement A). The key difference is that a simulation model directly incorporates the randomness or uncertainty present in the situation. Therefore, the output of a simulation model is not a single number, but rather a probability distribution. Figure C-1 shows a schematic of a simulation model. Typically, there are certain inputs that are fixed, that is, not subject to uncertainty. For example, we may know for certain the price we must pay for a product. In addition, there are also one or more inputs that are random. For example, we may not know the exact level of demand, but we can use our knowledge of the situation to describe the possible values of demand using a probability distribution (just as we do not know the outcome of a single roll of a die beforehand, but we can describe the probability distribution of possible outcomes). Since at least one of the inputs is random, this implies that the output of the model is also random. The output of a simulation analysis is really the probability distribution of possible output values, rather than a single number. This gives the decision maker a much clearer picture of the risk involved in a situation than is possible with a regular model.

ancmat03.qxd

11/16/06

3:28 PM

Page C4

C4 · SUPPLEMENT C

FIGURE C-1

INTRODUCTION TO SIMULATION

Fixed (Known) Inputs

Simulation model schematic

Random (Uncertain) Inputs Simulation Model Outputs/Performance Measures

Decision Variables

Briefly, the simulation modeling process in a spreadsheet involves the following steps. Just as in any modeling and analysis activity, sometimes it is necessary to loop back to a previous step.

Deterministic spreadsheet model A logically correct and complete model, but without any randomness built into it.

Develop a deterministic spreadsheet model. Determine the appropriate probability distributions to use for the random inputs to the model. Modify the deterministic model by incorporating the random inputs using the probability distributions. Recalculate the model many times to generate many possible values of the model output(s). Each single recalculation is called a trial or replication. Analyze the possible output values by considering the summary statistics and the probability distribution of the output(s).

RANDOM NUMBER GENERATION IN EXCEL

The foundation of any simulation model is random number generation. In order to create simulations of real systems, we must have a way to mimic how they behave in the real world. For example, consider the act of tossing a coin. There are two possible outcomes, heads and tails, with equal probability. How can we simulate this activity, generating outcomes that mimic what might happen if we tossed a real coin? While this is a very simple situation, the basic concept applied here is exactly the same as is used for more complex situations. The key to modeling any random event hinges on generating random values uniformly distributed between 0 and 1. We'll let X be a specific random value from this distribution between 0 and 1, denoted U(0, 1). If we can generate values of X, then logic and mathematics can be applied to convert these values into the real outcomes. For example, if X is between 0.0 and 0.5, we would consider that to be a "heads," and if X is between 0.5 and 1.0, we would consider it to be "tails" (the reverse definition of heads and tails also works because of the equal probability of the event). Fortunately, Excel has a built-in function to generate values from the U(0, 1) distribution. This function is written " RAND()," where the parentheses are required and nothing is put between them. The parentheses are there to indicate to Excel that we are entering a function. Each time the RAND function is calculated, a different number between 0 and 1 is the result.

ancmat03.qxd

11/16/06

3:28 PM

Page C5

RANDOM NUMBER GENERATION IN EXCEL · C5

A B C D 1 50 Random Numbers Between 0 and 2 Using =RAND() Function 3 4 0.0315 0.6994 0.9362 0.7039 5 0.7175 0.2131 0.4071 0.2706 6 0.4030 0.1604 0.6318 0.4906 7 0.7933 0.7953 0.9929 0.7353 8 0.0286 0.9634 0.3228 0.7877 9 0.1769 0.8939 0.6887 0.4608 10 0.0933 0.0601 0.9990 0.9388 11 0.0493 0.0077 0.6724 0.8535 12 0.2417 0.4332 0.2643 0.7290 13 0.8998 0.6985 0.2092 0.5859 14 A4: =RAND() 15 Copied to A4:E13 16 E

1

FIGURE C-2

Fifty U(0,1) random numbers

0.8702 0.6158 0.9260 0.8710 0.9788 0.1845 0.7421 0.8682 0.1131 0.8812

Figure C-2 shows fifty numbers generated using the RAND function. The function was entered into one cell and copied to all the others. So, although exactly the same function is entered into each of these cells, each resulting value is different. To recalculate the set of numbers again, press the F9 key. Excel independently calculates each one of the functions. Therefore, we can use each of these values to determine a "heads" or a "tails."

Problem-Solving Tip: If you are working through this supplement at the computer, your numerical results for all the examples will differ from what is shown in the text. This is the nature of random numbers and simulation.

A histogram of values from the RAND function should show the values to be approximately uniformly distributed between 0 and 1. Figure C-3 shows a histogram based on fifty values of the RAND function. There are ten "bins" in this histogram, and the labels on the horizontal axis are the upper end point of each bin. Therefore, the column for 0.2 indicates there were four values 0.10 but 0.20. If the values

Histogram (50 Random Values from = RAND() function) 8 7 6 Frequency 5 4 3 2 1 0

FIGURE C-3

Histogram of fifty values from RAND() function

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

Upper End of Category

ancmat03.qxd

11/16/06

3:28 PM

Page C6

C6 · SUPPLEMENT C

INTRODUCTION TO SIMULATION

were perfectly uniformly distributed, there would be five observations in each of these ranges. However, as you know, if you flip a coin fifty times, you will generally not get exactly twenty-five heads and twenty-five tails. As more values from RAND are generated, the resulting histogram should become more and more uniform. Figure C-4 is a histogram generated from 5000 values of the RAND function. Notice that these columns are much more even in height than for the 50-value histogram. Just as a pollster obtains a better representation of the views of the entire population by interviewing more people, we obtain a truer picture of the real system if we compute many replications of a simulation model.

Bernoulli Distribution: Simulating the Flip of a Coin

Returning to the coin flip, how do we simulate this? Taking one value from U(0, 1), if that value is 0.5, we can consider that a "heads"; otherwise, we'll consider it a "tails." This can be done in Excel using the IF function, as shown in Figure C-5. This figure also shows the results from 100 coin flips, by copying the respective formulas down and counting the numbers of heads and tails. Note that in this figure some of the rows have been hidden (Format/Row/Hide). We use the COUNTIF function to count the numbers of heads and tails. The first argument in this function is the count range and

FIGURE C-4

Histogram (5000 Random Values from = RAND() function) 600 500 Frequency 400 300 200 100 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

Histogram of 5000 values from RAND function

Upper End of Category

FIGURE C-5

Spreadsheet for coin flip example: Bernoulli distribution

A B C D E 1 Coin Toss Simulation 2 A4: =RAND() U(0,1) H/T 3 0.010 Heads 4 0.031 Heads 5 B4: =IF(A4<0.5,"Heads","Tails") 0.908 Tails 6 7 0.936 Tails 8 0.196 Heads Number Heads 43 9 0.667 Tails Number Tails 57 0.713 Tails Total 100 10 11 0.355 Heads 102 0.151 Heads 103 0.757 Tails

F

G

H

E8: =COUNTIF(B$4:B$103,"Heads") E9: =COUNTIF(B$4:B$103,"Tails")

ancmat03.qxd

11/16/06

3:28 PM

Page C7

RANDOM NUMBER GENERATION IN EXCEL · C7

the second is the criteria. In this particular set of 100 coin flips, we had 43 "heads" and 57 "tails." If we recalculate the spreadsheet (by hitting the F9 key), we will generate 100 new coin flips, and our total heads and tails will probably be different. There is nothing special about the 0.5 probability used in the coin flip situation. We might be simulating a customer service operation, where the probability of a customer making a complaint is 0.01. In a model, a complaint would likely trigger a conflict-resolution process, which would involve additional employee resources, time, and costs. Any situation involving two outcomes can be modeled in this way. Another example is if we have a process that produces defective items with some probability. A random variable that can have two outcomes is called a Bernoulli random variable.

Bernoulli random variable A random variable that can assume only two values.

Discrete Uniform Distribution: Simulating the Roll of a Die

What if there are more than two outcomes? For example, how would we model the outcome from a normal six-sided die? The outcomes from a single die come from a discrete uniform distribution, since there is a finite number of outcomes, each having the same probability. Conceptually, the random number generation process is the same as for the coin flip. We generate a U(0,1) random number (say, X) and then translate that number into one of the numbers 1, 2, . . . , 6 with equal likelihood. Therefore, if 0 X 0.167 (i.e., 1/6), then the die outcome is 1. If 0.167 X 0.333, then the die outcome is 2, and so on, up through if 0.833 X 1, the die outcome is 6. This could be accomplished in Excel by modifying the IF statement used for the coin flip example. However, we would need to nest multiple IF functions to accomplish this. Fortunately, there is a better way using Excel's VLOOKUP function. The VLOOKUP (vertical lookup) function looks up a value in a table and returns a corresponding value from the same row. For example, we could use it to look up a customer number and return the number of items that customer has purchased. The VLOOKUP function has the form VLOOKUP(lookup_value, table_array, col_index_num) The lookup_value is the value to be found in the first column of the table_array. The table_array is the table of information in which data is looked up. The col_index_num is the column number in the table_array from which the matching value is returned. A col_index_num of 1 returns the value in the first column in table_array; a col_index_num of 2 returns the value in the second column in table_array, and so on. For more information, see the Excel help system. Figure C-6 shows how the simulation of a die roll can be conducted. As before, we have copied the logic down to represent 100 rolls of the die (some rows have been hidden) and counted the number of each outcome. We know in a limited sample we will not have exactly 16.67 percent of the rolls corresponding to each possible outcome. The VLOOKUP function in cell B4, VLOOKUP(A4,E$7:G$12,3), converts the U(0,1) random number in cell A4 (the lookup_value) to a simulated outcome of the die. It looks in the first column of the table_array E$7:G$12. Specifically, it looks in cells E$7:E$12 for the greatest value that is less than or equal to the value in A4. Since A4 contains the value 0.607, the VLOOKUP function stops at the 0.500 in cell E10, this being the greatest value that is also less than or equal to 0.607. Then, since "3" is the col_index_num, the VLOOKUP function returns the value in column 3 of the table, in the same row as the value 0.500 (i.e., the value 4 in cell G10). Similarly,

Discrete uniform distribution A probability distribution in which there are a finite number of equally spaced outcomes, each with equal probability.

ancmat03.qxd

11/16/06

3:28 PM

Page C8

C8 · SUPPLEMENT C

FIGURE C-6

INTRODUCTION TO SIMULATION

A B C D E F

E8: =F7

G

Spreadsheet for die roll example: discrete uniform distribution

A4: =RAND() 1 Die Roll Simulation F7: =E7+D7 (copied down) 2 (copied down) U(0,1) Roll 3 B4: =VLOOKUP(A4,E$7:G$12,3) 0.607 4 4 0.127 1 Cumulative Probability Distrib 5 0.005 1 Probability Begin End Outcome 6 0.911 6 0.167 0.000 0.167 1 7 0.533 4 0.167 0.167 0.333 2 8 0.505 4 0.167 0.333 0.500 3 9 0.496 3 0.167 0.500 0.667 4 10 0.167 2 0.167 0.667 0.833 5 11 0.198 2 0.167 0.833 1.000 6 12 0.294 2 13 0.631 4 14 0.924 6 Results of Simulation 15 0.421 3 Roll Frequency Fraction 16 0.245 2 1 18 0.18 17 0.453 3 2 15 0.15 18 0.556 4 3 24 0.24 19 0.663 4 4 20 0.20 20 0.077 1 5 10 0.10 21 0.711 5 6 13 0.13 22 0.776 5 100 23 0.385 3 24 E23: =SUM(E17:E22) 0.468 3 25 0.352 3 26 E17: =COUNTIF(B$4:B$103,D17) 0.668 5 27 (copied down) 0.440 3 28 F17: =E17/E$23 0.008 1 29 (copied down) 4 102 0.503 4 103 0.614

cell B5 has the value of 1, since the value in A5 is 0.127. The VLOOKUP functions stops at E$7 and returns the value in the third column, G$7.

General Discrete Distribution

Just as there was nothing special about the 0.5 probability for the coin flip example, there is nothing special about the equal probability of each outcome in the roll of the die. The outcomes could be the demand for a product with different probabilities for each. Figure C-7 shows an example. The only difference is that there are now seven possible outcomes, and the probabilities for the outcomes are not all the same. Such a distribution is called a general discrete distribution. Demand can be one of the values 100, 150, . . . , 400, with individual probabilities shown in cells D7:D13. Obviously, an important thing to do is to make sure the probabilities sum to 1.

General discrete distribution A probability distribution with (usually) a finite number of possible outcomes, not necessarily with equal probabilities.

CONTINUOUS PROBABILITY DISTRIBUTIONS

The three examples so far have been of discrete distributions, which are distributions that have a "countable" number of possible outcomes. Loosely speaking, most people think of discrete distributions as having a finite number of possible outcomes, but a

ancmat03.qxd

11/16/06

3:28 PM

Page C9

CONTINUOUS PROBABILITY DISTRIBUTIONS · C9

A B C D E F G

FIGURE C-7

1 General Discrete Distribution 2 A4: =RAND() 3 U(0,1) Demand 4 0.034 100 5 0.549 250 Cumulative Distribution B4: =VLOOKUP(A4,E$7:G$13,3) 6 0.039 100 Probability Begin End Demand 7 0.356 200 0.05 0.00 0.05 100 8 0.569 250 0.10 0.05 0.15 150 9 0.207 200 0.25 0.15 0.40 200 0.139 150 0.30 0.40 0.70 250 10 0.049 100 0.15 0.70 0.85 300 11 0.534 250 0.10 0.85 0.95 350 12 0.477 250 0.05 0.95 1.00 400 13 0.036 100 1.00 14 0.470 250 15 0.772 300 16 0.066 150 Results of Simulation 17 0.682 250 Demand Frequency Fraction 18 0.389 200 100 10 0.10 19 0.450 250 150 8 0.08 20 0.962 400 200 18 0.18 21 0.502 250 250 36 0.36 22 0.651 250 300 18 0.18 23 0.738 300 350 5 0.05 24 0.644 250 400 5 0.05 25 0.419 250 100 26 250 102 0.545 300 103 0.800

Spreadsheet for general discrete distribution

distribution with outcomes 0, 1, 2, . . . is also considered to be discrete. Discrete distributions are valuable for simulating events such as whether we get awarded a contract or not, the number of days required for some task, or the number of customers arriving in a store in some given period of time. The other major type of probability distribution is a continuous distribution, which can take on any value, perhaps within some range. Actually, the RAND function generates a continuous uniform distribution between 0 and 1. There are many continuous distributions, but some common ones used in simulation include the uniform distribution, the normal distribution, and the exponential distribution. Figure C-8 illustrates these types of distributions.

Discrete distribution A distribution that has a "countable" number of possible outcomes. Continuous distribution A probability distribution that can take on any fractional or whole value.

Simulating Continuous Probability Distributions

The RAND function is a continuous uniform probability distribution between 0 and 1, or U(0,1). In general, a continuous uniform distribution can be between any two values, for instance, a and b. We would refer to this as U(a, b). To generate a U(a, b) random number in Excel, we can use the formula a (b a)*RAND() The quantity (b a) is the total range of the distribution. Multiplying by RAND() is essentially taking a fraction of this range. Adding a to this value then results in a

Continuous uniform distribution A probability distribution that ranges between a minimum and maximum value, with any value in between equally likely to occur.

ancmat03.qxd

11/16/06

3:29 PM

Page C10

C10 · SUPPLEMENT C

FIGURE C-8

INTRODUCTION TO SIMULATION

Normal Distribution, mean = 80, stdev = 10

Examples of continuous probability distributions

40

60

80

100

120

Uniform Distribution, minimum = 10, maximum = 50

-10

10

30

50

70

Exponential Distribution, mean = 10

0

10

20

30

40

50

60

number between a and b. For example, if the time to complete a task was uniformly distributed between 10 and 50 minutes, we would generate a U(10, 50) random number to represent this time. Then the corresponding formula would be 10 (50 10)*RAND()

If RAND() equals 0, this formula results in a time of 10 minutes; if RAND() equals 1, the formula computes to 50 minutes. Similarly, if RAND() equals 0.5, the formula computes to 30, which is halfway between 10 and 50. Essentially, RAND() is acting like a fraction, and adding a fraction of the value (b a) to the minimum value a. Figure C-9 shows a histogram of 250 simulated values from a U(10, 50) distribution. Note the general shape of this distribution is rectangular, indicating a relatively even distribution of values across this range. The previous section showed how to generate values from a general discrete distribution using the VLOOKUP function. If a discrete distribution is between two integers, with each value equally likely, a simpler approach is possible. This approach takes advantage of the logic for the continuous uniform distribution but rounds the

ancmat03.qxd

11/16/06

3:29 PM

Page C11

CONTINUOUS PROBABILITY DISTRIBUTIONS · C11

Frequency (%, n = 250) 14.0% 12.0% 10.0% 8.0% 6.0% 4.0% 2.0% 0.0% 12.08 16.04 19.99 23.95 27.90 31.86 35.82 39.77 43.73 47.68 Midpoint of Range

FIGURE C-9

Histogram of 250 simulated values from a U(10, 50) distribution

result down to the nearest integer. If we want to generate a discrete uniform distribution between 10 and 50, with only integer values possible, we can use the following formula: INT (10 (50 10 1)*RAND()) The INT function rounds any value down to the nearest integer. Besides the use of this function, the only change is in the (50 10 1) portion. The " 1" is needed because of this rounding down, so that all values between 10 and 50 (including 10 and 50 themselves) are possible. Simulating other distributions is conceptually the same as we have seen. First a U(0, 1) random number is generated, and this number is transformed into a random number from the desired distribution. For other distributions, the mathematics of the process becomes more difficult, but for two additional distributions Excel functions can be readily used. The normal distribution is often used to model many real-world phenomena, such as the delivery time from a supplier, the demand for a product or service, or the cost of raw material. To generate normally distributed random numbers in Excel, you need to know the mean, , and standard deviation, s. Then the following formula generates a normal random number, denoted N( , ): NORMINV(RAND(), , ) The NORMINV function is the inverse normal function. RAND() acts like a probability in this function (note that it is between 0 and 1), and the NORMINV function returns the value of the distribution corresponding to the point at which the area under the curve is equal to the value from RAND. Figure C-10 shows a histogram from 250 simulated values from a N(80, 10) distribution. Note the familiar "bell" shape of this histogram. The exponential distribution is a very common distribution in the modeling of customer arrivals to service systems, such as a call center or a drive-through window. Specifically, it is used to represent the time between successive customer arrivals, called the interarrival time. The mean interarrival time is denoted , and we would refer to such a distribution as EXP( ). To generate exponentially-distributed random numbers, the following formula should be used: *LN(RAND())

Normal distribution A distribution characterized by a mean and standard deviation, indicated by the familiar "bell" shape with a large density around the mean and with diminished density as one moves further from the mean.

Exponential distribution A distribution characterized by a mean, with possible outcomes all positive.

ancmat03.qxd

11/16/06

3:29 PM

Page C12

C12 · SUPPLEMENT C

FIGURE C-10

INTRODUCTION TO SIMULATION

Frequency (%, n = 250) 30.0% 25.0% 20.0% 15.0% 10.0% 5.0% 0.0% 55.45 61.44 67.42 73.41 79.40 85.38 91.37 97.36 103.34 109.33 Midpoint of Range

Histogram of 250 simulated values from a N(80, 10) distribution

In this formula, LN is the Excel function for the natural logarithm. The minus sign is needed because the natural logarithm of a number between 0 and 1 is negative. Figure C-11 shows a histogram of 250 simulated values from an EXP(10) distribution. All values are greater than zero. The distribution starts off with a high frequency of observations near zero, but quickly tails off. This tends to match the arrival behavior of many service systems, where frequently the time between successive customer arrivals is quite small. For reference, Table C-1 summarizes the formulas needed to generate the probability distributions discussed here. Commercial add-ins such as Crystal Ball and @Risk can generate many other distributions, but the ones provided here are some of the most common.

APPLICATION OF SIMULATION TO DECISION MAKING

In this section we show how spreadsheet-based simulation can be used to analyze a situation involving uncertainty and risk. We will set up and solve a relatively simple newsvendor problem. The newsvendor problem is one in which a retailer, for instance, needs to purchase some quantity of an item prior to demand being known. If too few are ordered, it will forgo potential profit. However, if too many are ordered, the excess over the amount demanded must be heavily discounted. This fundamental problem commonly occurs in retailing, such as when a store needs to order seasonal or perishable merchandise. However, it also exists for manufacturers of products that decline in value

FIGURE C-11

Frequency (%, n = 250) 50.0% 40.0% 30.0% 20.0% 10.0% 0.0% 2.45 7.30 12.15 17.00 21.86 26.71 31.56 36.41 41.26 46.12 Midpoint of Range

Histogram of 250 simulated values from an EXP(10) distribution

ancmat03.qxd

11/16/06

3:29 PM

Page C13

APPLICATION OF SIMULATION TO DECISION MAKING · C13

Distribution

Bernoulli

Excel Function

IF(RAND() p,1,0)

Description

TABLE C-1

General Discrete

Continuous Uniform

Exponential

Normal

Discrete Uniform

Returns the result, either 0 or 1, of a single Bernoulli trial, where p is the probability of success. Used to model random events with only two outcomes. VLOOKUP(RAND(), Returns one of the values Lookup_Array,3) in the third column of the Lookup_Array. The first two columns must contain the ranges corresponding to the cumulative probability distribution, as shown in the examples. a (b a)*RAND() Returns a value in the range from a to b. Each value in this range is equally likely to occur. *LN(RAND()) Returns a value from an exponential distribution with mean . Often used to model the time between events or the lifetime of a device with a constant probability of failure. NORMINV(RAND(), , ) Returns a value from a normal distribution with mean and standard deviation . INT (a (b a 1) Returns one of the integers *RAND()) between a and b, inclusive. Each value is equally likely to occur.

Excel Formulas to Generate Common Probability Distributions

after they are produced. For example, in the fast-changing electronics industry, if a company commits to manufacturing too many handheld computers, it will be left with product that is worth only a fraction of what it was worth when produced. Even transportation services such as airlines face a form of this problem, since airlines must decide ahead of time how frequently to fly a given route and which type of aircraft to use.

DG Outerwear must decide how many of a particular style and size of winter coat to order for the coming season. Lead times in the industry are such that the order must be placed in June, well before the actual realization of demand. Coats cost $75 for DG to purchase, and the planned sales price is $100. If not enough coats are ordered, assume that the potential customer leaves without purchasing a substitute coat. If too many coats are ordered, DG must discount the coats in order to sell them at the salvage value. The demand for this size and style of coat is estimated to be between 20 and 40, with each possibility equally likely. If coats must be salvaged, the salvage price may be $15, $20, $25, or $30 with probabilities 0.05, 0.30, 0.50, and 0.15, respectively. Assume that all remaining coats will sell at this salvage price. The approach DG has used in the past is to estimate the expected demand and to order somewhat more than that number of coats. For this year, DG is considering ordering 35 coats, but wonders if that is really the best decision.

EXAMPLE C.1

DG Outerwear

ancmat03.qxd

11/16/06

3:29 PM

Page C14

C14 · SUPPLEMENT C

INTRODUCTION TO SIMULATION

· Before You Begin:

In this problem, determine how many of a particular winter coat to order for the coming season. You can place only one order because of the long lead time for this coat. Your objective is to order the number of this type of coat that will provide the highest expected payoff. There is considerable uncertainty to model. Demand is represented by a uniform distribution, with a low of 20 coats up to a maximum of 40. Salvage value for the coats is also uncertain, with values ranging from $15 up to $30. Use a simulation model to provide insight into what might happen if 35 coats are ordered.

Deterministic Model

We know several things in this problem: The purchase price is $75, and the regular sales price is $100. The salvage price can be one of four quantities. Before the season begins we do not know which value will be necessary to liquidate any remaining coats. Demand is also uncertain, but we estimate that it will be between 20 and 40. We need a model to be able to evaluate different purchase quantities. That is, purchase quantity is the decision variable. The first step in setting up a simulation model is to build the model logic. We initially ignore the uncertainty and focus on the spreadsheet logic. In particular, the logic needs to compare the quantity purchased with the demand. The quantity sold at the regular price, $100, will necessarily be the smaller of these two quantities, since we cannot sell more than we purchase and we also cannot sell more than what customers are willing to buy at the regular price. Once the quantity sold at the regular price is determined, we can compute the number (if any) of remaining coats. These coats will be sold at the salvage price. The model can then compute the total revenue, the total costs, and the profit. Figure C-12 shows a deterministic model of this situation. For the demand and salvage price cells (cells D17 and G17), we have just entered sample values. The focus here is developing the correct logic for the situation. The formulas are listed here: E17 F17 H17

FIGURE C-12

A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 B C

MIN(B$8,D17) B$8 E17 B$5*E17

D E F G H I J

DG Winter Coats

Fixed Inputs Purchase Price of Coat $75 Regular Sales Price $100 Decision Variable Purchase Quantity Demand Distribution (Discrete Uniform) Minimum 20 Maximum 40 Salvage Price Distribution (Discrete) Cumulative Distribution Probability Begin End Price 0.05 0.00 0.05 $15 0.30 0.05 0.35 $20 0.50 0.35 0.85 $25 0.15 0.85 1.00 $30 1.00 Reg Sales Qty 30 Salv Sales Qty 5

Deterministic model for DG Outerwear problem

35

Simulation Logic Salv Reg Price Rev $25 $3,000 Salv Rev $125

16 17

Demand 30

Profit $500

ancmat03.qxd

11/16/06

3:29 PM

Page C15

APPLICATION OF SIMULATION TO DECISION MAKING · C15

I17 J17

G17*F17 H17 I17 (B$8*B$4)

The formula in cell E17 results in 30, since there were only 30 customers willing to purchase the coat at the regular price. Cell F17 computes the amount remaining as the purchase quantity less the number sold at the regular price. Then the regular and salvage revenues can be computed, followed finally by the profit. This model can certainly be used to do what-if analysis, but it does not take into account the uncertainty of demand and salvage price.

Simulation Model

The model becomes a simulation model when we directly incorporate the uncertainty of demand and salvage price. Figure C-13 shows this additional logic. Notice that we have added columns for "Replication" and "RN1," and "RN2." for two random numbers from the U(0, 1) distribution. Other changes to the model are in the demand and salvage price cells. The demand cell now generates a random integer uniformly distributed between 20 and 40, and the salvage price cell generates a random price from the salvage price distribution. The new formulas are listed here: B17: C17: D17: G17: RAND() RAND() INT(E$4 (E$5 E$4 1)*B17)

Replication Replication of a simulation model consists of sampling inputs from respective probability distributions, computing the logic of the model, and recording the resulting output value.

VLOOKUP(C17,E$10:G$13,3)

Replicating the Model

Figure C-13 shows one replication of the simulation logic. A replication consists of a single sampling of the random values from the applicable distributions, calculating the output of the model, and recording that result. That is, a single replication represents one possible value of the profit. Just as a political pollster would never

A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

B

C

D

E

F

G

H

I

J

DG Winter Coats

Fixed Inputs Purchase Price of Coat $75 Regular Sales Price $100 Decision Variable Purchase Quantity Demand Distribution (Discrete Uniform) Minimum 20 Maximum 40 Salvage Price Distribution (Discrete) Cumulative Distribution Probability Begin End Price 0.05 0.00 0.05 $15 0.30 0.05 0.35 $20 0.50 0.35 0.85 $25 0.15 0.85 1.00 $30 1.00 Reg Sales Qty 20 Salv Sales Qty 15

FIGURE C-13

Simulation logic for DG Outerwear problem (one replication)

35

Simulation Logic Salv Reg Price Rev $30 $2,000 Salv Rev $450

16 17

Replication 1

RN1 RN2 Demand 0.003 0.992 20

Profit ($175)

ancmat03.qxd

11/16/06

3:29 PM

Page C16

C16 · SUPPLEMENT C

INTRODUCTION TO SIMULATION

consider speaking to a single person to develop predictions on how the public at large will vote, a simulation model never consists of just one replication. Rather, we must perform many replications of the model in order to get a clearer picture as to the likelihood of different profit levels. In Figure C-14, we have copied the logic for a single replication down to generate 250 replications. Notice that the random numbers change for each replication, resulting in different demand, salvage price, and profit values. We are really simulating the upcoming winter sales season 250 times in order to obtain more insight into the likelihood of profit levels, assuming we purchase 35 coats.

Problem-Solving Tip: How many replications should you run for a simulation? We have used 250 as a sample size. However, there is no simple answer to this question, although more is always better in terms of the precision of the estimates. This is a statistical question, no different from the question pollsters face in determining how many people to interview in order to achieve some level of precision in a survey. Obviously, it is easy to run additional replications of a simple model, but for complex simulation models, the computation time of additional replications can become significant. (Some simulations can run for hours or even days.)

FIGURE C-14

A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

B

C

D

E

F

G

H

I

J

DG Winter Coats

Fixed Inputs Purchase Price of Coat $75 Regular Sales Price $100 Decision Variable Purchase Quantity Demand Distribution (Discrete Uniform) Minimum 20 Maximum 40 Salvage Price Distribution (Discrete) Cumulative Distribution Probability Begin End Price 0.05 0.00 0.05 $15 0.30 0.05 0.35 $20 0.50 0.35 0.85 $25 0.15 0.85 1.00 $30 1.00 Reg Sales Qty 35 25 21 32 28 35 31 21 Salv Sales Qty 0 10 14 3 7 0 4 14

Completed simulation model for DG Outerwear problem

35

Simulation Logic Salv Price $25 $25 $25 $25 $25 $20 $25 $25 Reg Rev $3,500 $2,500 $2,100 $3,200 $2,800 $3,500 $3,100 $2,100 Salv Rev $0 $250 $350 $75 $175 $0 $100 $350

16 17 18 19 20 21 22 265 266 267 268 269 270 271 272 273 274 275

Replication 1 2 3 4 5 6 249 250

RN1 0.911 0.279 0.064 0.595 0.404 0.932 0.544 0.084

RN2 Demand 0.701 39 0.724 25 0.585 21 0.355 32 0.405 28 0.302 39 0.795 31 0.823 21

Profit $875 $125 ($175) $650 $350 $875 $575 ($175)

Average $435 Standard Deviation $392 Minimum ($325) Maximum $875 95% Confidence Interval on Average Lower CL $386 Upper CL $483

ancmat03.qxd

11/16/06

3:29 PM

Page C17

APPLICATION OF SIMULATION TO DECISION MAKING · C17 Recall from statistics that as the sample size is increased, precision improves, but at a decreasing rate. This is because in the formula for the confidence interval for the mean of a population, the square root of the sample size appears in the denominator. Therefore, as this sample size increases, the benefit of increased precision takes more and more samples to obtain. For the problems covered here, a sample size of 250 is usually sufficient, but 500 or even 1000 is even better. You should experiment and see how much the width of the confidence interval changes with a larger sample size. Commercial add-in products allow you to specify a precision level, with the simulation automatically stopping when this level is reached.

Analyzing the Results

After we have replicated the model, we need to compute summary statistics. These are shown in Figure C-14. Generally speaking, it is a good idea to compute the average, standard deviation, minimum, and maximum values of the simulation output(s). We have also calculated a confidence interval for the true average profit. Formulas for these summary statistics are provided here: J268: J269: J270: J271: J274: J275: AVERAGE(J$17:J$266) STDEV(J$17:J$266) MIN(J$17:J$266) MAX(J$17:J$266) J$26821.96*J$269/SQRT(250) J$26811.96*J$269/SQRT(250)

If we purchase 35 coats, we see that our average, or expected, profit is $435. However, there is a relatively large standard deviation of $392. This implies that in any given year, there is a significant amount of uncertainty in the profit we will earn. Over the course of 250 replications, the worst case is a loss of $325 and the best case a profit of $875. We are 95 percent confident that the true average profit lies somewhere in the interval from $386 to $483. Our estimate of the average profit is based on these 250 trials; if we were to perform additional replications, our estimate would become more precise.

Problem-Solving Tip: After running a simulation model for the number of replications you desire, oftentimes it is a good idea to "freeze" the random numbers upon which the simulation is based. If you don't do this, the entire simulation will recalculate any time you change a value in a cell or even open or close the file. To freeze the random numbers, first highlight the cells to be frozen, choose Edit/Copy and then Edit/Paste Special. In the Paste Special dialog box, select Values, and click "OK." Any functions, such as RAND(), in the cells you selected, will be replaced by the values that were in there when you did the copy/paste operation. In this way you can run a simulation, freeze the results, and then perform more detailed analysis on the results. That being said, sometimes you will want to leave the results of a simulation "live" so that every time you make a change to a cell, the results will update. This is the case if you want to try out different values for a decision quantity, for example.

ancmat03.qxd

11/16/06

3:29 PM

Page C18

C18 · SUPPLEMENT C

INTRODUCTION TO SIMULATION

We now have valuable information for DG, if it decides to purchase 35 coats. In making this decision, DG must be willing to accept the uncertainty in profit as outlined. Is this the best order quantity? Since we have a flexible simulation model, it is quite easy to try different quantities. The simulation results will automatically calculate, along with the summary statistics. For the sake of simplicity, suppose DG can order in increments of 5 coats. Therefore, DG will consider order quantities of 20, 25, 30, 35, and 40 coats. Summary statistics for these values are provided in Table C-2. From the table, we see that if 20 coats are ordered, a guaranteed $500 profit can be achieved. This is not surprising, since we assume that demand is between 20 and 40 coats. For a 25-coat purchase quantity, average profit increases to $568, but standard deviation of profit also increases, to $117. Simultaneously, minimum profit gets worse, and maximum profit gets better. This should be intuitive after considering that we are investing additional money in inventory, so there is a greater potential gain, but at the same time the possibility of doing worse. If we purchase 30 coats, average profit declines from the 25-coat option, but the standard deviation continues to rise. As we move to the 35- and 40-coat purchases, average profit continues to decline, with the standard deviation increasing.

Problem-Solving Tip: To recalculate a spreadsheet, press the F9 key. In a simulation model, this will force all cells involving the RAND() function to recalculate, as well as any cells that depend on them.

In light of these values, it would appear that purchasing 20 or 25 coats is the best alternative. Purchasing 20 coats involves no uncertainty, and purchasing 25 allows maximizing expected profit. Surprisingly, even though 30 coats is the average of the demand distribution, it is better in this case (because of the revenues and costs) to purchase somewhat less than this quantity. Suppose we decide to purchase 25 coats. What does the actual distribution of possible profit values look like? To determine this, we can generate a histogram of the profit values, using the Tools/Data Analysis/Histogram tool. If Data Analysis does not appear in the Tools menu of Excel, go to Tools/Add Ins, and put a check beside the Analysis Tool Pack item. This histogram is shown in Figure C-15. The histogram is really the probability distribution of profit, after considering the uncertainty in demand and salvage price. At first, this histogram appears very odd. The vast majority (193 out of 250) of the observations have profit values greater than $598, with the remainder being spread out rather evenly over the range from $225 to

TABLE C-2

Summary Statistics of Profit for DG Outerwear Coat Problem

Purchase Quantity

20 25 30 35 40

Average

$500 $568 $551 $435 $230

Standard Deviation

$0 $117 $264 $392 $460

Minimum

$500 $225 $50 $325 $600

Maximum

$500 $625 $750 $875 $1000

ancmat03.qxd

11/16/06

3:29 PM

Page C19

APPLICATION OF SIMULATION TO DECISION MAKING · C19

Bin Frequency $225 3 $252 13 $278 1 $305 3 $332 5 $358 1 $385 5 $412 6 $438 2 $465 4 $492 4 $518 0 $545 6 $572 4 $598 0 More 193

FIGURE C-15

Histogram of Profit Values for Purchase Quantity = 25 (250 total replications) 250 200 Frequency 150 100 50 0 More $225 $252 $278 $305 $332 $358 $385 $412 $438 $465 $492 $518 $545 $572 $598

Histogram of profit values for a purchase quantity of 25

Upper End of Category

$598. Why is this? Recalling that the distribution of demand is uniform, it would seem that the profit distribution should be uniform as well. However, this is clearly not the case. The key point is that since we are purchasing 25 coats, there is sufficient demand to sell all of those coats most of the time. In fact, demand will be 25 coats or more approximately 75 percent of the time (since demand ranges from 20 to 40 coats). As we see, 193 times out of 250 (77 percent of the time) we appear to be earning the maximum possible profit of $625. The other 23 percent of the time (when demand is between 20 and 24 coats), profit is spread across the other possible values.

Using a Data Table to Run a Simulation

In this example, we developed the logic for a single replication and then copied that entire logic down in order to run 250 replications. This worked because the logic for this model was relatively simple and could be put into a single row. Most models are more complex. Another way to run many replications is to use Excel's Data Table feature, covered in Supplement A, where it is used for sensitivity analysis. Here we use it to have Excel recalculate the logic many times, each time with different random numbers, and store the results in a table. Figure C-16 shows the model with a Data Table used to do the replications. To do this, we have started with the single-replication model, which was shown in Figure C13. The steps involved in using a Data Table for the simulation are as follows, assuming the logic for a single replication is already complete: 1. Label two columns, one for replications and one for profit. In the replications column, from A22 to A271, enter the numbers 1 . . . 250. This is done easily with the Edit/Fill/Series command, with Series in Columns, Step value of 1, and Stop value of 250. Note that we do not put anything in cell A21. 2. In cell B21, enter the formula J17. This simply references the profit value from the simulation logic. 3. Select the range A21:B271. Be sure to include the top row in the selection. It is really the formula in cell B21 that tells the Data Table what value you're interested in.

ancmat03.qxd

11/16/06

3:29 PM

Page C20

C20 · SUPPLEMENT C

FIGURE C-16

INTRODUCTION TO SIMULATION

A 7 Decision Variable 8 Purchase Quantity 9 10 11 12 13 14 15 Simulation Logic B 35 C D E F G H Salvage Price Distribution (Discrete) Cumulative Distribution Probability Begin End Price 0.05 0.00 0.05 $15 0.30 0.05 0.35 $20 0.50 0.35 0.85 $25 0.15 0.85 1.00 $30 1.00 Reg Sales Qty 28 Salv Sales Qty 7 I J

DG Outerwear simulation using Data Table

16 RN1 RN2 Demand 0.425 0.255 28 17 18 B21: =J17 19 Data Table for Simulation Replications 20 Replications Profit 21 $ 315 Summary Statistics 22 1 $ 875 Average $ 413 23 2 $ 35 StdDev $ 403 24 3 $ 795 Minimum $ (400) 25 4 $ (325) Maximum $ 875 26 5 $ 75 27 6 $ (100) 95% Confidence Interval 28 7 $ 200 Lower CL $ 363 29 8 $ 200 Upper CL $ 463 30 9 $ (35) 31 10 $ (250) 32 11 $ (400) 270 249 $ 200 271 250 $ 715

Salv Reg Price Rev $20 $2,800

Salv Rev $140

Profit $315

4. Keeping the range from #3 selected, go to Data/Table in the Excel menu. In the resulting dialog box, leave the Row Input Cell field blank, and click on cell A21 (or any blank cell on the worksheet) for the Column Input Cell. Click "OK." The results from 250 replications should now be showing in cells B22:B271. Note: Recall in Supplement A the Column Input Cell was set to vary an input parameter of the model, but here we are using it simply to force Excel to recalculate the model. 5. If all the values in B22:B271 are the same, press the F9 key to force recalculation of the worksheet. This can occur if Excel's recalculation settings have been changed. You can change these settings at Tools/Options/Calculation. Supplement A and the Excel help system contain additional information about the Data Table command. 6. Compute summary statistics from the results in cells B22:B271. 7. If desired, freeze the results from the simulation in cells B22:B271 using Edit/Copy, Edit/Paste Special/Values. Using the Data Table command to run simulations is normally easier, once you get the hang of it, than copying all of the simulation logic. It also allows you to run more complex models.

Recap

In this example we have begun to see the power of spreadsheet simulation. Simulation models allow us to incorporate our uncertainty directly into the model, run the model many times, and compute summary statistics. Rather than relying on a single point es-

ancmat03.qxd

11/16/06

3:29 PM

Page C21

SUPPLEMENT HIGHLIGHTS · C21

timate of profit, we can actually determine the uncertainty of profit (or whatever the output of our model is). This quantification of uncertainty is extremely important in managerial decision making.

OTHER APPLICATIONS OF SIMULATION

There are almost limitless ways the power of simulation can be used to bring insight into managerial decision making, both in traditional OM areas and throughout the organization. A few decision situations in which simulation can and has been used effectively are listed here. Financial analysis for new products, expansions, or any effort involving the expenditure of funds now in the hope of future (but uncertain) payoffs. Project planning and scheduling. Activity times are almost always uncertain, which causes the actual completion time of the project to be uncertain. Determining the customer service impacts of adding or removing serving capacity. For example, what will be the effect of adding a second drive-through window at a banking facility? Evaluating different inventory policies while taking into account demand uncertainty. Evaluating different plant and supply chain policies, such as scheduling and route assignments.

SIMULATION WITHIN OM: PUTTING IT ALL TOGETHER

Simulation is truly an analytical tool with applications across the enterprise. Consider a capital investment situation such as the launch of a new product. Engineering is involved in the product design, during which simulation can be used to compare different design configurations without having to actually build the product. For example, automakers use computer simulation of cars to test design concepts. Operations is involved in facility design, supply chain configuration and management, manufacturing, and distribution. All of these areas lend themselves to simulation, which is probably the most common tool used in comparing different facility layouts and operating plans. Marketing is involved in the market development, distribution, sales, and customer support aspects of the new product. Since there is typically much uncertainty in the launch of a new product, simulation is a valuable tool for analyzing the effects of uncertainties in market size, price sensitivities, and other factors. Of course, finance is involved in the overall financial attractiveness of the launch of the new product, as well as in questions relating to the financing of the capital investment. These decisions involve much uncertainty, and simulation is a tool to help evaluate the risk level of the project.

Supplement Highlights

1 2

A computer simulation is a model that mimics what might happen in reality. Computer simulations model the uncertainty present in a system by generating random numbers from known probability distributions. Simulation is a valuable tool because it can simultaneously consider the uncertainty present in many factors of a

4

problem and provide outputs that show how the "input" uncertainty translates into uncertainty in the output measure. Monte-Carlo Simulation can be conducted using Excel without any add-ins. Commercial add-ins such as Crystal Ball and @Risk provide additional functionality that is more difficult to employ using stand-alone Excel.

3

ancmat03.qxd

11/16/06

3:29 PM

Page C22

C22 · SUPPLEMENT C

5

INTRODUCTION TO SIMULATION uniform, normal, and exponential, among others) are derived from a U(0, 1) random number through mathematical calculations.

9

Simple discrete-event simulations can be conducted in Excel, but separate software products, such as ProModel, ProcessModel, and Extend, are better suited to modeling systems whose state and behavior change over time. The simulation modeling process in spreadsheets consists of developing a deterministic model with correct logic, determining the appropriate probability distributions to use for the random inputs, incorporating those distributions in the model itself, running many replications of the simulation model, and analyzing the simulation results by computing and interpreting summary statistical measures. Each time Excel's RAND() function calculates, it generates a uniformly distributed random number between 0 and 1, denoted U(0, 1). Random numbers from probability distributions (e.g., Bernoulli, discrete uniform, general discrete, continuous

6

Replications of simulation models in Excel can be performed by copying the entire logic itself or by using Excel's Data Table feature. For simple models where the logic fits into a single row, copying the logic itself is acceptable. However, for more complex models, the Data Table feature should be used. statistics such as the average, standard deviation, minimum, and maximum when interpreting results from a simulation. One should also compute a confidence interval to assess the precision of the estimate for the mean and to determine whether additional replications should be run. It is also a good idea to generate a histogram of the results to see the actual probability distribution of the output measure.

10 At a minimum, one should consider basic summary

7

8

Key Terms

computer simulation C2 Monte-Carlo Simulation C3 discrete-event simulation C3 deterministic spreadsheet model C4 Bernoulli random variable C7 discrete uniform distribution C7 general discrete distribution C8 discrete distribution C8 continuous distribution C9 continuous uniform distribution C9 normal distribution C11 exponential distribution C11 replication C15

Solved Problems

· Problem 1

Cables By Us has recently decided to introduce a new product. It will use space in its current facility that is not now in use. The activities required to launch the product have been identified, along with the precedence relationships among them (some activities must be performed by others). Figure C-17 shows the precedence relationship, a table of the activities, and minimum and maximum possible times (in weeks) for each activity. (a) Develop a simulation model to determine the total time the project will take. (b) Use the simulation model with 500 replications to estimate the average, standard deviation, minimum, and maximum time the project will take. Also determine the probability that the project will be completed within 41 weeks, the company's target time frame.

· Solution

(a) The time to complete each activity is random. Here we assume that the time in weeks is distributed as discrete uniform between the minimums and maximums shown in the figure. The key to this problem is realizing that the total length of the project is defined by the longest path through the activities. This is traditionally called the critical path. However, when activity times are random, we cannot tell ahead of time which path will be the longest. Therefore, we need to simulate the length of each path and choose the largest one as the time required for the project in one replication. We need to generate random activity times for each of the activities, compute the total length of each path, and finally determine the longest of these path lengths. This will be one replication of the simulation. Figure C-18 shows the completed logic. (b) To run the simulation model, we construct a data table with 500 replications. After running the simulation, we freeze the results and compute summary statistics. Note that if you work through this problem on your own, you will obtain somewhat (but not drastically) different results. This is the nature of simulation. Figure C-19 shows the results.

· Before You Begin

For this problem, simulate the length of each path through the network. Generate random activity times for each of the activities, compute the total time needed to complete each connected path, and then determine the critical path. Figure C-19 shows the results of one such simulation. Your results can vary based on the random numbers selected.

ancmat03.qxd

11/16/06

3:29 PM

Page C23

SOLVED PROBLEMS · C23

A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

B

C

D

E

Simulating the Critical Path of a Project

Precedence Diagram of Activities B A C F D E G I H J K

FIGURE C-17

Precedence diagram and activities for Cables by Us

Activity Descriptions and Probability Distributions All Probability Distributions Assumed to be Discrete Uniform Min A Develop Product Specifications 3 Design Manufacturing Process 4 B Source and Purchase Materials 2 C D Source and Purchase Tooling & Equipment 5 E Receive and Install Tooling & Equipment 11 Receive Materials 2 F Pilot Production Run 1 G H Evaluate Product Design 1 Evaluate Process Performance 2 I J Write Documentation Report 3 Transition to Manufacturing 1 K

Max 5 8 4 7 17 8 3 3 4 5 3

A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

B

C

D

E

F

G

Simulating the Critical Path of a Project

Precedence Diagram of Activities B A C F D E G I H J K

FIGURE C-18

Model logic for project planning problem

Activity Descriptions and Probability Distributions All Probability Distributions Assumed to be Discrete Uniform Min A Develop Product Specifications 3 B Design Manufacturing Process 4 C Source and Purchase Materials 2 Source and Purchase Tooling & Equipment 5 D Receive and Install Tooling & Equipment 11 E Receive Materials 2 F G Pilot Production Run 1 H Evaluate Product Design 1 Evaluate Process Performance 2 I Write Documentation Report 3 J Transition to Manufacturing 1 K Path ABDEGHJK ABDEGIJK ACFGHJK ACFGIJK Critical Path Length (Length of Project) Time 40 40 24 24 40

E14: =RAND() (copied down)

Max 5 8 4 7 17 8 3 3 4 5 3

RN 0.088 0.296 0.075 0.412 0.701 0.877 0.655 0.769 0.455 0.380 0.545

Sim Time 3 5 2 6 15 8 2 3 3 4 2

F14: =INT(C14+(D14-C14+1)*E14) (copied down) C27: =F14+F15+F17+F18+F20+F21+F23+F24 C28: =F14+F15+F17+F18+F20+F22+F23+F24 C29: =F14+F16+F19+F20+F21+F23+F24 C30: =F14+F16+F19+F20+F22+F23+F24 C32: =MAX(C27:C30)

ancmat03.qxd

11/16/06

3:29 PM

Page C24

C24 · SUPPLEMENT C

FIGURE C-19

INTRODUCTION TO SIMULATION

Project planning simulation results

B 34 35 36 37 38 39 40 41 42 43 44 45 46 535 536 C Data Table Replication Length 1 2 3 4 5 6 7 8 9 10 499 500 D

C35: =C32

E

F

G

H

I

J

40 42 44 38 39 42 43 42 42 43 39 38 42

Summary Statistics Average 40.906 StdDev 3.24 Minimum 32 Maximum 50 Deadline (weeks) Prob(Meet Deadline) 41 0.46

G36: =AVERAGE(C$37:C$536) G37: =STDEV(C$37:C$536) G38: =MIN(C$37:C$536) G39: =MAX(C$37:C$536) G41: 41 G42: =PERCENTRANK(C37:C536,G41)

The average completion time of the project is 40.9 weeks, which appears promising regarding our deadline. However, the standard deviation is 3.24 weeks, and the total time in the 500 replications ranged from 32 to 50 weeks. The probability of meeting the deadline can be computed directly using Excel's PERCENTRANK function, as shown in cell G41. The

PERCENTRANK function returns the percentage of items that fall below a given value. Unfortunately, the probability that we will meet the deadline is only 0.46, so it may be necessary to somehow speed up some of the activities and/or reduce the uncertainty in the time of some activities in order to increase this probability to an acceptable level. overall portfolio gain (or loss), in both dollar and percentage terms. (b) Run the simulation for 500 replications. What is the average return (dollar and percentage) JB can expect over the next year, and what is the 95 percent confidence interval? JB is concerned about the possibility of losing money. What dollar amount does JB stand to lose with probability .05 if the portfolio is allocated as done here and the investments behave according to the probability distributions selected?

· Problem 2

Since graduating from college, JB has been saving money toward a down payment on a house. Currently, JB has $20,000 and wants to invest the money over the next year. Desiring some growth in the investment but also concerned about the risk, JB has selected four investments and has tentatively planned to invest $5000 in each. Figure C-20 shows information about the investments. JB knows that there is always uncertainty in the investing world, so has estimated some parameters for probability distributions. JB believes the money market and bond investments follow the continuous uniform distribution, with minimums and maximums as shown in the figure, under the Parameter1 and Parameter2 columns. Similarly, the growthand-income and aggressive growth funds are assumed to follow a normal distribution, where Parameter1 corresponds to the mean and Parameter2 the standard deviation. (a) Build a simulation model for a one-year investment period. The primary outputs of the model should be the

A 1 2 3 4 5 6 7 8 B C

· Before You Begin

For this problem, simulate the return on different investments. Figure C-20 shows the distribution to be used for each investment option as well as the mean investment return value and the investment return standard deviation. Simulate one year's activity and calculate the average return that JB can expect over the next year.

D

Portfolio Allocation Model

Investment Alternatives

Investment Money Market Fund Bond Fund Growth & Income Fund Aggressive Growth Fund Distribution Parameter1 Parameter2 Uniform 1.5% 3.0% Uniform -4.0% 10.0% Normal 7.0% 12.0% Normal 11.0% 18.0%

FIGURE C-20

Investment information for the portfolio problem

ancmat03.qxd

11/16/06

3:29 PM

Page C25

SOLVED PROBLEMS · C25 Key Formulas C5 (D5 C5)*RAND() NORMINV(RAND(),C7,D7) B12*(1 C12) SUM(D12:D15) D16 B16 B18/B16

A 10 11 12 13 14 15 16 17 18 19 Investment Money Market Fund Bond Fund Growth & Income Fund Aggressive Growth Fund Totals Gain (loss) on Investment Portfolio Return B Invested $5,000 $5,000 $5,000 $5,000 $20,000 $2,435 12.18%

C12: C14: D12: D16: B18: B19:

(copied to C13) (copied to C15) (copied to D13:D15)

FIGURE C-21

Simulation logic for portfolio problem

C % Return 1.54% -1.87% 21.12% 27.92%

D EndingBal $5,077 $4,907 $6,056 $6,396 $22,435

Simulation Logic for Portfolio

· Solution

(a) The logic for this model is relatively straightforward. We need to create a section that lists the amount invested in each fund, simulate the return from each investment, and calculate the ending value of each investment and the portfolio. From this, we can calculate the overall portfolio gain (loss) in dollar and percentage terms. Figure C-21 shows the simulation logic for one replication. The key formulas are provided. Cells C12:C15 simulate the returns of each investment. The money market and bond investments follow the uniform distribution, and the growth-and-income and aggressive growth investments follow the normal distribution. (b) As with Solved Problem 1, the Data Table command is used to run 500 replications. Here, however, we have two outputs of the model to track. We create another column of the Data Table for this and include this column in the selection before going to the Data/Table dialog box. After running the 500 replications, we freeze the results and compute summary statistics, confidence intervals, and percentiles. See Figure C-22. From the summary statistics, we see the average return of the portfolio is $1204 or 6.02 percent (again, your values will differ somewhat from these due to the nature of simulation). Computing the 95 percent confidence interval, we are 95 percent confident the true average return is somewhere in the interval from $1107 to $1301. We could improve the precision of the estimate of the average return by running additional replications. Certainly, knowing the average return is helpful, but it tends to oversimplify the investment decision. JB is concerned about losing money, since this is money earmarked for a down payment on a house. A useful way to quantify the risk of losing a certain amount of money is through using percentiles of the returns distribution. The value

($610) (i.e., a loss of $610) in cell F35 means that the portfolio is predicted to lose $610 or more approximately 5 percent of the time. This is termed the 5th percentile of the returns distribution. Literally, it is the 5th percentile of the cumulative distribution of portfolio returns. Using percentiles of the returns distribution is a very common practice in risk analysis. Similarly, the 25th percentile is $503. This means that the portfolio should have a return $503 about 25 percent of the time, or conversely, a return $503 about 75 percent of the time. The 50th percentile is really the median, with a 50 percent chance of falling above/ below this value. Going to the extreme upper end, the 95th percentile is similar to the 5th percentile. We should have a one-year return $2960 with .95 probability; stated another way, there is only a .05 probability of having a return $2960. Do not confuse the percentiles with the confidence interval. The percentiles provide us with probabilities of a given dollar (or percentage) return for a single one-year period. The confidence interval provides information about the precision of the estimate of the average (mean) portfolio return that would be obtained if we invested in this way over a very long period of time. Both concepts are important, but they are not the same! Finally, Figure C-23 shows a histogram of the dollar portfolio return. Notice that even though we had two investments whose returns were uniformly distributed, the overall return of the portfolio looks very much like a normal distribution. Actually, this should not be a surprise, as the central limit theorem suggests that this distribution should be normal. The histogram adds a graphical perspective to the results and complements the summary statistics and the percentile results. The cumulative distribution function is also plotted and uses the scale on the right side of the graph. Additional percentiles can be approximated using the cumulative distribution function graph.

ancmat03.qxd

11/16/06

3:29 PM

Page C26

C26 · SUPPLEMENT C

FIGURE C-22

INTRODUCTION TO SIMULATION

Simulation results for portfolio problem

A B C D 22 Data Table for Simulation Replications Replication Gain (Loss) Return 23 $2,435 12.18% 24 1 25 ($791) -3.96% 26 2 $712 3.56% 27 3 $1,637 8.18% B24: =B18 C24: 28 4 $520 2.60% =B19 29 5 $5,091 25.45% 30 6 $1,361 6.80% 31 7 ($291) -1.45% 32 8 $77 0.38% 33 9 $227 1.13% 34 10 $613 3.07% 35 11 $3,194 15.97% 36 12 $836 4.18% 37 13 $847 4.23% 38 14 $1,602 8.01% 39 15 $1,585 7.93% 40 16 $596 2.98% 41 ($102) -0.51% 17 523 499 $273 1.36% 524 500 $859 4.30% E F G

Summary Statistics Gain (Loss) Average $1,204 StdDev $1,109 Minimum ($2,480) Maximum $5,091

Return 6.02% 5.55% -12.40% 25.45%

95% Confidence Interval on Average Lower CL $1,107 5.53% Upper CL $1,301 6.51% Percentiles 5% 25% 50% 75% 95%

($610) $503 $1,197 $1,957 $2,960

-3.05% 2.52% 5.99% 9.78% 14.80%

F35: =PERCENTILE(B$25:B$524,$E35) (copied to F35:G39 to compute percentiles of the results distributions)

FIGURE C-23

Histogram of Portfolio Gain (Loss) (n = 500 replications) 80 70 60 Frequency 50 40 30 20 10 0

$2 73 $9 61 $1 ,6 50 $2 ,3 38 $3 ,0 26 $3 ,7 14 -$ 2, 48 0 -$ 1, 79 2 -$ 1, 10 3 -$ 41 $4 M or e 5 ,4 03

Histogram of portfolio dollar returns

100.00% 90.00% 80.00% 70.00% 60.00% 50.00% 40.00% 30.00% 20.00% 10.00% .00%

Upper Endpoint of Category Frequency Cumulative %

· Problem 3

HiLo Bank is concerned about customer waiting times in its drive-through facility. There is a single line for the live teller (a separate line forms for the ATM, which is not a concern at this point). Customers arrive to the live teller at a rate of about 10 per hour, or one every 0.10 hour (one every 6 minutes). The teller is able to serve about 15 customers per hour, so the average service time is 0.0667 hour (4 minutes). Obviously if customers truly arrived exactly every 6 minutes, and each customer took 4 minutes

ancmat03.qxd

11/16/06

3:29 PM

Page C27

SOLVED PROBLEMS · C27 to serve, no line would ever form. There is variability in both the arrival and service patterns, however. The bank has heard of their competitors using simulation to help analyze their service and processing facilities, so it would like to use simulation here. Assume that both the time between customer arrivals and the service times are exponentially distributed, with the means of 0.10 hour and 0.0667 hour, respectively. Develop a simulation model that allows one to analyze customer waiting time and the number of customers waiting. Consider 500 customers that arrive over time to the drive-through service facility. For a single set of 500 customers, what are the average waiting time and the average number waiting in line? What are the maximum waiting time and maximum number waiting? into the average time between arrivals and the average service time, respectively. Results for over 500 customers include the average number in the queue, the maximum number in the queue, the average waiting time, the maximum waiting time, and the percent of time the teller is idle. Perhaps surprisingly, the maximum queue length was 16 cars at some point in the process of serving 500 customers, even though the average number in the queue was a reasonable 1.48 cars. The average waiting time for a customer was 0.15 hour, or about 9.2 minutes, which is probably a bit on the high side. The maximum waiting time for a customer was 1.33 hours, or 80 minutes (assuming the customer would have stuck around, which is highly unlikely!). Despite these somewhat disappointing performance measures, the teller was idle 36 percent of the time. The average performance doesn't seem too bad, but for the worst-case customer, it is are clearly unacceptable, and a system operating like this would likely generate customer complaints. These performance measures are somewhat surprising, since a customer arrives, on average, every 6 minutes, and we can serve a customer, again on average, every 4 minutes. The key, of course, is the "on average." It is the variability in the randomness of customer arrivals and service times that causes these disappointing performance measures. The bank should probably consider ways to either speed up service or encourage existing drive-through customers to complete business another way, such as inside the bank, at the ATM, or over the Internet. The actual simulation model (for the first 10 customers) is shown in Figure C-25 (based on Evans and Olson, 1998). Before presenting the formulas for this model, we'll describe the columns from left to right. Each row of the logic corresponds to one customer. Each customer goes through a standard process: a customer arrives to the system, waits in the line if the teller is busy, starts service either upon arrival or when the teller finishes with the previous customer, finishes business at the bank, and departs. The columns of the model take each customer through this process, with some additional columns to keep track of system performance. Column D generates a random

· Before You Begin

In this problem, simulate customer waiting times at a drivethrough banking facility. Identify the customer arrival rate and the teller's service rate. The mean values are needed to simulate the waiting line system. Calculate the average waiting time per customer and the average number of customers waiting in line.

· Solution

This problem is designed to illustrate a different type of simulation model. This is really a discrete-event problem, because the state of the system changes over time, having customer arrivals (number in the "system" increases by 1) and customer departures (number in the system decreases by 1). This is an example of a queuing, or waiting line, situation, which is obviously very common in the real world. Simulation is a powerful and flexible tool able to help analyze these situations and improve decision making. Although an Excel spreadsheet approach will be provided here, discrete-event simulations are best created in a product specifically designed for that purpose, as noted earlier in the chapter. Figure C-24 shows the input and output sections of this model. The arrival and service rates are entered and converted

A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

HiLo Bank Drive-Through Input Parameters Mean arrival rate (per hour) Mean service rate (per hour)

B

FIGURE C-24

Input and output sections of HiLo model

10 15

Mean time between arrivals (hr) 0.1 Mean service time (hr) 0.0667 Simulation Results (500 customers) Average Num in Queue 1.4772 Max Num in Queue 16 Average Waiting Time (hr) 0.1534 Max Waiting Time (hr) 1.3287 % idle time 36%

ancmat03.qxd

11/16/06

3:29 PM

Page C28

C28 · SUPPLEMENT C

FIGURE C-25

INTRODUCTION TO SIMULATION

Simulation model for HiLo teller problem (based on Evans and Olson, 1998)

C D 1 TimeBetw 2 Customer Arrivals 3 1 0.1089 4 2 0.1565 5 3 0.0341 6 4 0.0772 7 5 0.0304 8 6 0.0097 9 7 0.1707 10 8 0.1996 11 9 0.0567 12 10 0.0429 13 E

Arrival Time 0.1089 0.2654 0.2995 0.3767 0.4071 0.4168 0.5875 0.7871 0.8438 0.8867

F

No. In Queue 0 0 0 1 2 3 1 0 0 0

G

Start Time 0.1089 0.2654 0.2995 0.4191 0.5356 0.5679 0.5903 0.7871 0.8438 0.8867

H

I

J

Wait Time 0.0000 0.0000 0.0000 0.0424 0.1285 0.1512 0.0028 0.0000 0.0000 0.0000

K

L

M

N

O

P

Q

Service Completion Time Time 0.00 0.0832 0.1921 0.0321 0.2975 0.1196 0.4191 0.1165 0.5356 0.0323 0.5679 0.0223 0.5903 0.0022 0.5924 0.0035 0.7906 0.0395 0.8833 0.0069 0.8936

Idle Cum. No. Avg. No. Cum. Wait Avg. Wait Cum. Idle Avg. % Time in Queue in Queue Time Time Time Idle Time 0.1089 0.0734 0.0020 0.0000 0.0000 0.0000 0.0000 0.1946 0.0532 0.0034 0.0000 0.0000 0.0000 0.0772 0.1380 0.1670 0.3377 0.3377 0.3377 0.3377 0.0000 0.0000 0.0000 0.2049 0.3390 0.4006 0.5748 0.4290 0.4002 0.3808 0.0000 0.0000 0.0000 0.0424 0.1709 0.3221 0.3249 0.3249 0.3249 0.3249 0.0000 0.0000 0.0000 0.0106 0.0342 0.0537 0.0464 0.0406 0.0361 0.0325 0.1089 0.1823 0.1843 0.1843 0.1843 0.1843 0.1843 0.3789 0.4321 0.4355 57% 61% 44% 34% 32% 31% 31% 48% 49% 49%

interarrival time, or the time of the customer's arrival after the previous customer's arrival. This approach is very common in modeling queuing systems. Column E computes the customer's actual arrival time (in hours since the drive-through opened). Column F determines the number of people waiting in the queue after the customer arrives. If the server is idle when the customer arrives, the queue remains empty (since service can start immediately). On the other hand, if the server is busy, the customer joins the queue and the number in the queue statistic increases by 1. Column G computes the time the customer actually starts service, again depending on whether she had to wait for the customer ahead of her to finish or whether she could start service immediately upon arrival. Column H gener-

ates the random service time from the service time distribution. Column I computes the time that service gets completed. Column J computes the time the customer waited as the difference between the starting time and the arrival time. Column K computes the time, if any, that the server was idle since the last customer (which happens only if the queue is empty). Columns L­Q are used to keep track of the performance measures of the system. Key formulas are provided. These formulas correspond to customer #2 and are all copied down in the model through customer #500. Some formulas for customer #1 are slightly different since the first customer is assumed to arrive to an empty system.

Key Formulas (all copied down) Time Between Arrivals D5: B$7*LN(RAND()) Arrival Time E5: E4 D5 Number in Queue F5: C5 MATCH(E5,$I$3:I4,1) Start Time G5: MAX(E5,I4) Service Time H5: B$8*LN(RAND()) Completion Time I5: G5 H5 Wait Time J5: G5 E5 Idle Time K5: G5 I4 Cumulative Number in Queue L5: F5*(E5 E4) L4 Average Number in Queue M5: L5/E5 Cumulative Wait Time N5: N4 J5 Average Wait Time O5: N5/C5 Cumulative Idle Time P5: P4 K5 Average % Idle Time Q5: P5/I5 Clearly, there is a lot of "bookkeeping" in modeling a system such as this. Although it is possible to model these systems in spreadsheets, they are not the best choice for highly dynamic systems. Actually, the system here is quite simple compared to the complexity present in the real world. Here there is only one server; most real-world systems have multiple servers, and the customer (or the product in a manufacturing simulation) goes through several processes with different servers or machines. Discrete-event simulation products such as those mentioned in this chapter are ideally suited for these complex systems, because they have all of the bookkeeping functions built in already, and the modeler can focus on defining how the process works.

ancmat03.qxd

11/16/06

3:29 PM

Page C29

PROBLEMS · C29

Discussion Questions

1. Give an example of a situation you faced that involved uncertainty. How did you deal with the uncertainty? 2. What decisions do operations managers face that involve uncertainty? How could simulation be used to assess the effects of that uncertainty? 3. How might a decision maker use the information presented in a histogram of simulation results, such as that shown in Figure C-15?

Problems

1. (a) Generate 50 random numbers from a normal distribution with mean 10 and standard deviation 2. Compute summary statistics (average, standard deviation, minimum, maximum) and a 95 percent confidence interval for the mean. Also generate a histogram. (b) Repeat (a), except with 500 random numbers. (c) Compare the results from (a) and (b). How does the sample size affect the results? Are you surprised at any of the findings? 2. Repeat (a)­(c) of Problem 1, except with a continuous uniform distribution between 3 and 8. 3. Repeat (a)­(c) of Problem 1, except with an exponential distribution with a mean of 20. 4. SaveMart is a super-center discount store. For the upcoming year, the various departments have submitted their sales growth forecasts. The store manager needs to produce an overall sales forecast for the entire store. Data for the departments are given. Growth Rates Minimum Maximum 3% 5% 0% 7% 8% 4% 12% 9% (a) Build a spreadsheet model to simulate the total phone time required in a given night. Run 500 replications of the model and compute summary statistics. (b) How many operators should be scheduled if Chris needs to be 90 percent sure there will be enough operators to handle all the calls? 6. A 100-seat airplane is used on a particular route on FlyFast Airlines. Seats sell for $400, and this cost is refundable. Therefore, revenue is received only from passengers actually boarding the airplane. At this price, there is sufficient demand to sell more than 100 seats, because some passengers do not show up for the flight. Therefore, FlyFast typically overbooks the flight. On average, 15 percent of the ticketed passengers do not show up to fly, but this varies uniformly from 5 percent to 25 percent for individual flights. In the event that more ticketed passengers show up for the flight than there are seats available, FlyFast must pay another airline to fly the passenger and in some cases must provide a voucher to the passenger for meals or lodging. Assume the cost per passenger "bumped" is $600. FlyFast wants to determine the number of tickets to sell in order to maximize net revenue (total revenue minus the bumping costs). (a) Develop a spreadsheet model to simulate one occurrence of this flight. (b) Assume 100 tickets are sold. Run a simulation (with 250 replications) to determine the average net revenue. (c) Vary the number of tickets sold, and determine the number to sell that will maximize the average net revenue. 7. Jamie is saving money in hopes of purchasing a house in five years. Jamie has no money saved now, but each month Jamie can invest $220 toward the down payment. A $15,000 down payment is desired. Two investment options are available. One, fund A, is relatively low risk with a monthly average rate of return of 0.5 percent, and a monthly standard deviation of 0.58 percent, normally distributed. The other fund, B, has a monthly average return of 0.83 percent with a monthly standard deviation of 4.33 percent, again normally distributed. (a) Create a model to simulate sixty months of investment activity for each fund. (b) Run 250 replications of this model, and compute summary statistics. Also compute the probability that Jamie will reach the goal of $15,000 with each investment. (c) Which investment should be chosen if Jamie wants to maximize the average balance at the end of sixty months? Which should be chosen if the probability of meeting the goal is to be maximized? Explain these findings.

Department Grocery Hardware & Automotive Toys Apparel

Current Sales $4,257,000 $876,000 $2,354,000 1,278,000

(a) Build a spreadsheet model to simulate SaveMart's total sales for the upcoming year. (b) Run 500 replications of the model and calculate summary statistics. What is the expected total revenue? (c) What are the 25th, 50th, and 75th percentiles of revenue? Interpret these values in meaningful language to present to SaveMart's management. 5. Chris is responsible for staffing a 911 operation. During any given night, the number of calls received is uniformly distributed between 92 and 145. The average time each call requires of a 911 operator is normally distributed with a mean of 6.2 minutes and a standard deviation of 1.2 minutes. This time includes time on the phone as well as certain administrative duties associated with each call. Due to the stress level of the position, operators must take a number of breaks during their shifts, so a full-time shift consists of no more than six hours taking calls.

ancmat03.qxd

11/16/06

3:29 PM

Page C30

C30 · SUPPLEMENT C

INTRODUCTION TO SIMULATION

CASE: Car Replacement Decision

RG faces a car decision dilemma. Currently, RG's 10-year-old car is in need of major repairs, at a cost of $2000. RG is trying to decide whether to fix this car, purchase a used car (at a cost of $8000), or purchase a new car ($16,000). If RG purchases a used or new car, the old car will be donated to charity. RG plans to keep any car until it is virtually unusable. Uncertainty is present in the lives of the cars. If RG's current car is repaired, RG estimates that the useful remaining life is uniformly distributed between 0.5 and 3 years. With a used car, the estimated life is uniformly distributed between 2 and 8 years, and with a new car, between 8 and 15 years. To compare the purchase or, in the case of the current car, repair costs, RG has decided to focus on the first year of ownership. However, to do this, the purchase/repair costs must be fairly allocated. Since a new car will last longer than a repaired old car, the useful life must be part of the cost calculation. RG has decided that a 4 percent annual interest rate is reasonable, applied over the useful life of the car. For example, if RG fixes the current car, and it ends up lasting 1.2 years, the cost allocated to the first year is calculated using Excel's PMT function, as PMT(0.04, 1.2, 2000), resulting in $1740. That is, the cost--out of the $2000 total repair cost allocated to the first year and adjusted for the 4 percent interest rate--is $1740. Other costs include repairs outside of normal maintenance, which should be the same for all three choices. RG expects extra repair costs for the year on the currently owned car to be uniformly distributed between $200 and $1000. For a used car, they would vary uniformly between $0 and $800, and for a new car, there would be no repair costs. RG wants to use simulation to help determine the best alternative. Whereas the average cost of ownership is important, so is the uncertainty of that cost as well. Develop and use a simulation model to address this issue, and provide a recommendation to RG.

On-Line Resource

1. Spreadsheets for Figures C-2, C-5, C-6, C-7, C-12, C-13, C-14, C-15, C-16; Example C.1; and Solved Problems 1, 2, and 3 are available on the Cd.

2. The Retirement Income Calculator provided by T. Rowe Price Investment Services uses Monte-Carlo Simulation to estimate the probability of achieving your retirement financial goals. The tool can be found at http://www3. troweprice.com/ric/RIC/. 3. Financial Engines (http://www.financialengines.com) offers financial planning assistance based upon simulations of future economic scenarios. 4. Read the latest Simulation Software survey from OR/MS Today, which can be found at http://www.lionhrtpub.com/orms/ surveys/Simulation/Simulation.html. Get information from at least two of the firms listed there regarding their simulation products. Compare their capabilities and the types of problems they are designed to address. Find a site that discusses some of their case studies, and prepare a summary. Find a site offering a trial version and/or tutorial of their product. Install the product and run an example model.

Selected Bibliography

Evans, J., and D. Olson. Introduction to Simulation and Risk Analysis. Upper Saddle River, N.J.: Prentice Hall, 1998. Ragsdale, Cliff T. Spreadsheet Modeling & Decision Analysis, Fourth Edition. Stamford, Conn.: Thomson, 2004. Winston, Wayne L., and S. Christian Albright. Practical Management Science (with CD-ROM Update), Second Edition. Duxbury, 2003.

Information

ancmat03.qxd

30 pages

Report File (DMCA)

Our content is added by our users. We aim to remove reported files within 1 working day. Please use this link to notify us:

Report this file as copyright or inappropriate

869996


You might also be interested in

BETA
2010-2012 UTSA Undergraduate Catalog
B
untitled
Microsoft Word - TR-SAS-054-04.doc