You are on page 1of 38

CHAPTER 18

Simulation
SUPPLEMENT OUTLINE

SUPPLEMENT TO

Introduction and Simulation Process, 2 Random Number and Random Variate Generation, 4 Some Simulation Models, 13 Some Simulation Software and Applications, 21 Key Terms, 31

Solved Problems, 31 Discussion and Review Questions,32 Internet Exercises, 33 Problems, 33 Mini-case: Valencia Kidney Waiting Line, 38 Mini-case: Dofasco, 38

LEARNING OBJECTIVES After completing this supplement, you should be able to:
LO1

Explain what is meant by the

term simulation, list some of the reasons for simulations popularity as a tool for decision making, and describe the steps in simulation. LO2 Explain how random numbers and random variates are generated in simulation. LO3 Model and solve typical problems that require the use of simulationmanually and using Excel. LO4 Describe some simulation software, be able to use Arena for simple problems, and describe some applications of simulation.

PART EIGHT Waiting-Line Analysis

LO1

INTRODUCTiON AND SiMULATiON PROCEss

simulation A descriptive technique that enables a decision maker to evaluate the behaviour of a model under various conditions.

Simulation, as used in decision making, is a descriptive technique in which a model of

a process is developed and then experiments are conducted on the model to evaluate its behaviour under various conditions. Simulation is not an optimizing technique. It does not produce a solution per se. Instead, simulation enables decision makers to test their solutions on a model that reasonably duplicates a real process. Simulation models enable decision makers to experiment with decision alternatives using what-if approach. Simulation has applications across a broad spectrum of operations management problems. In some instances, the simulations models are quite modest, while others are rather complex. Their usefulness in all cases depends on the degree to which decision makers are able to successfully answer their what-if questions. A list of operations management topics would reveal that many have simulation applications. For instance, simulation is often helpful in process design, facility layout, capacity planning, line balancing, testing alternative inventory policies, scheduling, waiting lines, and project management. Generally, analysts use the simulation approach because the assumptions required by an optimizing technique are not reasonably satisfied in a given situation. Waiting line problems are a good example. Although waiting line problems are pervasive, the rather restrictive assumptions of arrival and service distributions in many cases are simply not met. Very often, analysts will then turn to simulation as a reasonable alternative for obtaining descriptive information about the system in question. Other reasons for the popularity of simulation include: 1. Many situations are too complex to permit development of a mathematical solution. 2. Simulation models are fairly simple to use and understand. 3. Simulation enables the decision maker to conduct experiments on a model that will help in understanding the process behaviour while avoiding the risks of conducting tests in real life. 4. Extensive computer software packages make it relatively easy to model fairly sophisticated processes.

Simulation Process
Certain basic steps are used for all simulation models: 1. Define the manufacturing or service process and set simulation objective(s). 2. Develop the simulation model. 3. Test the model to be sure that it is working as intended (called model verification) and reflects the system being studied (called model validation). 4. Develop one or more experiments (conditions under which the models behaviour will be examined). 5. Run the simulation and evaluate the results. 6. Repeat steps 4 and 5 until you are satisfied with the results. The first step in simulation is to clearly define the manufacturing or service process to be modelled. A clear statement of the simulation objective(s) can provide not only guidance for model development but also the basis for evaluation of the success or failure of a simulation study. In general, the goal is to determine how a process will behave under certain conditions. The more specific a manager is about what he or she is looking for, the better the chances that the simulation model will be designed to accomplish that. Toward that end, the manager must decide on the scope and level of detail of the simulation. This determines the necessary degree of complexity of the model and the information requirements of the study. As part of system definition, the type of simulation should be determined: terminating (or transient) and non-terminating (or steady state). A terminating state or event might

SUPPLEMENT TO CHAPTER 18 Simulation

be when a particular number of jobs have been completed. A terminating point in time might be the closing of shop at the end of a business day. In a terminating simulation, performance during successive time intervals during the simulation is measured. A nonterminating simulation means that the simulation could theoretically go on indefinitely with no statistical change in behaviour of the system. The modeller must determine a suitable length of time to run the model. An example of a non-terminating simulation is a model of a manufacturing operation in which work always continues exactly as it left off at the end of previous shift. The next step is simulation model development. Typically, this involves deciding on the structure of the model and using a computer to carry out the simulation. Data gathering is a significant part of model development. The amount and type of data needed are a direct function of the scope and level of detail of the simulation. The data are needed for both model development and validation. Once a model is developed, it must be verified, i.e., debugged to ensure that it works correctly. This is much easier to do if a model is built in stages and with minimal detail. To help debug the model, most simulation software provide a trace capability in the form of audit trail, screen messages, or graphic animation. A walk-through of the model input is always advisable. Model validations main purpose is to determine if the model adequately depicts real process performance. An analyst usually accomplishes this by comparing the results of simulation runs with known performance of the process under the same circumstances. If such a comparison cannot be made because, for example, real-life data are difficult or impossible to obtain, an alternative is to employ a test of reasonableness (called face validation), in which the judgments and opinions of individuals familiar with the process or similar processes are relied on for confirmation that the results are plausible and acceptable. Still another aspect of validation is careful consideration of the assumptions of the model and the values of parameters used in testing the model. Again, the judgments and opinions of those familiar with the real-life process and those who must use the results are essential. Finally, note that model development and model verification/ validation go hand in hand: model deficiencies uncovered during verification/validation prompt model revisions, which lead to the need for further verification/validation efforts and perhaps further revisions. The fourth step in simulation is developing experiments (conditions under which the models behaviour will be examined). Experiments are the essence of a simulation; they help answer the what-if questions posed in simulation studies. For example, should we use one server or two servers, or use order quantity of 5 units, 6 or 7. The fifth step is to run the simulation model. If a simulation model is deterministic and all parameters are known and constant, only a single run will be needed for each what-if question. But if the model is probabilistic, with parameters subject to random variability, multiple runs will be needed to obtain confidence in the results. In this chapter supplement, probabilistic simulation (also called the Monte Carlo method or simulation) is the focal point of the discussion, and comments are limited to it. Probabilistic simulation is essentially a form of random sampling, with each run representing one observation (for non-terminating simulation) and a sequence of observations (for terminating simulation). Consequently, statistical theory can be used to determine appropriate sample sizes. In effect, the larger the degree of variability inherent in simulation results, the greater the number of simulation runs needed to achieve a reasonable level of confidence in the results as true indicators of model behaviour. Another variance reduction technique is to use common random numbers, i.e., use the same stream of random numbers in various experiments. For example, in queueing, if we are comparing two different configurations of tellers in a bank, we would want the (random) time of arrival of the nth customer to be generated using the same random number for both configurations. In probabilistic simulation, each random component of the process under study has a probability distribution. Random samples taken from probability distributions are analogous to observations made on the process itself. Random sampling is accomplished by the use of random numbers and random variates.

Monte Carlo method or simulation Probabilistic simulation technique, used when a process has one or more random component(s).

PART EIGHT Waiting-Line Analysis

LO2

RANDOM NUMBER AND RANDOM VARiATE GENERATiON

random number An integer, usually 2 digits, chosen randomly from a range of integers such as [00, 99] random variate A random value for a distribution such as Poisson or Normal

Random number generation is the process of choosing a number in a given range where every number in the range has equal probability of being picked. For example, a two-digit random number in the range [00 to 99] is any of the 100 possible 2-digit numbers (note that 0 to 9 are considered as 00 to 09, i.e., two digits), and each has an equal chance of being picked. In this chapter supplement, we will distinguish between random numbers that are integers, usually 2 digits, from a range such as [00, 99], and random values (called random variates) from distributions such as Normal and Poisson. The reason for this distinction is that we will use both random numbers and variates below, with different roles. The objective is to generate random variates, and we will use random numbers to do so when we are simulating manually. Computer software use random numbers too but these are hidden from the user. For example, in Excels Data Analysis module, there is the Random Number Generation program that directly generates random variates from common probability distributions such as Poisson and Normal. Note that Excel calls random variates random numbers. We will first consider how we can obtain random numbers (e.g., two-digit integers).

Obtaining Random Numbers


The random numbers used in probabilistic simulation come from one of two sources: (a) a table of random numbers like Table 18S-1, or (b) computer software such as Excel. In either case, the method of generation is usually a recursive equation such as Zi= (a Zi-1 ) mod m, i.e., the next random number Zi is the remainder after dividing a times the current random number Zi-1 by m. This process results in random numbers between 0 and m 1. The derived random number can then be transformed to obtain a random number in any desired range, e.g., [00 to 99]. The problem with the recursive equation method is that the resulting sequence of numbers repeats itself after a certain number of numbers (called a cycle) are generated. Therefore, the parameters a and m should be chosen carefully. In the ProModel simulation software, a=630,360,016 and m = 231 1, which results in a cycle of m. Because the resulting numbers are not truly random, they are sometimes referred to as pseudo random numbers. Fortunately, we dont have to generate random numbers and will only use them. In manual simulation we will use Table 18S-1 (or Table 18S-2 for Normal variates), and in computer simulation we will bypass random numbers and use Excel to generate random variates directly. If in Excel it is necessary to first generate random numbers, this can be done by using the function @rand, which will generate a real number greater or equal to 0 and less than 1. To generate a random (integer) number between 00 and 99, we can use the formula = round(rand()*100-.5,0). The numbers in Table 18S-1 have two digits for convenience, but the digits can be used singly, in pairs, or in whatever grouping a given problem calls for. Each digit ranges from 0 to 9.
Table 18S-1 1
1 2 3 4 5 6 7 8 9 10 11 12 18 25 73 12 54 96 23 31 45 01 41 22

