Chap 15 Simulation Modeling
Chap 15 Simulation Modeling
Chap 15 Simulation Modeling
Simulation Modeling
To accompany Quantitative Analysis for Management, Tenth Edition, by Render, Stair, and Hanna Power Point slides created by Jeff Heyl
Learning Objectives
After completing this chapter, students will be able to: 1. Tackle a wide variety of problems by simulation 2. Understand the seven steps of conducting a simulation 3. Explain the advantages and disadvantages of simulation 4. Develop random number intervals and use them to generate outcomes 5. Understand alternative simulation packages available
15 2
Chapter Outline
15.1 15.2 15.3 15.4 15.5 15.6 Introduction Advantages and Disadvantages of Simulation Monte Carlo Simulation Simulation and Inventory Analysis Simulation of a Queuing Problem Fixed Time Increment and Next Event Increment Simulation Models 15.7 Simulation Model for a Maintenance Policy 15.8 Two Other Types of Simulation 15.9 Verification and Validation 15.10 Role of Computers in Simulation
2009 Prentice-Hall, Inc. 15 3
Introduction
Simulation is one of the most widely used
quantitative analysis tools It is used by over half of the largest US corporations in corporate planning To simulate is to try to duplicate the features, appearance, and characteristics of a real system We will build a mathematical model that comes as close as possible to representing the reality of the system You can also build physical models to test systems
15 4
Introduction
The idea behind simulation is to imitate a real-
world situation mathematically Study its properties and operating characteristics Draw conclusions and make action decisions
15 5
Introduction
Using simulation, a manager should
1. Define a problem 2. Introduce the variables associated with the problem 3. Construct a numerical model 4. Set up possible courses of action for testing 5. Run the experiment 6. Consider the results 7. Decide what courses of action to take
15 6
Process of Simulation
Define Problem
Introduce Important Variables Construct Simulation Model Specify Values of Variables to Be Tested Conduct the Simulation Examine the Results
Figure 15.1
1. It is relatively straightforward and flexible 2. Recent advances in computer software make simulation models very easy to develop 3. Can be used to analyze large and complex real-world situations 4. Allows what-if? type questions 5. Does not interfere with the real-world system 6. Enables study of interactions between components 7. Enables time compression 8. Enables the inclusion of real-world complications
2009 Prentice-Hall, Inc. 15 8
1. It is often expensive as it may require a long, complicated process to develop the model 2. Does not generate optimal solutions, it is a trial-and-error approach 3. Requires managers to generate all conditions and constraints of real-world problem 4. Each model is unique and the solutions and inferences are not usually transferable to other problems
15 9
chance in their behavior, the Monte Carlo method of simulation can be applied Some examples are 1. Inventory demand 2. Lead time for inventory 3. Times between machine breakdowns 4. Times between arrivals 5. Service times 6. Times to complete project activities 7. Number of employees absent
2009 Prentice-Hall, Inc. 15 10
experimentation on the probabilistic elements through random sampling It is based on the following five steps 1. Setting up a probability distribution for important variables 2. Building a cumulative probability distribution for each variable 3. Establishing an interval of random numbers for each variable 4. Generating random numbers 5. Actually simulating a series of trials
2009 Prentice-Hall, Inc. 15 11
of the sales at Harrys Auto Tire Harry wishes to determine a policy for managing this inventory He wants to simulate the daily demand for a number of days Step 1: Establishing probability distributions One way to establish a probability distribution for a given variable is to examine historical outcomes Managerial estimates based on judgment and experience can also be used
2009 Prentice-Hall, Inc. 15 12
0
1 2 3
10
20 40 60
4
5
40
30 200
Table 15.1
2009 Prentice-Hall, Inc. 15 13
cumulative distribution is an easy job A cumulative probability is the probability that a variable will be less than or equal to a particular value A cumulative distribution lists all of the possible values and the probabilities Tables 15.2 and 15.3 show these distributions
15 14
PROBABILITY OF OCCURRENCE
10/200 = 20/200 = 40/200 = 60/200 = 40/200 = 30/200 = 0.05 0.10 0.20 0.30 0.20 0.15
200/200 =
Table 15.2
1.00
15 15
5
Table 15.3
0.15
1.00
15 16
15 17
1.00 0.85
1.00
00 86 85
0.80
0.65 0.60
0.40
0.35
36 35 16 15 06 05 01
0.20 0.05
0.15
Figure 15.2
66 65
15 18
DAILY DEMAND 0 1 2 3 4
5
Table 15.4
0.15
1.00
86 to 00
15 19
96
33 50 88 90
52
69 33 32 30
62
27 50 18 36
87
21 95 50 24
49
11 13 62 69
56
60 44 57 82
59
95 34 34 51
23
89 62 56 74
78
68 64 62 30
71
48 39 31 35
Table 15.5
15 21
15 22
7
8 9 10
33
50 88 90
2
3 5 5
thousands of times it is much more likely the average simulated demand would be nearly the same as the expected demand
2009 Prentice-Hall, Inc. 15 24
QM for Windows
Program 15.1
2009 Prentice-Hall, Inc. 15 25
Program 15.2A
2009 Prentice-Hall, Inc. 15 26
Program 15.2B
2009 Prentice-Hall, Inc. 15 27
Program 15.3A
2009 Prentice-Hall, Inc. 15 28
Program 15.3B
2009 Prentice-Hall, Inc. 15 29
and lead time are variables Accurate analysis is difficult without simulation We will look at an inventory problem with two decision variables and two probabilistic components The owner of a hardware store wants to establish order quantity and reorder point decisions for a product that has probabilistic daily demand and reorder lead time
15 30
good, low cost inventory policy for an electric drill Simkin identifies two types of variables, controllable and uncontrollable inputs The controllable inputs are the order quantity and reorder points The uncontrollable inputs are daily demand and variable lead time The demand data for the drill is shown in Table 15.7
15 31
Table 15.7
15 32
Table 15.8
15 33
process The fourth step in the process is to specify the values of the variables that we wish to test The first policy Simkin wants to test is an order quantity of 10 with a reorder point of 5 The fifth step is to actually conduct the simulation The process is simulated for a 10 day period
15 34
Start Begin day of simulation Has order arrived? No Select random number to generate todays demand
Yes
Yes
No
Has order been placed that hasnt arrived yet ? No Yes Have enough days of this order policy been simulated ? Yes Yes
No
Place order
Compute average ending inventory, average lost sales, average number of orders placed, and corresponding costs
End
15 37
Table 15.9
2009 Prentice-Hall, Inc. 15 38
Simkin must determine what the costs are Equations for average daily ending inventory, average lost sales, and average number of orders placed
Average 41 total units 4.1units per day ending 10 days inventory
2 sales lost Average 0.2 units per day lost sales 10 days
Average 3 orders 0.3 orders per day number of orders placed 10 days
2009 Prentice-Hall, Inc. 15 39
15 40
$944 This simulation should really be extended for many more days, perhaps 100 or 1,000 days Even after a larger simulation, the model must be verified and validated to make sure it truly represents the situation on which it is based If we are satisfied with the model, additional simulations can be conducted using other values for the variables After simulating all reasonable combinations, Simkin would select the policy that results in the lowest total cost
2009 Prentice-Hall, Inc. 15 42
of simulation The assumptions of queuing models are quite restrictive Sometimes simulation is the only approach that fits In this example, arrivals do not follow a Poisson distribution and unloading rates are not exponential or constant
15 43
used to create a probability distribution for the daily unloading rate Barges are unloaded first-in, first-out Barges must wait for unloading which is expensive The dock superintendent wants to do a simulation study to enable him to make better staffing decisions
2009 Prentice-Hall, Inc. 15 44
intervals
NUMBER OF ARRIVALS 0 PROBABILITY 0.13 CUMULATIVE PROBABILITY 0.13 RANDOM NUMBER INTERVAL 01 to 13
1
2 3 4 5
0.17
0.15 0.25 0.20 0.10
0.30
0.45 0.70 0.90 1.00
14 to 30
31 to 45 46 to 70 71 to 90 91 to 00
Table 15.10
15 45
PROBABILITY 0.05
2
3 4 5
0.15
0.50 0.20 0.10 1.00
0.20
0.70 0.90 1.00
06 to 20
21 to 70 71 to 90 91 to 00
Table 15.11
15 46
12
13 14 15
2
3 1 0 20 Total delays
91
35 32 00
5
2 2 5 41 Total arrivals
7
5 3 5
85
90 73 59
4
4 3 3 39 Total unloadings
Table 15.12
15 47
Average number of barges 39 unloadings 2.60 unloadings unloaded each day 15 days
15 48
queuing simulation
Program 15.4A
2009 Prentice-Hall, Inc. 15 49
Program 15.4B
2009 Prentice-Hall, Inc. 15 50
time increment models and next event increment models The terms refer to the frequency in which the system status is updated Fixed time increments update the status of the system at fixed time intervals Next event increment models update only when the system status changes Fixed event models randomly generate the number of events that occur during a time period Next event models randomly generate the time that elapses until the next event occurs
2009 Prentice-Hall, Inc. 15 51
maintenance policies before actually implementing them Many options regarding staffing levels, parts replacement schedules, downtime, and labor costs can be compared This can including completely shutting down factories for maintenance
15 52
a series of almost 200 electric generators The company is concerned about generator failures because a breakdown costs about $75 per generator per hour Their four repair people earn $30 per hour and work rotating 8 hour shifts Management wants to evaluate the 1. Service maintenance cost 2. Simulated machine breakdown cost 3. Total cost
15 53
components Time between successive generator breakdowns which varies from 30 minutes to three hours The time it takes to repair the generators which ranges from one to three hours in one hour blocks A next event simulation is constructed to study this problem
15 54
flow diagram
Generate random number for Time Between Breakdowns
Record actual clock time of breakdown Examine time previous repair ends
No
Yes
2009 Prentice-Hall, Inc. 15 55
flow diagram
Generate random number for repair time required Compute time repair completed Compute hours of machine downtime = Time repair completed Clock time of breakdown
No
End
2009 Prentice-Hall, Inc. 15 56
Hills Power
TIME BETWEEN RECORDED MACHINE FAILURES (HRS) 0.5 1.0 1.5 2.0 2.5 3.0 Total Table 15.13
2009 Prentice-Hall, Inc. 15 57
CUMULATIVE PROBABILITY
0.05 0.11 0.27 0.60 0.81 1.00
Total
Table 15.14
100
1.00
15 58
10
11 12 13 14 15
09
49 13 33 89 13
1
2 1.5 2 3 1.5
19:30
21:30 23:00 01:00 04:00 05:30
20:00
23:00 01:00 04:00 06:00 08:00
85
59 85 40 42 52
3
2 3 2 2 2
23:00
01:00 04:00 06:00 08:00 10:00 Total
3.5
3.5 5 5 4 4.5 44
Table 15.15
15 59
other alternative plans to see if this is a good value The company might explore options like adding another repairperson Strategies such as preventive maintenance might also be simulated for comparison
15 61
Program 15.5A
2009 Prentice-Hall, Inc. 15 62
Program 15.5B
2009 Prentice-Hall, Inc. 15 63
three categories
The Monte Carlo method Operational gaming Systems simulation
15 64
Operational Gaming
Operational gaming refers to simulation involving
two or more competing players The best examples of this are military games and business games These types of simulation allow the testing of skills and decision-making in a competitive environment
15 65
Systems Simulation
Systems simulation is similar in that allows users
to test various managerial policies and decisions to evaluate their effect on the operating environment This models the dynamics of large systems A corporate operating system might model sales, production levels, marketing policies, investments, union contracts, utility rates, financing, and other factors Economic simulations, often called econometric models, are used by governments, bankers, and large organizations to predict inflation rates, domestic and foreign money supplies, and unemployment levels
2009 Prentice-Hall, Inc. 15 66
Systems Simulation
Inputs and outputs of a typical economic system
simulation
Income Tax Levels Corporate Tax Rates Interest Rates Government Spending Foreign Trade Policy
Figure 15.5
2009 Prentice-Hall, Inc. 15 67
to see that it is working properly and providing good representation of the real world situation The verification process involves determining that the computer model is internally consistent and following the logic of the conceptual model Verification answers the question Did we build the model right? Validation is the process of comparing a simulation model to the real system it represents to make sure it is accurate Validation answers the question Did we build the right model?
2009 Prentice-Hall, Inc. 15 68
tasks Three types of computer programming languages are available to help the simulation process General-purpose languages Special-purpose simulation languages
1. These require less programming 2. Are more efficient and easier to check for errors 3. Have random number generators built in
wide range of common problems Excel and add-ins can also be used for simulation problems
2009 Prentice-Hall, Inc. 15 69