Professional Documents
Culture Documents
The result of the model is a set of values for the decision variables that will maximize (or minimize) the value of the objective function.
In a simulation model, the values of the decision variables are inputs. The model evaluates the objective function for a particular set of values. The result of the model is a measure of the quality of a suggested solution and the variability in various performance measures due to randomness in the 2 inputs.
Introduction
Simulation allows you to quickly and inexpensively acquire knowledge concerning a problem that is usually gained through experience (which is often costly and time consuming). An experimental device (simulator) will act like (simulate) the system of interest in a quick, costeffective manner.
Goal: To create an environment in which information about alternative actions can be obtained through experimentation.
3
Steps in simulation
1. Problem formulation 2. Set objectives and overall project plan
3. Model conceptualization
4. Data Collection
Phase 2
Model Building
5. Model Translation No No 6. Verified Yes 7. Validated Yes 8. Experimental Design 9. Model runs and analysis Yes No 11. Documentation, reporting and implementation No
Phase 3
Experimentation
Phase 4
Implementation
10
The Cumulative Distribution Function (CDF). Consider a random variable, D, the demand. The CDF for D [called F(x)] is then defined as the probability that D takes on a value < x.
11
Here is a graph of the CDF. To generate a discrete demand using the graph:
Probability
1.2
F(x)
Step 2: Read the particular value of the random quantity, d, on this axis d x
0 7 8 9 10 11 12 13
14
12
THE GENERAL METHOD APPLIED TO CONTINUOUS DISTRIBUTIONS: The two-step process for generating a continuous random variable W is shown below: The cumulative
Probability 1.1 1
F(x)=Prob{W<x}
distribution function of W As before, first locate the value (u) of the random variable U Then, read the particular value of the random quantity, W, on this axis 13
F(w)
w
1 2 3 4 5 6 7 8 9
x 10
Generating from the Exponential Distribution. The exponential distribution is often used to model the time between arrivals in a queuing model. Its CDF is given by: F(x) = Prob{t>T} = e-lT Where 1/l is the mean of the random variable T. Therefore, we want to solve the following equation for w: u = e-lT The solution is: T = -1/l ln(u) where we can get u from Random number which represents cumulative distribution function
14
Generating from the Normal Distribution. The normal distribution plays an important role in many simulation and analytic models. Consider drawing a random demand from a normal distribution with a mean (m) of 1000 and a standard deviation (s) of 100. If Z is a unit normal random variable (normally distributed with a mean of 0 and a standard deviation of 1) then m + Zs is a normal random variable with mean m and standard deviation s. So, we can draw from a unit normal distribution. Excel has a built-in function that can do this: = NORMINV( RAND() , 1000, 100) Excel will automatically return a normally distributed 15 random number with mean 1000 and std. dev. 100.
MAINTAINANCE PROBLEM
16
Day 1, 2, 3
Probability of a Breakdown 0
4
5 6 7 or more
0.25
0.5 0.25
0.0000 to 0.2499
0.2500 to 0.7499 0.7500 to 0.9999
18
1 2 3 4 5 6 7 8 9 10 26 27 28 29 30
0.1343 0.1523 0.9091 0.6161 0.6223 0.0026 0.6920 0.6155 0.7805 0.9189 0.6869 0.6415 0.3599 0.1493 0.4700
4 4 6 5 5 4 5 5 6 6 5 5 5 4 5
$11,000 $11,000 $11,000 $11,000 $11,000 $11,000 $11,000 $11,000 $11,000 $11,000 $11,000 $11,000 $11,000 $11,000 $11,000
$11,000 $22,000 $33,000 $44,000 $55,000 $66,000 $77,000 $88,000 $99,000 $110,000 $286,000 $297,000 $308,000 $319,000 $330,000
19
Cost of Replacement Cycle that Begins without a Breakdown Replace a motor on overtime Lost production during replacement Overhaul a motor before a breakdown Total $3,000 0 3,000
20
$6,000
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
0.3926 0.4904 0.8207 0.6811 0.1084 0.1032 0.5737 0.0718 0.5408 0.9918 0.9948 0.1657 0.1035 0.3365 0.1650 0.4908 0.0267 0.1388 0.9297 0.5908 0.1035 0.6132 0.5361 0.0726 0.0593 0.7241 0.3092 0.4092 0.2356 0.6483
5 5 6 5 4 4 5 4 5 6 6 4 4 5 4 5 4 4 6 5 4 5 5 4 4 5 5 5 4 5
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
Replacement Replacement Replacement Replacement Breakdown Breakdown Replacement Breakdown Replacement Replacement Replacement Breakdown Breakdown Replacement Breakdown Replacement Breakdown Breakdown Replacement Replacement Breakdown Replacement Replacement Breakdown Breakdown Replacement Replacement Replacement Breakdown Replacement
$6,000 $6,000 $6,000 $6,000 $11,000 $11,000 $6,000 $11,000 $6,000 $6,000 $6,000 $11,000 $11,000 $6,000 $11,000 $6,000 $11,000 $11,000 $6,000 $6,000 $11,000 $6,000 $6,000 $11,000 $11,000 $6,000 $6,000 $6,000 $11,000 $6,000
$6,000 $12,000 $18,000 $24,000 $35,000 $46,000 $52,000 $63,000 $69,000 $75,000 $81,000 $92,000 $103,000 $109,000 $120,000 $126,000 $137,000 $148,000 $154,000 $160,000 $171,000 $177,000 $183,000 $194,000 $205,000 $211,000 $217,000 $223,000 $234,000 $240,000
Probability 0.25 0.5 0.25 Breakdown Cost Replacement Cost Replace After
21
Average Cost per Day $2,000
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
0.3543 0.2204 0.0583 0.8282 0.9815 0.4620 0.7658 0.4318 0.8745 0.9448 0.0987 0.5796 0.7489 0.2480 0.5809 0.9055 0.5844 0.0157 0.0949 0.1892 0.9239 0.1051 0.8739 0.5229 0.6667 0.3945 0.7721 0.2253 0.6972 0.5078
5 4 4 6 6 5 6 5 6 6 4 5 5 4 5 6 5 4 4 4 6 4 6 5 5 5 6 4 5 5
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
Breakdown Breakdown Breakdown Replacement Replacement Breakdown Replacement Breakdown Replacement Replacement Breakdown Breakdown Breakdown Breakdown Breakdown Replacement Breakdown Breakdown Breakdown Breakdown Replacement Breakdown Replacement Breakdown Breakdown Breakdown Replacement Breakdown Breakdown Breakdown
$11,000 $11,000 $11,000 $6,000 $6,000 $11,000 $6,000 $11,000 $6,000 $6,000 $11,000 $11,000 $11,000 $11,000 $11,000 $6,000 $11,000 $11,000 $11,000 $11,000 $6,000 $11,000 $6,000 $11,000 $11,000 $11,000 $6,000 $11,000 $11,000 $11,000
$11,000 $22,000 $33,000 $39,000 $45,000 $56,000 $62,000 $73,000 $79,000 $85,000 $96,000 $107,000 $118,000 $129,000 $140,000 $146,000 $157,000 $168,000 $179,000 $190,000 $196,000 $207,000 $213,000 $224,000 $235,000 $246,000 $252,000 $263,000 $274,000 $285,000
Design of Docking Facilities. In the following model, trucks of different sizes carrying different types of loads, arrive at a warehouse to be unloaded.
T r u c k
D o c k 3
T r u c k
D o c k 2
T r u c k
D o c k 1
Exit
Entrance
Truck waiting
Truck waiting
23
The uncertainties are: When will a truck arrive? What kind and size of load will it be carrying?
1. The design of the unloading dock will affect its cost of construction and operation. 2. Management must balance the cost of acquiring and
25
Determination of Inventory Control Policies. Simulation can be used to study inventory control models.
Factory
Warehouse 1 Demand
Warehouse 2 Demand
Warehouse 3 Demand
In this model, the factory produces goods that are sent to the warehouses to satisfy customer demand. The random variables are: daily demand at each warehouse and shipping times from factory to warehouse.
26
Simulation can be used to study inventory control models. Some of the operational questions are: When should a warehouse reorder from the factory and how much? How much stock should the factory maintain to satisfy the orders of the warehouses? The main costs are: Cost of holding the inventory Cost of shipping goods from a factory to a warehouse Cost of not being able to satisfy customer demand at the warehouse The objective is to find a stocking and ordering policy 27 that keeps the total cost low while meeting demand.
A GENERALIZED METHOD: To generate a discrete random variable with the RAND() function in a spreadsheet, two things are needed: 1. The ability to generate discrete uniform random variables 2. The distribution of the discrete random variable to be generated
Suppose you want to model a discrete uniform distribution of demand where the values of 8 through 12 all have the same probability of occurring (uniform, equally likely). The spreadsheet has a function, =RAND(), that returns a random number between 0 and 1. However, this will result in a continuous uniform distribution. To create a discrete uniform distribution, use the INT() function. For example:
In general, if you want a discrete, uniform distribution of integer values between x and y, use the formula: 30 INT(x + (y x + 1)*RAND() )
31
A CAPITAL BUDGETING EXAMPLE: ADDING A NEW PRODUCT LINE Airbus Industry is considering adding a new jet airplane (model A3XX) to its product line. The following financial information is available: Startup Costs Sales Price Fixed Costs (per year) Variable Costs (per year) $150,000 $ 35,000 $ 15,000 75% of revenues
Tax depreciation on the new equipment would be $10,000 per year over the 4 year expected product life. Salvage value of the equipment at the end of the 4 years is estimated to be 0. Airbus cost of capital is 10% and tax rate is 34%.
32
If demand is known, then a spreadsheet can be used to calculate the net present value (NPV). For example, assume that the demand for A3XXs is 10 units for each of the next 4 years:
=C16 + C13
=NPV($D$3,C17:F17)+B17 =-$B$2
33
THE MODEL WITH RANDOM DEMAND It is unlikely that demand will be the same every year. A more realistic model would be one in which demand each year is a sequence of random variables. This model of demand is appropriate when there is a constant base level of demand that is subject to random fluctuations from year to year. Sampling Demand with a Spreadsheet: Assume initially that the demand in a year will be either 8, 9, 10, 11, or 12 units with each value being equally likely to occur. This is an example of a discrete uniform distribution. Now, use the formula =INT(8 + 5*RAND() ) to sample from a discrete uniform distribution on the integers 8, 9, 10, 11, 12 . Multiple trials can be performed by pressing the 34 recalculation key for the spreadsheet (e.g., F9).
=INT(8+5*RAND() )
Hitting the F9 key would result in a different sample of demands, and possibly a different NPV. The demands are random variables, therefore, the NPV 35 is also a random variable.
EVALUATING THE PROPOSAL Two questions need to be answered about the NPV distribution: 1. What is the mean or expected value of the NPV? 2. What is the probability that the NPV assumes a negative value (making the proposal to add the A3XX less attractive)? To answer these questions, a simulation model must be built. To run the simulation automatically and capture the resulting NPV in a separate spreadsheet, use the Data Table command.
36
In the resulting dialog, enter C1 for the column input cell and click OK.
Excel will recalculate the values and store the resulting NPV in the adjacent cells in column B. Note that since a random number generator is used in the formula, you may get different values than these.
37
To get a summary of the 100 iterations, use Excels builtin data analysis tool. Click on Tools Data Analysis. If you do not have this option, click on the Add-in option on the Tools menu and in the resulting dialog, click on Analysis ToolPak. After clicking OK, the Data Analysis dialog will open.
In the resulting dialog, choose the Input Range to include the 100 iterations.
Now click on Output Range and enter the cell where the output will be placed.
39
The resulting analysis gives the estimated mean NPV and standard deviation.
Downside Risk and Upside Risk: To get a better idea about the range of possible NPVs that could occur, look 40 at the minimum and maximum NPVs.
Distribution of Outcomes: Now we ask the question: How likely will these extreme outcomes occur? To answer this, examine the shape of the distribution of the NPV by creating a histogram.
In the resulting dialog, set the input range and choose to save the results in a worksheet called NPV Distribution.
41
In the resulting analysis, the Frequency (column B) indicates the number of trials that fell into the bins (categories) defined by column A.
The cumulative % column indicates the cumulative percentage of observations that fall into each category 42 or bin.
The histogram gives a visual representation of the distribution of NPVs. Note that it is somewhat bell shaped.
43
How Reliable is the Simulation? Now the two questions about the distribution can be answered:
=$E$4+1.96*$E$8/SQRT($E$16) So, we have 95% confidence that the true mean NPV is 45 somewhere between $9,679 and $14,521.
THE MODEL WITH RANDOM DEMAND It is unlikely that demand will be the same every year. A more realistic model would be one in which demand each year is a sequence of random variables. This model of demand is appropriate when there is a constant base level of demand that is subject to random fluctuations from year to year. Sampling Demand with a Spreadsheet: Assume initially that the demand in a year will be either 8, 9, 10, 11, or 12 units with each value being equally likely to occur. This is an example of a discrete uniform distribution.
46
OTHER DISTRIBUTIONS OF DEMAND Originally, we started with equal mean demands of 10 for each period (year). Then, we allowed for random variation in mean demand (between 8 and 12 units) and discrete distribution.
Now, assume the mean demand will stay the same over the next four years, somewhere between 6 and 14 units a year, with all values being equally likely. This scenario can be modeled as a continuous, uniform distribution between 6 and 14.
In addition, we can explore the impact of different demand distributions on the NPV.
47
Inventory Problem
The daily demand of an item has the following distribution:
Demand per day (units) No. of days on which demand occurred 0 4 1 10 2 15 3 39 4 22 5 10
When an order is placed to replenish inventory there is a delivery time lag, which follows the following distribution:
Lead time (days) No. of times of occurrence 2 24 3 12 4 4
The management is of the opinion that proportion of stockouts should not exceed 5%.
48
Advantage of Simulation
1. It is particularly well-suited for problems that are difficult or impossible to solve mathematically.
2. It allows an analyst or decision maker to experiment with system behavior in a controlled environment instead of in a real-life setting that has inherent risks. 3. It enables a decision maker to compress time in order to evaluate the long-term effects of various alternatives. 4. It can serve as a mode for training decision makers by enabling them to observe the behavior of a system under different conditions.
49
Limitations of Simulation
1. Probabilistic simulation results are approximations, rather than optimal solutions. 2. Good simulations can be costly and time-consuming to develop properly; they also can be time-consuming to run, especially in cases in which a large number of trials are indicated. 3. A certain amount of expertise is required in order to design a good simulation, and this may not be readily available. 4. Analytical techniques may be available that can provide better answers to problems.
50
THANK YOU
51