2
20 19 57 48 92 40 55 96 49 78 62 07

3
84 05 80 37 27 65 93 81 70 32 57 38

4
29 64 35 09 61 75 83 65 10 17 31 72

5
91 26 04 17 58 16 02 60 13 24 90 69

6
73 41 52 63 39 49 19 93 79 54 18 66

7
64 20 81 94 25 03 67 75 32 52 24 14

8
33 09 48 08 16 82 89 64 17 44 15 85

9
15 88 57 28 10 38 80 26 98 28 43 36

10
67 40 61 78 46 33 44 90 63 50 85 71

11
54 73 29 51 87 51 99 18 30 27 31 41

12
07 34 35 23 17 20 72 59 05 68 97 58

Random numbers

SUPPLEMENT TO CHAPTER 18 Simulation

For any size grouping of digits (e.g., two-digit numbers), every possible outcome (e.g., 34, 89, 00) has the same probability of appearing. This implies that there are no discernible patterns in sequences of numbers to enable one to predict numbers further in the sequence. Therefore, the numbers can be read across rows and up or down columns. When using the table, it is important to avoid always starting in the same spot. For our purposes, the starting point will be specified so that everyone obtains the same results.

Generating Random Variates


To generate most random variates, the inverse transformation method is used: 1. Construct the Cumulative probability distribution F (from which a random variate is desired). 2. Generate a random real number u greater or equal to 0 and less than 1. 3. Determine the value x such that F(x)=u. Below, we will illustrate the inverse transformation method for some common probability distributions. In each case we will first perform the random variate generation manually, and then use Excel.
Generating Discrete Random Variates

The manager of a machine shop is concerned about machine breakdowns. He has made a decision to simulate breakdowns for a 10-day period. Historical data on breakdowns over the last 100 days are given in the following table:
Number of Breakdowns 0............ 1............ 2............ 3............ 4............ 5............ Frequency 10 30 25 20 10 5 100 0 1 2 3 4 5

Example S-1

Simulate breakdowns for a 10-day period. Read two-digit random numbers from Table18S-1, starting at the top of column 1 and reading down. a. Develop cumulative probabilities for breakdowns: i. Convert frequencies into relative frequencies by dividing each frequency by the sum of the frequencies. Thus, 10 becomes 10/100=.10, 30 becomes 30/100=.30, and so on. ii. Develop cumulative relative frequencies (i.e., cumulative probabilities) by successive summing. The results are shown in the following table:
Number of Breakdowns 0 1 2 3 4 5 Frequency 10 30 25 20 10 5 100 Relative Frequency .10 .30 .25 .20 .10 .05 1.00 Cumulative Probability .10 .40 .65 .85 .95 1.00

Solution

PART EIGHT Waiting-Line Analysis

b. Assign random-number intervals to correspond to the cumulative probabilities for breakdowns. (Note: Use two-digit numbers because the cumulative probabilities are given to two decimal places.) You want a 10-percent probability of obtaining the event 0 breakdowns in our simulation. Therefore, you must designate 10 percent of the possible random numbers as corresponding to that event. There are 100 two-digit numbers, so we can assign the 10 numbers 01 to 10 to that event. Similarly, assign the numbers 11 to 40 to one breakdown, 41 to 65 to two breakdowns, 66 to 85 to three breakdowns, 86 to 95 to 4 breakdowns and 96 to 00 to five breakdowns. Note that 00 is assigned as if it was 100, not 0. This makes the interval maximums correlate well to the cumulative Probabilities.
Number of Breakdowns 0 1 2 3 4 5 Frequency 10 30 25 20 10 5 100 Relative Frequency .10 .30 .25 .20 .10 .05 1.00 Cumulative Probability .10 .40 .65 .85 .95 1.00 Corresponding Random Numbers 01 to 10 11 to 40 41 to 65 66 to 85 86 to 95 96 to 00

c. Obtain the random numbers from Table 18S-1, column 1, as specified in the problem: 18 25 73 12 54 96 23 31 45 01 d. Convert the random numbers into numbers of breakdowns on each day, starting from day 1: 18 falls in the interval 11 to 40 and corresponds, therefore, to one breakdown on day 1. 25 falls in the interval 11 to 40 and corresponds to one breakdown on day 2. 73 corresponds to three breakdowns on day 3. 12 corresponds to one breakdown on day 4. 54 corresponds to two breakdowns on day 5. 96 corresponds to ve breakdowns on day 6. 23 corresponds to one breakdown on day 7. 31 corresponds to one breakdown on day 8. 45 corresponds to two breakdowns on day 9. 01 corresponds to no breakdowns on day 10. The following table summarizes these results:
Day 1 2 3 4 5 6 7 8 9 10 Random Number 18 25 73 12 54 96 23 31 45 01 Simulated Number of Breakdowns 1 1 3 1 2 5 1 1 2 0 17

SUPPLEMENT TO CHAPTER 18 Simulation

The mean number of breakdowns for this 10-day simulation is 17/10=1.7 breakdowns per day. Compare this to the expected number of breakdowns based on the historical data: 0(.10)+1(.30)+2(.25)+3(.20)+4(.10)+5(.05)=2.05 per day. The two (1.7 and 2.05) are close but because of random variability, not equal. As the length of simulation increases, however, the sample mean should approach the population mean.
Using Excel to Generate Discrete Random Variates While the inverse transformtion method

can be used to generate discrete random variates in Excel using rand() and VLookup functions, there is a more direct way. Excels Data Analysis module contains the Random Number Generation program that can directly generate Discrete random variates, as well as some other variates presented below. The Data Analysis module should be in the top right-hand corner of the Data folder (see the screenshot below). If it is not, you can add it in Excel 2010 as follows:, click File, then click Options, next click Add-ins, then click Analysis Toolpak on the top, next click Go in the bottom, next tick the Analysis Toolpak, and finally click OK.

To use the Random Number Generation program in Excel, first we need to enter the data (the numbers of breakdowns and the probability of each value) in the worksheet. Then we click on Data Analysis; in the small window that opens we find and click on Random Number Generation, and finally click OK. If we want 10 Discrete random variates from the breakdown distribution (in cells A4 to B9), arranged in column D starting with cell D1, we fill the Random Number Generation window as follows:

PART EIGHT Waiting-Line Analysis

Finally, clicking OK will result in the following:

The problem with using Random Number Generation program is that it does not recalculate the numbers automatically when the recalculate key F9 is pushed. The recalculation is useful when we want to quickly replicate the simulation. Also, it is useful when Data Tables (explained later) are used to rerun the simulation for various values of an input variable. Therefore, we need to briefly look at the generation of a Discrete random variate using rand() and Vlookup. First we need to enter the values and the probabilities, and compute the cumulative probabilities:

In the above spreadsheet, the formula in cell C4 is = B4, the formula in cell C5 is = B5+C4, and the formula in cell C6 is = B6+C5, etc. Now, we will add the Minimum of Interval in column D as follows: In cell D4 we enter 0, in cell D5 we enter = C4, and copy it down. In effect, we are just shifting the cumul. Prob. values one row down:

SUPPLEMENT TO CHAPTER 18 Simulation

Now, we just copy column A to column E:

Suppose we wish to generate 10 random values from the breakdown distribution and put them in cells G1 to G10. All we have to do is to enter = VLOOKUP(RAND(),D$4:E$9,2) in cell G1 and copy it down. What this formula does is that first rand() will generate a real number greater or equal to 0 and less than 1, then VLookup will take the random number to the range D4 to E9, and will find the Interval where the random number fits (in the left column of the range) and will look up the corresponding value in the right column of the range; 2 in the VLOOKUP formula means that it should look up the second column in the given range:

Generating Poisson Random Variates Generation of a Poisson random variate requires

the mean of the distribution. Given the mean, we can obtain the cumulative probabilities for the Poisson distribution from Appendix B, Table C. Then, the inverse transformation method can be used as in the Discrete case above. However, we should obtain three-digit random numbers from Table18S-1 because the Poisson cumulative probabilities are given in three digits. ExampleS-2 illustrates this. The average number of lost-time accidents at a large plant has been determined from historical records to be two per day. Moreover, it has been determined that this accident rate can be well approximated by a Poisson distribution. Simulate five days of accident experience for the plant. Read random numbers from columns 1 and 2 of Table 18S-1. First obtain the cumulative Poisson probability distribution from Appendix B, Table C for a mean of 2.0, and determine the intervals:
x 0............ 1............ 2............ 3............ 4............ 5............ 6............ 7............ 8............ Cumulative Probability .135 .406 .677 .857 .947 .983 .995 .999 1.000 Random Number Intervals 001 to 135 136 to 406 407 to 677 678 to 857 858 to 947 948 to 983 984 to 995 996 to 999 000

Example S-2

Solution

10

PART EIGHT Waiting-Line Analysis

