Professional Documents
Culture Documents
12 Simulation Technique
12 Simulation Technique
2
Simulation
• Simulation
– A descriptive tool for the study of the behavior
of a system under various conditions.
– The goal in simulation is to create a model that
will reflect the behavior of some real-life
system in order to be able to observe how it
may behave when certain inputs or parameters
are changed.
– Unlike analytical techniques, it is not an
optimizing technique.
Simulation vs Optimization
In an optimization model, the values of the decision variables are
outputs.
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.
• Discrete Simulations
– Experimental situations in which outcome
variables are discrete and are described by a
count of the number of occurrences.
• Continuous Simulations
– Experimental situations in which the variable of
interest is continuous in that it can assume both
integer and noninteger values over a range of
values that are measured rather than counted.
Types of Simulations (cont’d)
• Fixed-Interval Simulations
– Experiments simulating the value of a variable
over a given or fixed interval of time, distance
or area.
– Interest is centered on the accumulated value of
a variable over a length of time or other
interval.
• Next-Event Simulations
– Experiments focused on when something
happens, or how much time is required to
perform a task.
Types of Simulations (cont’d)
• Deterministic Simulations
– Cases in which a specific outcome is certain,
given a set of inputs.
• Probabilistic Simulations
– Cases that involve random variables and,
therefore, the exact outcome cannot be
predicted with certainty, given a set of inputs.
– Cases that incorporate some mechanism for
mimicking random behavior in one or more
variables.
Steps in Simulation
1. Problem formulation Phase 1
Problem Definition
2. Set objectives and overall project plan
4. Data Collection
Phase 2
3. Model conceptualization
Model Building
5. Model Translation
No Phase 3
6. Verified
Yes Experimentation
No No
7. Validated
Yes
8. Experimental Design
Phase 4
Implementation
9. Model runs and analysis
Validation (effectiveness)
• Is the right model built?
• Does the model adequately describe the reality you
want to model?
• Does the involved decision makers trust the model?
9
Steps in Simulation
Define the
problem
Set objectives
Develop model
Gather data
Validate model
Design
experiments
Run simulations
Analyze and
interpret results
The Monte Carlo Method
D D D
T o T o T o
r c r c r c
u k u k u k
c 3 c 2 c 1
k k k
Exit Entrance
16
Determination of Inventory Control Policies. Simulation
can be used to study inventory control models.
Factory
X 8 9 10 11 12 13
F(x) 0.1 0.3 0.6 0.8 0.9 1.0
Here is a graph of the CDF. To generate a discrete
demand using the graph:
Probability
1.2
Step 1: Locate
the particular F(x)
1 value of U on
this axis
0.8
7 8 9 10 11 12 13 14
20
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:
30
QUEUE PROBLEM- M/M/1—
USE SIMULATION & COMPARE
• Assume a small branch office of a local bank with only
one teller.
• Empirical data gathering indicates that inter-arrival
and service times are exponentially distributed.
– The average arrival rate = l = 5 customers per hour
– The average service rate = m = 6 customers per hour
• Using our knowledge of queuing theory we obtain
– = the server utilization = 5/6 0.83
– Lq = the average number of people waiting in line
– Wq = the average time spent waiting in line
32
Corrective Maintenance versus
Preventive Maintenance
• The Heavy Duty Company has just purchased a large machine for a
new production process.
• The machine is powered by a motor that occasionally breaks down and
requires a major overhaul. Therefore, a second standby motor is kept,
and the two motors are rotated in use.
• The breakdowns always occur on the fourth, fifth, or sixth day that the
motor is in use. Fortunately, it takes fewer than three days to overhaul
a motor, so a replacement is always ready.
Probability of Corresponding
Day a Breakdown Random Numbers
1, 2, 3 0
4 0.25 0.0000 to 0.2499
5 0.5 0.2500 to 0.7499
6 0.25 0.7500 to 0.9999
7 or more
34
Computer Simulation of Corrective
Maintenance
Random Time Since Last Cumulative Cumulative Distribution of
Breakdown Number Breakdown Day Cost Cost Time Between Breakdowns
1 0.5304 5 5 $11,000 $11,000 Number
2 0.6585 5 10 $11,000 $22,000 Prob Cumu. Prob
no. of Days
3 0.8922 6 16 $11,000 $33,000 0.25 0 4
4 0.7599 6 22 $11,000 $44,000 0.5 0.25 5
5 0.7965 6 28 $11,000 $55,000 0.25 0.75 6
6 0.3225 5 33 $11,000 $66,000
7 0.9594 6 39 $11,000 $77,000 Breakd $11,000
8 0.9747 6 45 $11,000 $88,000 own
9 0.0367 4 49 $11,000 $99,000 Cost
10 0.1526 4 53 $11,000 $1,10,000
26 0.6292 5 132 $11,000 $2,86,000
27 0.5751 5 137 $11,000 $2,97,000
28 0.4455 5 142 $11,000 $3,08,000
29 0.2885 5 147 $11,000 $3,19,000 Average Cost per Day
30 0.9201 6 153 $11,000 $3,30,000 $2,157
35
Preventive Maintenance Options
• Preventive maintenance would involve scheduling the motor to be
removed (and replaced) for an overhaul at a certain time, even if a
breakdown has not occurred.
• The goal is to provide maintenance early enough to prevent a
breakdown.
• Scheduling the overhaul enables removing and replacing the
motor at a convenient time when the machine is not in use, so no
production is lost.
46
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 $150,000
Sales Price $ 35,000
Fixed Costs (per year) $ 15,000
Variable Costs (per year) 75% of revenues
=C16 + C13
=NPV($D$3,C17:F17)+B17
=-$B$2 48
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 49
recalculation key for the spreadsheet (e.g., F9).
Using this formula results in random demands.
=INT(8+5*RAND() )
51
The resulting analysis gives the estimated mean NPV
and standard deviation.
62
How Reliable is the Simulation? Now the two questions
about the distribution can be answered:
1. What is the mean or expected value of the NPV?
In this trial, the mean is $12,100.
=$E$4+1.96*$E$8/SQRT($E$16)
So, we have 95% confidence that the true mean NPV is
64
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.
65
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.
67