Next obtain three-digit random numbers from Table 18S-1. Reading from column 1 and 2 as instructed, you find 182, 251, 735, 124, and 549. Finally, convert the above random numbers into number of lost-time accidents using the established set of intervals above. Because 182 falls in the second interval, it corresponds to one accident on day 1. The second random number (251) falls in the same interval, indicating one accident on day 2. The number 735 falls between 678 and 857, which corresponds to three accidents on day 3; 124 corresponds to 0 accidents on day 4; and 549 corresponds to two accidents on day 5.
Using Excel to Generate Poisson Random Variates In the Random Number Generation win-

dow, choose Poisson as the Distribution and enter the mean (2) for Lambda. For example, the following will generate 5 Poisson random variates with mean=2 in cells A1 to A5:

Generating Normal Random Variates There are a number of ways to generate a Normal random variate of a given mean and standard deviation, but perhaps the simplest is to use Table 18S-2, a table of standard Normal random variates, i.e., a Normal distribution with mean 0 and standard deviation 1.00. Like all such tables, the numbers are arranged randomly, so that when they are read in any sequence they exhibit randomness. Numbers obtained from Table 18S-2 can be converted to the desired variates by multiplying them by the standard deviation and adding this amount to the mean. That is:

Normal Simulated value = Mean + Standard random number Standard deviation

(18S-1)

In effect, the standard Normal random variate is a z value, which indicates how far a particular value is above or below the distribution mean.
Table 18S-2 1
1 2 3 4 5 6 7 8 9 10 1.46 1.05 0.15 0.81 0.74 0.39 0.45 2.40 0.59 0.06

2
0.09 0.56 0.02 1.87 0.44 0.35 0.23 0.38 0.70 0.83

3
0.59 0.67 0.41 0.51 1.53 0.37 0.26 0.15 0.04 1.60

4
0.19 0.16 0.09 0.33 1.76 0.52 0.31 1.04 0.12 0.28

5
0.52 1.39 0.61 0.32 0.01 1.14 0.19 0.76 1.60 0.28

6
1.82 1.21 0.18 1.19 0.47 0.27 0.03 1.12 0.34 0.15

7
0.53 0.45 0.63 2.18 0.07 1.78 0.92 0.37 0.05 0.73

8
1.12 0.62 1.20 2.17 0.22 0.43 0.38 0.71 0.26 0.13

9
1.36 0.95 0.27 1.10 0.59 1.15 0.04 1.11 0.41 0.75

10
0.44 0.27 0.50 0.70 1.03 0.31 0.16 0.25 0.80 1.49

Standard Normal random variates

SUPPLEMENT TO CHAPTER 18 Simulation

11

The time required to perform a certain task can be described by a Normal distribution that has a mean of 30 minutes and a standard deviation of 4 minutes. Simulate times for three jobs using the first three values in column 1 of Table 18S-2. The first three values are: 1.46, 1.05, and 0.15. The simulated values are: For 1.46: For 1.05: For 0.15: 30+1.46(4)=35.84 minutes. 301.05(4)=25.80 minutes. 30+0.15(4)=30.60 minutes.

Example S-3

Solution

Using Excel to Generate Normal Random Variates In the Random Number Generation

window, choose Normal as the Distribution and enter its mean and standard deviation. For example, the following will generate 3 Normal random variates with mean=30 and standard deviation=4 in cells A1 to A3:

Alternatively, we can use the formula = NORMINV(rand(),mean,stddev). For example, to generate a random value from the above Normal distribution in a cell, we enter=NORMINV(rand(),30,4) in that cell.
Generating Continuous Uniform Random Variates The Continuous Uniform distribution U[a, b] has equally probable values anywhere between a and b, a<b.

Simulated value=a+(ba)(random real number u greater or equal to 0 and less than 1)

(18S-2)

We can convert the random numbers of Table 18S-1 to u by simply placing a decimal point to the left of the number. For example, 77 becomes 0.77. Example S-4 illustrates the generation of Continuous Uniform variates.

Job times vary uniformly between 10 and 15 minutes. Use Table 18S-1 to simulate job times for four jobs. Read numbers from column 9, going down.

Example S-4

12

PART EIGHT Waiting-Line Analysis

Solution

a=10 minutes, b=15 minutes, ba=5 minutes a. Obtain the random numbers: 15, 88, 57, and 28. b. Convert to Continuous Uniform variates:
Random Number 15 . . . . . . . . . . . . 88 . . . . . . . . . . . . 57 . . . . . . . . . . . . 28 . . . . . . . . . . . . Computation 10+5(.15) 10+5(.88) 10+5(.57) 10+5(.28) = = = = Simulated Value (minutes) 10.75 14.40 12.85 11.40

Using Excel to Generate Continuous Uniform Variates In the Random Number Generation

program, choose Uniform as the Distribution and enter the extreme values a and b after Between and and, respectively. For example, the following will generate four Continuous Uniform random variates between 10 and 15 in cells A1 to A4:

Alternatively, we can use the formula = a+rand()*(b-a). For example, to generate a random value from the above Continuous Uniform distribution in a cell, we enter=10+rand()*5 in that cell.
Generating Exponential Random Variates An Exponential distribution is portrayed in

Figure 18S-1. The probability is fairly high that the random variable will assume a value close to zero, and it decreases as the value of the random variable increases. The probability that the Exponential random variable will take on a value greater than some specified value T, given mean of 1/, is: P(t>T)=eT
FIGURE 18S-1
f(t)

(18S-3)

An Exponential distribution

P(t > T) = u 0 T t

SUPPLEMENT TO CHAPTER 18 Simulation

13

To simulate an Exponential value manually, we obtain a real random number u between 0 and 1, set this equal to the probability P(t>T ), and solve Formula 18S-3 for T. The result is a random variate from the Exponential distribution with mean of 1/. This concept is illustrated in Figure 18S-1. We can obtain an expression for T by taking the natural logarithm of both sides of the equation. Thus, with P(t>T )=u, we have ln(u)=ln(eT) The natural logarithm of a power of e is equal to the power itself, so ln(u)= T Then T = 1 ln(u ) (18S-4)

As for the Continuous Uniform case above, a random number can be obtained from Table 18S-1 and converted to u simply by placing a decimal point to the left of it. This is demonstrated in the following example.
Example S-5

Times between breakdowns of a piece of equipment can be described by an Exponential distribution with mean of five hours. Simulate the time between two pairs of breakdowns. Read two-digit random numbers from column 3 of Table 18S-1. The mean, 1/, is 5 hours. The random numbers are 84 and 05. Using formula 18S-4, the simulated times are: For 84: T=5[ln(.84)]=5[0.1744]=0.872 hours. For 05: T=5[ln(.05)]=5[2.9957]=14.979 hours.

Solution

Note that the smaller the value of the random number, the larger the simulated value of T.
Using Excel to Generate Exponential Random Variates In Excel use the formula

=5*ln(rand()).
LO3

SOME SiMULATiON MODELs

Real problems involve many components or steps, with process flows that may be complicated. In some cases, it is helpful to construct a process flowchart (similar to a process flow diagram). If the model is complicated, one needs to use a specialized simulation software such as Arena. Otherwise, Excel can be used. Below, we illustrate some simple models of operations decision making using Excel.

An Inventory Control Model


While we solved most inventory control problems analytically in Chapter 12, we made some simplifying assumptions. For example, we calculated EOQ and ROP separately. If a more exact solution is required, simulation should be used. Simulation is also used to illustrate the behaviour of the system over time so that the decision maker can gain insight/ confidence in it. The manager of a truck dealership wants to acquire some insight into how a proposed policy for reordering trucks from the manufacturer might result in shortage. Under the new policy, two trucks are to be ordered whenever the number of trucks on hand at the
Example S-6

14

PART EIGHT Waiting-Line Analysis

end of the day plus number of trucks on order is two or fewer. Assume that purchase lead time is only two full days. According to the dealers records, the probability distribution for daily demand (i.e., its sales) is:
Demand, x 0......... 1......... 2......... P(x) .50 .40 .10

Solution

a. Draw a flowchart that describes a 10-day simulation. Assume a beginning inventory of four trucks and that all shortage will be back-ordered. b. Manually simulate the inventory system for 10 days. Use two-digit random numbers from Table 18S-1, column 11, reading down. Estimate the probability of shortage. c. Enter the model for this problem in Excel and run the simulation for 1,000 days. Estimate the probability of shortage. a. Generate
demand, x Update inventory I=I+2 Yes

No Is arrival day = Day?

Update inventory I=Ix

< 2? I + on order _ I = Amount of End-of-Day inventory Start I=4 Day = 0 Update day Day = Day + 1 No No Day = 10? Yes Stop

Yes

Reorder 2

b. Specify random number intervals for demand:


Cumulative x 0 1 2 P(x) .50 .40 .10 P(x) .50 .90 1.00 Ranges 0150 5190 9100

2. Obtain random numbers, convert to demand, update inventory accordingly, and reorder when necessary:
Day 1........ 2........ 3........ 4........ 5........ 6........ 7........ 8........ 9........ 10 . . . . . . . Beginning Inventory 4 3 2 2 3 (Day 2 order arrived) 2 1 1 (Day 5 order arrived) 1 3 (Day 7 order arrived) Random Number 54 73 29 51 87 51 99 18 30 27 Demand, x 1 1 0 1 1 1 2 0 0 0 3 2 (reorder 2; arrival day=5) 2+2 1+2 2 (reorder 2; arrival day=8) 1+2 1+2 (reorder 2; arrival day=10) 1+2 1+2 3 Ending Inventory+ on order

SUPPLEMENT TO CHAPTER 18 Simulation

15

The only negative Ending Inventory is in Day 7. Therefore, estimate for probability of shortage=1/10=.10. However, this is probably not very accurate. If we simulate another 10 days, we may get a different answer, e.g., no shortage. Therefore, we must simulate longer (e.g., 1,000 days) and possibly run many replications (e.g., 10) and average their results. c. The top part of the worksheet is shown below. The reorder decision components have been explicitly defined here. Therefore, there are separate columns for Quantity On Order, Order?, and Day of Arrival. On the other hand, we have used the Random Number Generator program of Excel to generate the demand in Column D (so we did not need to generate random numbers first). The formula for Units Receid in cell B17 is = IF(A17=H14,$C$9,0), i.e., if the day number equals the Day of Arrival two full days before, then a shipment is received. In this case, H14 will be evaluated as 0 by Excel. The formula for Beginning Stock Level in cell C17 is = B17+E16, i.e., it equals Units Receid plus Ending Stock the previous day. The formula for Ending Stock in cell E17 is = C17 D17, i.e., the beginning Stock Level minus Demand. The formula for Quantity On Order in cell F17 is = IF(G16=Yes,F16+C$9 B17,F16 B17), i.e., if Order? on previous day is Yes, then Quantity On Order=Quantity On Order the previous day+order quantity any amount received today; else Quantity On Order=Quantity On Order the previous day any amount received today. The formula for Order? in cell G17 is = IF(E17+F17>$C$10, No, Yes), i.e., if Ending Stock plus Quantity On Order are larger than Reorder Point, then Order?=No, else Order?=Yes. The formula for Day of Arrival in cell H17 is = IF(G17=Yes,A17+C$11+1, ), i.e., if Order? is Yes then Day of Arrival=todays Day No.+lead time+1, else it is blank. The +1 is because the lead time is 2 full days and we are ordering in the end of the current day and will receive it the morning of day of arrival. Finally, the formula in cell E12 is = COUNTIF(E17:E1016, <0) which counts the negative Ending Stocks for 1,000 days. In this case, there are 47 days when shortage occurred. Therefore, our estimate for probability of shortage is 47/1,000=4.7%. Note that even a run of 1,000 days is not long enough if an estimate within1% is required. This is because when the simulation is replicated, the number of short days varies between 30 and 60 days. To increase accuracy, we should increase the run length and the number of replications.

16

PART EIGHT Waiting-Line Analysis

A Waiting Line Model


While we presented many queueing models in Chapter 18, we made some simplifying assumptions. For example, for most models we assumed that the distributions of interarrival and service times are Exponential, and that only steady state results are desired. Also, some performance measures are difficult to obtain analytically, e.g., maximum wait time and maximum number of customers in the queue. In these cases, simulation should be used. Simulation will also illustrate the behaviour of the system over time so that the decision maker can gain insight/confidence in it.
Example S-7

The time between mechanics requests for tools in a large plant is Normally distributed with a mean of 10 minutes and a standard deviation of 1 minute. The time to fill requests is also Normal with a mean of 9 minutes per request and a standard deviation of 1 minute. Mechanics waiting time represents a cost of $2 per minute, and servers time represents a cost of $1 per minute. 1. Manually simulate nine mechanic requests and their service times, and determine the mechanics waiting time, assuming one server. Would it be economical to add another server? Explain. Use Table 18S-2, column 8 for requests and column 9 for service. 2. Enter the model for this problem in Excel and simulate 1,000 arrivals. Does your answer to part a change? 1. i. Obtain standard Normal random variates from Table 18S-2 and convert to times [see columns (a) and (b) in the following table for requests for tool (i.e., arrivals) and columns (f) and (g) for service]. For example, the first Time Between Arrivals= 10-1.12(1)=8.88 and the first Service Time=9+1.36(1)=10.36.
CUSTOMER ARRIVALS (a) Random Number 1.12 .62 1.20 2.17 .22 .43 .38 .71 .26 (b) Time Between Arrivals 8.88 9.38 8.80 7.83 10.22 10.43 10.38 9.29 9.74 (c) Arrival Time 8.88 18.26 27.06 34.89 45.11 55.54 65.92 75.21 84.95 (d) (e) (f) Random Number 1.36 .95 .27 1.10 .59 1.15 .04 1.11 .41 (ec) Service Wait Start Time Time .00 .98 .23 1.67 1.55 .00 .00 .00 .00 4.43 8.88 19.24 27.29 36.56 46.66 55.54 65.92 75.21 84.95 SERVICE (g) Service Time 10.36 8.05 9.27 10.10 8.41 10.15 8.96 7.89 9.41 82.60 (h) (e+g) Service End Time 19.24 27.29 36.56 46.66 55.07 65.69 74.88 83.10 94.36

Solution

ii. Determine Arrival Times [column (c)] by adding to previous Arrival Time to the Time Between Arrivals in column (b). iii. Use Arrival Times for Service Start Times unless service is still in progress onaprevious request. In that case, determine how long the arrival must wait (ec). Column (h) values are the sum of Service Start Time and Service Time [column(g)]. iv. Total waiting time is 4.43 minutes (see the table).

SUPPLEMENT TO CHAPTER 18 Simulation

17

v. The total cost is: Waiting cost (including service time):  (4.43+82.60) minutes at $2 per minute=$174.06 Server cost:  94.36 minutes at $1 per minutes= 94.36 $268.42

vi. Usually, a second simulation with two servers would be needed (e.g., for 18 arrivals). However, in this case it is apparent that a second server would increase server cost by about $94 but could not eliminate more than approximately $8.86 of waiting cost. Hence, the second server would not be justified. 2. The top part of the worksheet is shown below. The column headings are identical to the manual simulation table above, except for the Mechanic No. column (to keep track of numbers of arrivals). Also, we have used the Random Number Generator program of Excel for Time Between Arrivals and Service Time, so we did not need to generate random numbers first. The formula for Arrival Time in cell C9 is = C8+B9, i.e., the previous Arrival Time plus the current Time Between Arrivals. The formula for Wait Time in cell D9 is = MAX(G8,C9)-C9, i.e., the maximum of Service End Time of the previous mechanic and the Arrival Time of current mechanic minus the Arrival Time of current mechanic. The formula for Service Start Time in cell E9 is = C9+D9, i.e., the Arrival time plus the Wait Time. The formula for Service End Time in cell G9 is = E9+F9, i.e., Service Start Time plus Service Time. The formula in cell D3 is = SUM(D9:D1008), i.e., sum of the Wait Time of 1,000 mechanics, and the formula in cell F3 is = SUM(F9:F1008), i.e., the sum of Service Time of 1,000 mechanics. The answer to the question of the need for the second server does not change because the average wait time is almost the same as in part 1: 401/1000=.401 minutes per mechanic4.43/9=.492 minutes per mechanic from part 1. It is interesting to compare the maximum wait times of part 1 and 2. In part 1, the maximum wait time is 1.67 minutes, whereas in part 2 the maximum wait time is approximately 5 minutes (not shown). This is expected because a longer simulation run allows for more extreme cases to occur.

18

PART EIGHT Waiting-Line Analysis

Optimization in Simulation
Simulation is usually used to compare two or more configurations of the system, based on some measure of performance. Choosing the best configuration is sometimes called optimization. We have to run the simulation for each configuration, and choose the configuration with the best measure. However, to make the right decision, the simulation results should be accurate enough. For this reason, we need to have long runs, and therefore need to use the computer. Excel has a program called Data Table that will run the simulation for different values of a decision variable. In the following example, we will use Excel and Data Table to determine the optimal order quantity of the single period inventory control model of Chapter 12.

Example S-8

Suppose you are responsible for ordering soft drinks for an event such as a sports game.1 One canister can serve 100 drinks. Demand is Exponentially distributed with mean of five canisters. Suppose that unmet demand costs $40 per canister (or $.40 per drink) for lost profit, and returning excess soft drink to the bottler costs $10 per canister (or $.10 per drink). Use Excel to determine the order quantity that will minimize the expected total cost. Run 2,000 replications of the event for each order quantity between 5 and 10. In the following worksheet, the formula for Demand in cell B13 is = -C$6*LN(RAND()), i.e., negative of the mean of the Exponential distribution times the natural logarithm of a (real) random number greater or equal to 0 and less than 1. The formula for Shortage Cost in cell C13 is = IF(B13>C$9,B13 C$9,0)*C$3, i.e., if Demand is larger than Order Quantity, shortage=Demand Order Quantity, else shortage=0, and multiply the shortage by the unit shortage cost. The formula for Excess Cost in cell D13 is=IF(C$9>B13,C$9 B13,0)*C$4, i.e., if Order Quantity is larger than Demand, excess=Order Quantity Demand, else excess=0, and multiply the excess by the unit excess cost. The formula for Total Cost in cell E13 is = C13+D13, i.e., the sum of the Shortage and Excess Costs. The formula for Avg. Total Cost in cell F2 is = AVERAGE(E13:E2012), i.e., the average of Total Cost of 2,000 games. The values in cells F3 to F8 are the Avg. Total Cost for Order Quantities 5 to 10, respectively. These are determined by Excels Data Table program. Data Table was used as follows: select cells E2 to F8, then click on Data folder, next click What-if Analysis, then click Data Table; in the small window enter $C$9 (the location of the Order Quantity) in front of Column input cell:, and click OK:

Solution

It can be seen from cells F2 to F8 that Order Quantity=8 canisters has the lowest Avg. Total Cost. However, even 2,000 replications may not be enough for an accurate decision. If the whole experiment is repeated (press the F9 key to recalculate), in some instances other Order Quantities, in particular 7 and 9, will have a lower Avg. Total Cost than 8. To get a more accurate result, one should increase the number of games.

A. F. Seila et al, Applied Simulation Modeling, Australia: Thomson Learning, 2003, p. 49.

SUPPLEMENT TO CHAPTER 18 Simulation

19

A Maintenance Model
While we solved some maintenance problems analytically in the Supplement to Chapter15, we made some simplifying assumptions. For example, we calculated the preventive maintenance interval approximately, and we assumed that individual units will not fail again before group replacement time. If a more exact solution is required, simulation should be used. Simulation is also used to illustrate the behaviour of the system over time so that the decision maker can gain insight/confidence in it.
Example S-9

A milling machine has two different bearings that fail.2 The distribution of the life of each bearing is identical and is shown below. When a bearing fails, the machine stops, a mechanic is called, and he installs a new bearing. Each bearing costs $32. It takes an average of 27 minutes to change the bearing. Downtime for the machine costs $10 per minute. The engineering staff has proposed a new policy: replace both bearings whenever one fails. This will take the mechanic an average of 37 minutes. Simulate 1,000 failure/replacement cycles for each bearing for the current and for both bearings for the proposed replacement policy and determine the lower-cost policy.

Based on J. Banks et al, Discrete-event System Simulation, 5th ed, 2010, New Jersey: Prentice-Hall, pp.6567.

20

PART EIGHT Waiting-Line Analysis


Bearing Life (Hours) 1,000 1,100 1,200 1,300 1,400 1,500 1,600 1,700 1,800 Prob .08 .15 .26 .19 .13 .09 .06 .03 .01

Solution

The individual replacement policy is modelled in Excel as shown in the worksheet below. Each cycle is the length of life of a new bearing. These are created using the Discrete Distribution of the Random Number Generation program of Excel. The formula in cell H13 is = C4*2000, i.e., the cost of replacing 2,000 bearings. The formula in cell H14 is = C5*2,000, i.e., the cost of downtime of 2,000 individual failures The formula in cell H15 is =H13 + H14. The formula in cell H16 is = SUM(B13:B1012), i.e., the total lives of Bearing 1s, and the formula in cell H17 is = SUM(C13:C1012), i.e., the total lives of Bearing 2s. The formula in cell H18 is =H16+H17. Finally, the formula in cell H19 is = H15/H18*1000, i.e., the total cost divided by total life hours times 1,000, or expected cost per 1,000 hours of work.

The group replacement policy is modelled in Excel as shown in the worksheet below. It is very similar to the individual replacement policy worksheet above, but for each cycle the minimum length of life of the two bearings (1 and 2) is computed (called First Failure) and used for both bearings, because both are replaced at that time. Therefore, the formula in cell D13 is =MIN(B13:C13). The formula in cell I14 is = C5*1000, i.e., the total downtime cost of joint replacement (note only 1,000 downtimes). The formulas in cells

SUPPLEMENT TO CHAPTER 18 Simulation

21

I16 and I17 are=SUM(D13:D1012), i.e., the total lives of the first failures. The other formulas are the same as the individual policy.

Because the cost per 1,000 hours $184.02<$234.69, group replacement will be cheaper. We ran each policy many times to make sure that the above results are not flukes.

SOME SiMULATiON SOFTwARE AND AppLiCATiONs


LO4

There are many simulation software available such as SIMSCRIPT III, GPSS/H, Extend, Witness, Micro Saint Sharp, SimProcess, ProModel, Arena, and @RISK. These have some features in common. They provide model development, random variate generation, collection and tabulation of simulation results, time keeping, and animation. For a list of simulation software, see http://lionhrtpub.com/orms/surveys/Simulation/Simulation1.html. The following briefly describes some applications of some simulation software. SIMPROCESS. SIMPROCESS is a CACI Software Company product. We will briefly describe the use of SIMPROCESS to model the operations of an emergency department. The objectives were to determine the right level of staffing (administrative clerks, technicians, nurses, doctors) and other resources (emergency rooms, wheelchairs, etc.), and work flow design, given the expected number and mix of patients arriving. Patients are triaged: Level 1 patients are serious cases, whereas levels 2 and 3 can wait. Registration is performed before or after treatment depending on the state of the patient. Modelling involves defining patients as entities that are generated in the entrance door and ambulance according to historical data. Then, they go through a series of operations (as modelled below). The time spent in an operation is generally a random variable that is entered in the Delay Properties of the operation (by clicking on the icon). Also,

22

PART EIGHT Waiting-Line Analysis

the resources used in each operation are entered (these affect the times). The analyst needs to specify the level of resources to use and run the simulation for a certain length of time to see its effects on entities (e.g., percentage of time spent in an operation) and resources (e.g., percentage of time idle, costs). Important data can also be represented graphically (called dashboard monitors). The simulation is run several times for each different level of resources and the best level of resources is chosen. For more details, see http://www. simprocess.net/solutions/er_model.html.
Emergency room
Level 2 or 3 Triage Sign In Level 1 Entrance Door Transfer to room Not Level-1 Level 1 Release and Admission Not Level 1 Registration

Ambulance

Always Level 1 Level-1

Treatment

Source: http://www.simprocess.net/solutions/models_html/EmergencyRoom.

Extend. Extend is a product of Imagine That! Software company. Modelling in Extend is similar to SIMPROCESS. Just click on the library menu and select a type of operation (Generator, Queue Activity, Plotter, etc.) to include in the model. Then, connect it to another operation by left-clicking in the middle of the right edge of the icon and dragging the line to the input activity. For further information, see http://www.extendsim. com/downloads/manuals/support_manuals_dl.html. An Extend model for bank staffing is shown below.

Source: Bank Line Tutorial in Extend Demo Software, downloaded from http://www.extendsim.com/prods_ demo.html. Screen capture courtesy of Imagine That Inc. of San Jose, CA.

SUPPLEMENT TO CHAPTER 18 Simulation


STA.1 LOADING STATION

23

STA. 2

STA. 11

STA. 12

STA. 16

STA. 17

STA.39 OFF-LINE WASH

REPAIR BAY #1

STA. 16

STA.36 UNLOADING STATION

REPAIR BAY #3

REPAIR BAY #2

STA. 19

STA. 20 STA. 37 STA. 36 STA. 31 STA. 26 STA. 25 STA. 24 STA. 22 STA. 21

FIGURE 18S-2

WITNESS. WITNESS is a product of the Lanner Group, based in the UK (http://www. lanner.com). The following describes an application of WITNESS.Visteon is a subsidiary of Ford Motor Company. In the mid-1990s, the Sterling Heights plant (in Michigan) was the only source of Fords axles. With the introduction of new cars, trucks, and SUVs, Ford needed to substantially increase production of the front axle line (see Figure 18S-2). The front-axle line used a closed-loop conveyor. At Station 1 (the loading station), parts and kits are loaded onto pallets. Pallets progress through subsequent stations to reach the unloading station, where the fully assembled axles are unloaded from the pallets. The finished axle assemblies leave the system while the empty pallets are moved to the loading station to receive new parts. Visteon formed a project team that used WITNESS to model and simulate the production of the front axle line. Most stations used a machine with varying operation times (a range of 8 seconds to 33 seconds per axle). In addition, there were machine failures (a range of 11 minutes to 11,000 minutes for mean time between failures) and repair (a range of 1 minute to 5 minutes for mean time to repair). Also, a small percentage of axles had to be torn down for repair at various stages during the process. Although there were more pallets circulating in the front axle line than stations, too few pallets resulted in stations starving, but too many pallets resulted in blocking. So, the team wanted to identify the optimal number of pallets. Also, the team wanted to know the bottleneck station and if a given station-time reduction would help increase the line capacity. As a bottleneck was relieved and capacity of the line increased, another station would become the bottleneck. After each improvement, simulation was run again to investigate the best way to increase the capacity next. At the start of the study, capacity of the line was 57 axles per hour. By the end of project 1.5 years later, capacity was increased to 75 axles per hour (a 30 percent increase). Simulation was also used to show that the line capacity could not easily be increased much more. Therefore, Ford decided to set up another front axle line to meet the excess demand. ProModel. ProModel is a product of the ProModel corporation of Utah (http://www. promodel.com). The following is a simple application of ProModel. Gasification converts coal into carbon monoxide and hydrogen, which can then be converted into chemicals or put in other uses. Eastman Chemicals used ProModel to determine how many gasifiers to use in a gasification plant in order to produce the required output.3 It is also possible to use a gasifier as standby. For example, when 4 gasifiers are used, if the reliability
3

Visteons front axle line


Source: G. Pfeil, etal., Visteons Sterling Plant Uses Simulation-based Decision Support in Training, Operations, and Planning, Interfaces 30(1), JanuaryFebruary 2000, pp.115133.

http://www.promodel.com/solutions/manufacturing/Eastman-Chemical-web.pdf.

24

PART EIGHT Waiting-Line Analysis

percentage uptime) of each gasifier is 90 percent, then the output will be approximately ( 92 percent of planned output, whereas if there is an additional standby gasifier, the output will be about 98 percent of planned output.

Source: http://www.promodel.com/solutions/manufacturing/Eastman-Chemical-web.pdf.

Arena. Arena is a product of Rockwell Automation (http://www.arenasimulation.com). An application is as follows. Dofasco used Arena to model its primary steelmaking process. The steps of this production line are (1) iron making and de-sulfurizing, (2)steelmaking, (3) ladle metallurgy facility, (4) vacuum degassing (if pure steel is needed), and (5) continuous casting (see the following figure, from left to right). Dofasco managers wanted to know if relatively small expenditures in some critical parts of the process would result in productivity improvements, or whether major expenditures would be needed. After construction of the model in Arena, which used 87 different steps/activities, the model was validated against previous years actual performance (e.g., the quantity of slabs made, number of ladles fed into the continuous caster, etc.). The results showed that only simultaneously increasing the uptimes of major steps of the process would increase productivity. In other words, there were no unique bottlenecks. Later, the model was also used to evaluate the major changes to the process.
oxygen

Off Gas

oxygen

Source: http://www.informs-sim.org/wsc06papers/255.pdf

SUPPLEMENT TO CHAPTER 18 Simulation

25

How to Use Arena


Download a free trial version of Arena from http://www.arenasimulation.com (you have to register first). Unzip the file and install it. Arena is relatively simple to use. After starting Arena, the initial screen looks like the following:

The trial version has access to only Basic Processes (see the left pane). We will model a single server queueing model, Example 2 of Chapter 18, in Arena. The time between arrivals and service times both have Exponential distributions with mean of 4 and 3 minutes, respectively. We wish to determine the average and maximum wait time (in queue), and average and maximum numbers in the queue. Click on Create icon in the left pane and drag it to the main window:

26

PART EIGHT Waiting-Line Analysis

This is the arrival process. In the bottom pane, we need to change the Value into 4 and the Units into minutes. Note that the distribution of arrivals is already Expo, i.e., Exponential:

Now, with Create 1 selected we click on Process icon in the left pane and drag it to the main pane and drop it to the right of Create 1:

SUPPLEMENT TO CHAPTER 18 Simulation

27

In the bottom pane for Process 2, we need to change the Action into Seize Delay Release (or else no queue will be developed), Delay Type into Expression (because Exponential is not one of the distributions we can choose directly here), Units into Minutes, and Expression into EXPO(3) (we need to type in the 3):

Now double-click on Process 2 because we need to assign a resource to it (to seize the arrivals):

In the Process window above, click Add. . .:

28

PART EIGHT Waiting-Line Analysis

In the Resources window above, click OK:

Resource 1 will appear in the middle (see above). Now, click OK again (the Process window will close). Then, in the main window, with Process 2 selected click on Dispose icon in the left pane, and drag it and drop it to the right of Process 2. Then click on Run (on the top) and next click Setup:

SUPPLEMENT TO CHAPTER 18 Simulation

29

Run Setup window will open:

In the Run Setup window, change the Replication Length from Infinite to 24 (because we want to run it for 24 hours), and change the Base Time Units to Minutes. Then, click OK (Run Setup window will close). In the main window, click Go under the Run (in the top). Simulation starts. A simple animation shows that a paper (representing a customer) comes out of Create 1, possibly queues above Process 2, and exits in Dispose 2. The numbers under Create and Dispose are the number of entities generated and disposed, respectively. The number under Process is the number of customers in the queue and the paper icons above it represent the queue:

30

PART EIGHT Waiting-Line Analysis

At the end of simulation, the following window will open. Click Yes:

The Report will Preview. Move to the second page:

These are the results of simulation: Average wait time is 7.5226, maximum wait time is 34.022 minutes, average number in the queue is 1.8841, and maximum number in the queue is 9. Finally, we need to end the simulation run (click on End under Run at the top) and exit Arena (FileExit) after saving the model. @RISK. @RISK is an Excel add-in software that performs risk analysis using Monte Carlo (probabilistic) simulation. @RISK is a product of Palisade Corporation (http://www. palisade.com/risk). BC Hydro used it to evaluate the uncertainties surrounding its energy conservation program.4 BC Hydro plans to meet most of its future electricity needs through demand management, i.e., energy conservation by its customers. Around 60 projects were considered, such as compact fluorescent light promotions, subsidies for energy-efficient appliances, variable-speed motor promotions for home furnaces, and promotional activity

http://www.palisade.com/cases/bchydro.asp.

SUPPLEMENT TO CHAPTER 18 Simulation

31

aimed at motivating customers to use less energy. The uncertainties were analyzed on a case-by-case basis, and a probability distribution for the aggregate conservation-savings forecast was developed. BC Hydro used estimates from experts in various industries to provide input to the @RISK model. The displays assisted the experts to visualize how their predictions influenced the final outcome of the decision-making process. Also, interrelationships among key uncertainties were explored.
Monte Carlo method, 3 random numbers, 4

random variates, 4 simulation, 2

Key Terms

The number of customers who arrive during each hour at a car repair shop can be described by a Poisson distribution. Assuming that the average number of customers per hour is three during the rst four hours of a day, simulate customer arrivals for the rst four hours. Read three-digit random numbers from Table 18S-1, columns 4 and 5, going down. d. Obtain cumulative probabilities of the Poisson distribution from Appendix B, TableC, for the mean specified (3). Then, determine the random number intervals.
x 0.......... 1.......... 2.......... 3.......... 4.......... 5.......... 6.......... 7.......... 8.......... 9.......... 10 . . . . . . . . . Cumulative Probability .050 .199 .423 .647 .815 .916 .966 .988 .996 .999 1.000 Random Number Intervals 001 to 050 051 to 199 200 to 423 424 to 647 648 to 815 816 to 916 917 to 966 967 to 988 989 to 996 997 to 999 000

Solved Problems Problem 1

Solution

e. Obtain three-digit random numbers 299, 642, 350, and 091. f. Convert the random numbers to simulated values. Note where each number falls in the randomnumber interval list. For instance, 299 falls between 200 and 423. Interpret this to mean that two customers arrive in the first hour. Similarly, 642 is interpreted to mean that three customers arrive in the second hour, 350 implies two customers in the third hour, and 091 implies one customer in the fourth hour. g. To summarize, the number of customers per hour for the four-hour simulation is:
Hour 1.......... 2.......... 3.......... 4.......... Number of Arrivals 2 3 2 1

Jobs arrive at a workstation at xed intervals of one hour. Processing time is approximately Normal and has a mean of 56 minutes per job and a standard deviation of 4 minutes per job. Using the fth row of the table of standard Normal random variates (Table 18S-2), simulate the processing times for four jobs and determine the amount of operator idle time and job waiting time. Assume that the rst job arrives at time=0.

Problem 2

32

PART EIGHT Waiting-Line Analysis

Solution

a. Obtain the random numbers from the table: 0.74, 0.44, 1.53, and 1.76. b. Convert the random numbers to simulated processing times:
Random Number 0.74 . . . . . . . . . . 0.44 . . . . . . . . . 1.53 . . . . . . . . . . 1.76 . . . . . . . . . Computation 56+4(0.74) 56+4(0.44) 56+4(1.53) 56+4(1.76) = = = = Simulated Time 58.96 54.24 62.12 48.96

Note that three of the times are less than the inter-arrival times for the jobs (i.e., 1 hour), meaning that the operator will be idle after those three jobs. One time exceeds the one-hour interval, so the next job must wait, and possibly the job following it if the waiting plus processing time exceeds 60 minutes. c. Calculate waiting and idle times:
Job Number 1 2 3 4 Arrives at 0 60 120 180 Processing Time, t (minutes) 58.96 54.24 62.12 48.96 60t Operator Idle (minutes) 1.04 5.76 8.92* 15.72
*602.1248.96=8.92.

t60 Next Job Waits (minutes) 2.12 2.12

Discussion and Review Questions

1. What is simulation (as used in operations management)? (LO1) 2. What are some of the primary reasons for the widespread use of simulation in practice? (LO1) 3. What are some of the ways managers can use simulation? (LO1) 4. What is the difference between random numbers and random variates? (LO2) 5. How can Excel be used for generating random variates? (LO2) 6. How can random values from each of the following distributions be generated using random number tables? (LO2) a. Discrete b. Normal c. Continuous Uniform d. Poisson e. Exponential 7. Respond to the following comment: I ran the simulation several times, and each run gave me a different result. Therefore, the technique does not seem to be useful. I need one answer! (LO13) 8. Name three popular simulation software programs. (LO4)

SUPPLEMENT TO CHAPTER 18 Simulation

33

1. Visit http://www.promodel.com/solutions/logistics/, watch the video, and briefly summarize how ProModels simulation helped the Salt Lake 2002 Winter Olympics. (LO4) 2. Visit http://www.lanner.com/en/case-studies.cfm, pick a case study, and summarize how WITNESS is being used. (LO4) 3. Visit http://www.palisade.com/cases/ctt.asp?caseNav=byProduct, pick a case study, and summarize how @RISK is being used. (LO4) 4. Google IIE/RA contest problems, pick a simulation contest problem, and determine what topic it is on. Note: This is an annual contest sponsored and managed by Rockwell International (Arena). (LO3) 5. Visit http://arenasimulation.com/Tools_Resources_Video_Library.aspx, click on What is Simulation?, register with Arena, watch the video, and summarize what, why, and when of simulation. (LO1) 6. Visit http://arenasimulation.com/Tools_Resources_Video_Library.aspx, click on Emergency Department Simulation Demo, register with Arena if necessary, watch the video, and summarize how Arena can help with the operations of an emergency department. (LO4) 7. Visit http://arenasimulation.com/Solutions_Solutions.aspx, click on an application area, find a case study, and summarize how Arena is being used. (LO4) 1. The number of jobs received by a small machine shop is to be simulated for an eight-day period. The shop manager has collected the following data for the number of jobs received daily: (LO2)
Number of Jobs 2 or less 3 4 5 6 7 8 9 or more Frequency 0 10 50 80 40 16 4 0 200

Internet Exercises

Problems

Use the third column of Table 18S-1 and read two-digit numbers, going down. Determine the average number of jobs per day for the eight-day simulation period. 2. Jack sells insurance on a part-time basis. His records on the number of policies sold per week over a 50-week period are: (LO2)
Number Sold per Week 0 1 2 3 4 Frequency 8 15 17 7 3 50

Simulate three five-week periods. Use Table 18S-1, column 6 for the first simulation, column 7 for the second, and column 8 for the third. In each case, read two-digit numbers, beginning

34

PART EIGHT Waiting-Line Analysis

at the bottom of the column and going up. For each simulation, determine the percentage of weeks during which two or more policies are sold. 3. After a careful study of requests for a special tool at a large tool crib, an analyst concluded that demand for the tool can be adequately described by Poisson distribution with mean of two requests per hour. Simulate demand for a 12-hour period for this tool crib using Table18S-1. Read three-digit numbers from columns 5 and 6 combined, starting at the top and reading down (e.g., 917, 264, 045). (LO2) 4. The number of lost-time accidents per month at a forestry company can be described using a Poisson distribution that has mean of four accidents. Using the last two columns of Table18S-1 (e.g., 540, 733, 293), simulate the number of accidents for a 12-month period. (LO2) 5. The time a surgeon spends performing a particular surgery can be modelled using a Normal distribution that has mean of 20 minutes and standard deviation of 2 minutes. Using the table of standard Normal random variates (Table 18S-2), simulate the times the surgeon might spend on the next seven surgeries. Use column 4 of the table; start at the bottom of the column and read up. (LO2) 6. The time between job arrivals at a workstation tends to be Normally distributed with a mean of 15 minutes and a standard deviation of 1 minute. Job processing time is also Normally distributed with a mean of 14 minutes and a standard deviation of 2 minutes. (LO3) a. Using Table 18S-2, simulate the arrival and processing of five jobs. Use column 4 of the table for job inter-arrival times and column 3 for processing times. Start each column at row 4 and go down. Find the total time jobs wait for processing. b. The company is considering the use of a new equipment that would result in processing times that is Normal with mean of 13 minutes and standard deviation of 1 minute. Job waiting represents a cost of $3 per minute, and the new equipment would represent an additional cost of $.50 per minute. Would the equipment be cost justified? (Note: Use the same arrival times and the same random numbers for processing times.) 7. Daily usage of sugar in a small bakery can be described by a Continuous Uniform distribution with endpoints of 30kg and 50kg. Simulate daily usage for a 10-day period. Read four-digit numbers from Table 18S-1, columns 5 and 6, going up from the bottom. (LO2) 8. Weekly usage of a specific spare part in a maintenance storeroom can be described by Poisson distribution with mean of 2.8 parts per week. Lead time to replenish the spare part is two weeks (constant). Simulate the total usage of the part during lead time 6 times (dont overlap the lead times), and then determine the frequency of lead time demand (i.e., what percentage of times was the demand equal to 2, 3, 4, etc.?). Read three-digit numbers from Table 18S-1, columns 8 and 9, going down. (LO2 & 3) 9. (Excel exercise.) Repeat Problem 8 for 100 lead-time periods. Hint: To make a frequency distribution, use the Histogram tool in Data Analysis. (LO2 & 3) 10. 10. A machine shop breaks an average of .6 unit of a tool per day. The number of breakages (i.e., demand) can be described by Poisson distribution. The number of days required to obtain replacement is almost constant (3 days). Because ordering is at the end of a day and receiving is at the beginning of another day, the order will arrive 4 days after the order date. Four units are ordered whenever the stock on hand and on order is two or less. Initially we have three units on hand and none on order. All shortage is back-ordered. (LO3) a. Draw a flowchart to describe this process. b. Simulate this problem for a 12-day period. Read three-digit numbers from Table 18S-1, columns 5 and 6, going down (e.g., 917, 264), for tool breakage. What is the probability of shortage? 11. (Excel exercise.) Repeat Problem 10 for 100 days. What is the probability of shortage? (LO3) 12. The time between arrivals of a part to a workstation varies Uniformly between 10 and 20 minutes. Process time is Normal with mean of 15 minutes and standard deviation of 2minutes. (LO3)

SUPPLEMENT TO CHAPTER 18 Simulation

35

a. Simulate waiting times and processing for nine parts. Read three-digit numbers going down columns 9 and 10 of Table 18S-1 for inter-arrivals (e.g., 156, 884, 576). Use column8 of Table 18S-2 for processing time. Calculate total waiting time. b. If management can reduce the range of inter-arrival times to between 13 and 17 minutes, what would the impact be on part waiting times? (Use the same service times and the same random numbers for inter-arrival times from part a.) Round inter-arrival times to two decimal places. 13. At a call centre for a cell phone company, customer service associates are employed to respond to customer calls and complaints.5 During a non-peak period, on average 6 customers call per hour (Poisson), i.e., the inter-arrival times are Exponential with mean of 10 minutes. The length of calls has a triangular distribution with minimum of 2 minutes, maximum of 10minutes, and a most likely value of 5 minutes. Use Arena to model this problem and simulate for 200 hours to answer the following question: How many associates should the company employ if the policy is both of the following: (LO4) a. Average wait time in the phone queue should not be larger than 2 minutes. b. Maximum number of calls waiting should be no more than 5. 14. A product requires that a hole be drilled into a metal block and that a cylindrical shaft be inserted into it.6 The probability distribution of shaft radius is Normal with mean of 1 inch and standard deviation of .001 inch. Similarly, the probability distribution of hole radius is Normal with a mean of 1.003 inches and standard deviation of .001 inch. The clearance between a hole and a shaft is the difference in their radii. The objective is to determine how frequently interference (i.e., negative clearance) will occur. Simulate 1,000 pairs. (LO3) 15. An analyst found that the length of telephone conversations in an office could be described by an Exponential distribution with a mean of four minutes. Reading two-digit random numbers from Table 18S-1, column 6, simulate the length of five calls and calculate the simulated average time. Why is the simulated average different from the mean of four minutes? (LO2) 16. The length of time between calls for service of a certain piece of equipment can be described by an Exponential distribution with a mean of 40 minutes. Service time can be described by a Normal distribution with mean of eight minutes and standard deviation of two minutes. Simulate the queuing system for four breakdowns. For breakdowns, read two-digit numbers from Table 18S-1, column 7; for service times, read numbers from Table 18S-2, column 8. Calculate the total wait time. (LO3) * 17. A simple project has only two activities: A and B. A is an immediate predecessor of B. A has a triangular distribution with minimum a=10 days, mode m=20 days, and maximum b=50 days. B also has a triangular distribution with minimum=15 days, mode=25 days, and maximum=60. Simulate 100 replications of the project in Excel to determine the distribution of the project completion time. What is a reasonable point estimate for the project duration? Hint: Excel does not provide random triangular distribution variates. We need to generate a (real) random number U greater or equal to 0 and less than 1; if U(m a)/(b a), then random variate=a+ U ( b a )( m a ) ; else random variate=b ( 1 U ) ( b a )( b m ) . See e.g., Generating Triangular-distributed random variates section in http://en.wikipedia. org/wiki/Triangular_distribution. (LO3) 18. A service operation consists of three steps. The first step can be described by a Continuous Uniform distribution that ranges between five and nine minutes. The second step can be described by a Normal distribution with a mean of seven minutes and a standard deviation of one minute, and the third step can be described by an Exponential distribution with a mean of five minutes. Simulate three services using two-digit numbers from Table 18S-1, row 4 for step 1; Table 18S-2, row 6 for step 2; and two-digit numbers from column 4 of Table 18S-1 for step 3. Determine the simulated time for each of the three services. (LO3)
5 6

C. Harrell et al, Simulation Using ProModel, 2000, Boston: McGraw-Hill, pp. 397399. Based on F. S. Hillier and G. J. Lieberman, Operations Research, 2nd ed, 1974, San Francisco: Holden-Day, p. 653.

36

PART EIGHT Waiting-Line Analysis

19. A project consists of five major activities, as illustrated in the diagram below. Activity times are Normally distributed with means and standard deviations as shown in the following table. Note that there are two paths through the project: A-B-D-End and A-C-E-End. Project duration is defined as the larger sum of times along the two paths. Simulate 10 times for each activity. Use column 1 of Table 18S-2 for activity A, column 2 for activity B, column 3 for activity C, column 4 for activity D, and column 5 for activity E. Determine the project duration for each of the 10 sets, and prepare a frequency distribution of project duration. Use categories of 25 to less than 30, 30 to less than 35, 35 to less than 40, 40 to less than 45, and 45 or more. Determine the proportion of time that a simulated duration of less than 40 days occurred. How might this information be used? (LO3)
B D

End

Activity A B C D E

Mean (days) 10 12 15 14 8

Standard Deviation (days) 2 2 3 2 1

* 20. A drug manufacturer has recently accepted an order from its best customer for 950 ounces of a new drug and wants to plan its production schedule to meet the promised delivery date.7 The order has to be produced in 1 or more batches. There are three sources of uncertainty: (a) time required to produce a batch (Normal with mean of 8 days and standard deviation of 1 day rounded to the nearest integer), (b) the yield of a batch, in ounces (triangular distribution [600, 1000, 1100]), and (c) the probability that a batch passes final inspection (prob=.99). If the batch fails inspection, it will be discarded. Use simulation and Excel to decide how many days prior to the due date the production should begin. (LO3) *21. A newsvendor must decide how many papers to buy from the newspaper publisher each weekday.8 Each weekday she will order the same quantity. A newspaper costs her $.55 and sells for $1. Daily demand during each weekday is Normal with mean of 136 and standard deviation of 27 newspapers. Any unsold newspapers will be sold to a recycler for $.03 each. A shortage results in loss of profit. Simulate demand for 1,000 days using Excel and determine the number of newspapers the newsvendor should buy each morning

7 Based on W. L. Winston and S. C. Albright, Practical Management Science, 2nd ed, 2001, Pacific Grove, California: Duxbury, pp. 626630. 8 W. D. Kelton et al, Simulation with Arena, 4th ed, 2007, Boston: McGraw-Hill, p. 38.

SUPPLEMENT TO CHAPTER 18 Simulation

37

to minimize expected total shortage and excess cost. Assume that she can buy only in multiples of 10. (LO3) * 22. The inter-arrival times to a single server queue are Exponentially distributed with a mean of 1.6 minutes.9 Service times have a Continuous Uniform distribution between .27 and 2.29 minutes. Download a trial version of Arena and use it to perform 100 hours of simulation to determine the maximum customer wait time in the queue. (LO3) * 23. A technical support centre is staffed by two people, Able and Baker.10 Able is more experienced than Baker, and hence provides faster service. If both are idle, Able takes the call. If both are busy, the caller waits. The distributions of inquiry inter-arrival times during peak periods, Ables service times, and Bakers service times are all Exponential with means of 2.25, 3.35, and 4.25 minutes, respectively. Model this problem in Excel, run the simulation for 1,000 calls, and determine the average wait time (in the queue). Should another person be assigned to the centre? (LO3)
11 **24. An appliance retail chain keeps inventories of its most popular fridges in its warehouse. Consider one such model and size. The company uses the fixed interval inventory model for replenishing the fridge from the manufacturer. The order interval used is 1 week (5workdays). The distribution of daily demand is Normal with mean of 2 and standard deviation of 1 (but non-negative) and lead time from the manufacturer is Exponential with mean of 1.5 workdays (but minimum=1 day and maximum=4 days; 1 day LT=next-day arrival). Currently the order up to level used for this fridge is 13 units. Model this problem in Excel, run the simulation for 1,000 days, and determine the average daily number of fridges short. (LO3)

* 25. A multi-user mainframe computer includes two disk drives that are prone to failure.12 If a disk drive fails, users lose their files, which need to be restored. Restoration is achieved by copying copies of the files, held on magnetic tapes, onto the disk backup. This restoration is inconvenient and so a new operation policy is being considered. At the moment, the disk drives are repaired and restored as and when they fail. The proposal is to introduce a joint repair system. The life of a disk drive is Normally distributed with a mean of 4 months and a standard deviation of 1 month. Under the current policy, it costs $50 to repair and restore a failed disk drive. The joint repair and restore policy would operate as follows: when either unit fails, the failed unit is repaired and restored, and the other unit is cleaned to bring it to a state equivalent to having been just repaired. This will cost $75 in total. Is the new joint repair and restore policy cost effective? Use Excel to simulate 200 individual failures and 100 joint repairs. (LO3) * 26. An airport hotel has 100 rooms.13 On any given night the hotel takes up to 105 reservations because of the possibility of no-shows. Past records indicate that the number of daily reservations is uniformly distributed over the integer range [96, 105]. The no-shows have a Normal distribution with mean of 2.5 and standard deviation of 1, but rounded to the nearest integer. Develop and run a simulation model in Excel for 100 days to find the expected number of rooms used per night and the percentage of nights when more than 100 rooms are claimed. (LO3)

W. D. Kelton et al, Simulation with Arena, 4th ed, 2007, Boston: McGraw-Hill, pp. 4344. Based on J. Banks et al, Discrete-event System Simulation, 5th ed, 2010, New Jersey: Prentice-Hall, pp. 5152. 11 J. Banks et al, Discrete-event System Simulation, 5th ed, 2010, New Jersey: Prentice-Hall, pp. 6162. 12 M. Pidd, Computer Simulation in Management Science, 1984, Chichester, UK: John Wiley, pp. 2224. 13 W. L. Winston, Operations Research, 2nd ed, 1991, Boston: PWS-Kent Publishing, p. 1159.
10

38

PART EIGHT Waiting-Line Analysis MINI-CASE

Valencia Kidney Waiting Line

ome staff researchers at the Valencia Regional Health Authority of Spain are wondering what will happen to the waiting line for kidney transplants in their region. They believe that the waiting line is likely to decrease. During the 1997 to 1999 period (1,095 days), the (new) demand for a kidney transplant was 531, with the number of (new) patients per day distributed approximately according to Poisson distribution. Hence, the average number of arrivals to the queuing system is estimated to be 531/1,095=0.485 patients per day. There were 241 double donations and 82 single donations during the same time period. Hence, the average number of kidneys donated per day was (2412+821)/1,095=.515. This can be used to estimate the average number of patients receiving a kidney each day (there was no instance of a patient receiving two kidneys as transplants). The number of kidney donations per day can also be approximated by Poisson distribution. There

were 446 people in the queue as of December 31, 1999. What is the probability that the waiting line will decrease after 365 days? Hint: (a) First in Excel compute the cumulative Poisson distribution with means of .485 and .515 using=POISSON. DIST(x, mean, cumulative). For example, to get the cumulative probability that X takes the values up to and including 2 use POISSON.DIST(2, .485, TRUE) for the arrival distribution, (b) Use the cumulative Poisson distributions of part a to simulate 365 days of arrivals and services, keeping track of the length of the queue (initially it is 446 people long), (c) use the Data Table to obtain 100 values for the end-of-the-year number of people in the queue, and (d) count the numbers that are smaller than 446.
Source: Based on J. J. Abellan, etal., Predicting the Behaviour of the Renal Transplant Waiting List in the Pais Valencia (Spain) Using Simulation Modelling, Proceedings of the 2004 Winter Simulation Conference, pp. 1969974. http://www.informs-sim.org/ wsc04papers/263.pdf

MINI-CASE

Dofasco
The superintendent of blast furnaces at Dofasco has to decide whether or not to recommend that an engineering modification costing $600,000 be made to the lance desulfurizing plant. The lance desulfurizing plant is part of the process for converting iron into steel. Molten iron from the blast furnaces is transported in special rail cars, called torpedoes, to the lance desulfurizing plant where sulfur content of torpedoes is reduced. After desulfurizing, a locomotive is called to haul the torpedoes to the melt shop where the iron is converted to steel. The desulfurizing plant consists of two side-by-side ports, each capable of desulfurizing a torpedo. However, the lance used at each port tends to break down, and repairs take up to a week. Management is concerned that lance breakdowns could cause a bottleneck, which would hold up a large number of torpodeos, causing the blast furnaces to shut down. There were 23 torpedoes circulating between the blast furnaces, desulfurizing plant, and melt shop. The proposed modification would install a backup system, which would solve the problem.

There are four blast furnaces. Each needs approximately two torpedoes for each discharge. The discharge time for each blast furnace is Normally distributed with a mean of 200 minutes and standard deviation of 20 minutes. The processing time of each desulfurizing port is approximately Normally distributed with a mean of 15 minutes and standard deviation of 3 minutes. The wait time for a locomotive to haul a torpedo out of a port is approximately Exponential with a mean of 8minutes. Model this problem in Excel, assuming that a lance has broken down for a week (i.e., just use one server). What is the implication for the number of torpedoes stuck in the lance queue? Management wont like to see more than five to six torpedoes in the lance line. Hint: The distribution of sum of two or more independent Normal distributions tends to the Continuous Uniform distribution. Therefore, one can assume that inter-arrival times are Uniform.
Source: P. C. Bell, Management Science/Operations Research,1999, Cincinnati: South-Western College Publishing, pp.203206.

You might also like