Sie sind auf Seite 1von 64

Simulation

Chapter 14

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-1

Chapter Topics
The Monte Carlo Process
Computer Simulation with Excel
Spreadsheets
Simulation of a Queuing System
Continuous Probability Distributions
Statistical Analysis of Simulation Results
Crystal Ball
Verification of the Simulation Model
Areas of Simulation Application
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Hall

14-2

Overview
Analogue simulation replaces a physical system
with an analogous physical system that is easier to
manipulate.
In computer mathematical simulation a system
is replaced with a mathematical model that is
analyzed with the computer.
Simulation offers a means of analyzing very
complex systems that cannot be analyzed using
the other management science techniques in the
text.
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Hall

14-3

Monte Carlo Process


A large proportion of the applications of
simulations are for probabilistic models.
The Monte Carlo technique is defined as a
technique for selecting numbers randomly from a
probability distribution for use in a trial (computer
run) of a simulation model.
The basic principle behind the process is the same
as in the operation of gambling devices in casinos
(such as those in Monte Carlo, Monaco).

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-4

Monte Carlo Process


Use of Random Numbers (1 of 10)

In the Monte Carlo process, values for a random


variable are generated by sampling from a
probability distribution.

Example: ComputerWorld demand data for laptops


selling for $4,300 over a period of 100 weeks.

Table 14.1 Probability distribution of demand


for laptop PCs

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-5

Monte Carlo Process


Use of Random Numbers (2 of 10)

The purpose of the Monte Carlo process is


to generate the random variable,
demand, by sampling from the probability
distribution P(x).

The partitioned roulette wheel replicates


the probability distribution for demand if
the values of demand occur in a random
manner.

The segment at which the wheel stops

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-6

Monte Carlo Process


Use of Random Numbers (3 of 10)

Figure 14.1
demand

A roulette wheel for

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-7

Monte Carlo Process


Use of Random Numbers (4 of 10)

When the
wheel is
spun, the
actual
demand for
PCs is
determined
by a
number at
rim of the
Figure 14.2
wheel.
Numbered roulette wheel
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Hall

14-8

Monte Carlo Process


Use of Random Numbers (5 of 10)

Table 14.2 Generating demand from


random numbers

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-9

Monte Carlo Process


Use of Random Numbers (6 of 10)
Select a number from a random number table:

14.3
Copyright 2013 Pearson Education, Inc.Table
Publishing
as
Prentice Hall
numbers

A table of delightfully random


14-

Monte Carlo Process


Use of Random Numbers (7 of 10)

Repeating the selection of random numbers


simulates demand for a period of time. The
next slide shows demand for 15 consecutive
weeks as drawn from the random number
table.

Estimated average demand = 31/15 = 2.07


laptop PCs per week.

Estimated average revenue = $133,300/15


Copyright 2013 Pearson Education, Inc. Publishing as
= $8,886.67.
Prentice Hall
14

Monte Carlo Process


Use of Random Numbers (8 of 10)

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

Table 14.4

14-

Monte Carlo Process


Use of Random Numbers (9 of 10)
Average demand could have been calculated
analytically:
n
E( x) P( x ) x
i1
i

where:
x demand value i
P( x ) probability of demand
n the number of different demand values
i

therefore:
E( x) (.20)(0) (.40)(1) (.20)(2) (.10)(3) (.10)(4)
1.5 PCs per week
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Hall

14-

Monte Carlo Process


Use of Random Numbers (10 of 10)

The more periods simulated, the more accurate


the results.

Simulation results will not equal analytical results


unless enough trials have been conducted to reach
steady state.

It is often difficult to validate results of simulation


- that true steady state has been reached and that
simulation model truly replicates reality.

When analytical analysis is not possible, there is no


Copyright 2013 Pearson Education, Inc. Publishing as
analytical standard of comparison, thus making
Prentice Hall
14

Computer Simulation with Excel


Spreadsheets
Generating Random Numbers (1 of
As simulation models get more complex they
2)
become impossible to perform manually.

In simulation modeling, random numbers are


generated by a mathematical process instead of
a physical process (such as wheel spinning).

Random numbers are typically generated on the


computer using a numerical technique and thus are
not true random numbers but pseudorandom
numbers.

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Computer Simulation with Excel


Spreadsheets
Generating Random Numbers (2 of
2)
Artificially created random numbers must
have the following characteristics:
1.

The random numbers must be


uniformly distributed.

2.

The numerical technique for generating


the numbers must be efficient.

3.

The sequence of random numbers should


reflect no pattern.

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Simulation with Excel Spreadsheets


(1 of 3)

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

Exhibit 14.1
14-

Simulation with Excel Spreadsheets


(2 of 3)
Enter
=VLOOKUP(F6,Lookup,2)
in G6 and copy it to
G7:G20

Enter
=4300*G6 in
H6 and copy
it to H7:H20
=
AVERAGE(G6:G20
)

Generate random numbers


for cells F6:F20 with the
formula =RAND( ) in F6
and copy
it to F7:F20
Copyright 2013 Pearson Education, Inc. Publishing
as
Prentice Hall

Exhibit 14.2
14-

Simulation with Excel Spreadsheets


(3 of 3)
Click on the View tab, then on
Freeze Panes

Spreadsheet is frozen at row 16 to show first 10


weeks and last 6
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Hall

Exhibit 14.3

14-

Computer Simulation with Excel


Spreadsheets
Decision
Making example;
with Simulation
(1laptop
Revised
ComputerWorld
order size of one
=1+MAX(G6-H6,0)
is
=VLOOKUP(F6,Lookup,2) is
each
week.
of
2)
entered in G7 and
entered in H6 and copied to
copied to G8:G105

Shortages are computed by


entering =MIN(G6-H6,0) in I6 and
copying
to I7:I105
Copyright
2013 Pearson
Education, Inc. Publishing as
Prentice Hall

H7:H105

=G6*50 is entered
in cell L6 and
copied to L7:l105

Exhibit 14.414-

Computer Simulation with Excel


Spreadsheets
Decision
with Simulation
Order sizeMaking
of two laptops
each week. (2
New formula for two
of 2)
laptops ordered per
week

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

Exhibit 14.5
14-

Simulation of a Queuing System


Burlingham Mills Example (1 of 3)

Table 14.5 Distribution of


arrival intervals

Table 14.6 Distribution of

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Simulation of a Queuing System


Burlingham Mills Example (2 of 3)

Average waiting time = 12.5days/10 batches


= 1.25 days per batch
Average time in the system = 24.5 days/10
batches
Copyright
2013 Pearson Education, Inc. Publishing as
Prentice Hall

14-

Simulation of a Queuing System


Burlingham Mills Example (3 of 3)
Caveats:
Results

may be viewed with skepticism.

trials do not ensure steady-state


results.

Ten

Starting

conditions can affect


simulation results.

If

no batches are in the system at the


start, the simulation must run until it
replicates normal operating system.

If

the system starts with items already in


system,
the
simulation
must begin
Copyright the
2013 Pearson
Education, Inc.
Publishing
as
Prentice Hall

14-

Computer Simulation with Excel


Burlingham Mills Example
This formula is entered
in D15 and copied to
D16:D23
Clock time is
generated by
entering
=MAX(E15,J14) in
F15 and copying to
F16:F23

Arrival times are


generated by entering
=AVERAGE(G14:G
=E14+D15 in E15
23)
and
copying
to
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice
Hall
E16:E23

Copy
=VLOOKUP(H14,Looku
p2,2) to I14:I23

Exhibit 14.6

14-

Continuous Probability Distributions


A continuous function must be used for continuous distributions.
Example:
f(x) x , 0 x 4 where x time (minutes)
8
Cumulative probability of x:
x
xx
x
1 2
1
1
F(x) dx x dx x
80
8 2 0
08
2
x
F(x)
16
Let F(x) the random number r
2
x
r
16
x4 r
By generating a random number,r, a value x for "time" is determined.
Example: if r .25, x 4 .25 2 minutes
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Hall

14-

Machine Breakdown and


Maintenance System
Simulation (1 of 6)

Bigelow Manufacturing Company must decide if it


should implement a machine maintenance program
at a cost of $20,000 per year that would reduce the
frequency of breakdowns and thus time for repair
which is $2,000 per day in lost production.
A continuous probability distribution of the time
between machine breakdowns:
f(x) = x/8, 0 x 4 weeks, where x = weeks
between
machine breakdowns
x = 4*sqrt(ri), value of x for a given value of ri.

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Machine Breakdown and


Maintenance System
Simulation (2 of 6)

Table 14.8 Probability distribution of


machine repair time
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Hall

14-

Machine Breakdown and


Maintenance System
Simulation
(3 of
6) between machine
Revised probability
of time

breakdowns:
f(x) = x/18, 0 x6 weeks where x = weeks
6 r1
between x
machine
breakdowns

Table 14.9 Revised probability distribution of


machine
repair
time
with
Copyright
2013 Pearson
Education,
Inc. Publishing
as the maintenance
Prentice Hall

14-

Machine Breakdown and


Maintenance System
Simulation
of 6)
Simulation of(4
system
without maintenance

program (total annual repair cost of $84,000):

Table 14.10 Simulation of machine breakdowns and


repair times

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Machine Breakdown and


Maintenance System
Simulation of(5
system
with maintenance program
Simulation
of 6)
(total annual repair cost of $42,000):

Table 14.11 Simulation of machine breakdowns


Copyright
2013 Pearson
Education,
Inc. Publishing
as
and repair
with
the
maintenance
program
Prentice Hall

14-

Machine Breakdown and


Maintenance System
Simulation (6 of 6)

Results and caveats:


Implement the maintenance program since the
cost savings appear to be $42,000 per year and
the maintenance program will cost $20,000 per
year.
However, there are potential problems caused
by simulating both systems only once.
Simulation results could exhibit significant
variation since time between breakdowns and
repair times are probabilistic.
To be sure of accuracy of results, simulations of
each system must be run many times and the
average results computed.
Copyright
2013 Pearson Education, Inc. Publishing as
Prentice HallEfficient computer simulation is required to do 14-

Machine Breakdown and


Maintenance System
Simulation
withbreakdown
Excel (1 example:
of 2)
Original machine
From Table
14.8

Spreadsheet
frozen at row 24
Copy =
to show first 10
E14+D15 to
breakdowns and
E15:E113
Copyright 2013 Pearson Education, Inc. Publishing as
lastHall
6
Prentice

Exhibit 14.7

Copy
=VLOOKUP(F14,Look
up,2) to G14:G113
14-

Machine Breakdown and


Maintenance System
Simulation
with
Excel (2program.
of 2)
Simulation
with
maintenance
Probability
distribution or repair
time from Table 14.9

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

Revised formula
for time between
breakdowns

Exhibit 14.8

14-

Statistical Analysis of Simulation


Results (1 of 2)

Outcomes of simulation modeling are


statistical measures such as averages.

Statistical results are typically subjected to


additional statistical analysis to
determine their degree of accuracy.

Confidence limits are developed for the


analysis of the statistical validity of
simulation results.

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Statistical Analysis of Simulation


Results (2 of 2)
Formulas for 95% confidence limits:
x (1.96)(s / n )
upper confidence limit

lower confidence limit


x (1.96)(s / n )
wherex is the mean and s the standard
deviation from a sample of size n from any
population.
We can be 95% confident that the true population
mean will be between the upper confidence limit
and lower confidence limit.

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Simulation Results
Statistical Analysis with Excel (1 of
2)
Simulation with maintenance program.

Confiden
ce limits

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

Exhibit 14.914-

Simulation Results
Statistical Analysis with Excel (2 of
2)
Click on Data
Analysis

Statistical summary
report

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

Input Range
are the cost
($) values in
Output
column H
Range
specifies the
location of the
statistical
summary
report on the
spreadsheet

Exhibit 14.10
14-

Crystal Ball
Overview

Many realistic simulation problems contain


more complex probability distributions than
those used in the examples.

However there are several simulation add-ins


for Excel that provide a capability to perform
simulation analysis with a variety of
probability distributions in a spreadsheet
format.

Crystal Ball, published by Decisioneering, is


one of these.

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Crystal Ball
Simulation of Profit Analysis Model
(1 of 15)
Recap of the Western Clothing Company
break-even and profit analysis:
Price (p) for jeans is $23
variable cost (cv) is $8
Fixed cost (cf ) is $10,000
Profit Z = vp - cf vc
break-even volume v = cf/(p - cv)
= 10,000/(23-8)
= 666.7 pairs.
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Hall

14-

Crystal Ball
Simulation of Profit Analysis Model
(2 of 15)
Modifications to demonstrate Crystal Ball

Assume volume is now volume demanded and


is defined by a normal probability distribution
with mean of 1,050 and standard deviation of
410 pairs of jeans.

The price is uncertain and defined by a uniform


probability distribution from $20 to $26.

The variable cost is not constant but defined by a


triangular
probability distribution.

We can determine the average profit and


profitability with the given probabilistic
variables.

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Crystal Ball
Simulation of Profit Analysis Model
(3 of 15)

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Crystal Ball
Simulation of Profit Analysis Model
(4 of 15)
2. Click on Define
Assumption

1. Click on cell C4 to
define normal
distribution parameters

=C4*C5-C6(C4*C7)

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

Exhibit
14.11

14-

Crystal Ball
Simulation of Profit Analysis Model
(5 of 15)

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Crystal Ball
Simulation of Profit Analysis Model
(6 of 15)
Name pulled
from original
spreadsheet

1. Enter mean
and standard
deviation

3. Click on OK to
return to the
spreadsheet

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

2. Click Enter to
configure distribution
in window

Exhibit 14.12

14-

Crystal Ball
Simulation of Profit Analysis Model
(7 of 15)

Enter
minimum and
maximum
values for the
distribution

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

Exhibit 14.13

14-

Crystal Ball
Simulation of Profit Analysis Model
(8 of 15)

Enter
three
estimate
s
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Hall

Exhibit 14.14

14-

Crystal Ball
Simulation of Profit Analysis Model
(9 of 15)
1. Click on Define
Forecast

2. Type in
units

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

Exhibit 14.15

14-

Crystal Ball
Simulation of Profit Analysis Model
(10 of 15)
1. Click on Run
2. Click on
Start to begin
the simulation

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

Preferences to indicate
the number of trials and
seed number

Exhibit 14.16
14-

Crystal Ball
Simulation of Profit Analysis Model
(11 of 15)
2. Go to the
Sampling
screen to enter
the seed number

1. Enter the
number of trials

Exhibit 14.17
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Hall

14-

Crystal Ball
Simulation of Profit Analysis Model
(12 of 15)

Click here to
repeat the
same
simulation

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

Exhibit 14.18
14-

Crystal Ball
Simulation of Profit Analysis Model
1. Click here to establish the
2. Click here to
(13 of 15)
number of trials and the seed
start the
simulation

Click on View,
then Statistics
to go to the
statistical
summary screen
(Exhibit 14.20)
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Hall

number

Set new
run
preferen
ces

Click here to
reset the
simulation and
run it again

Exhibit 14.19

14-

Crystal Ball
Simulation of Profit Analysis Model
(14 of 15)
Click on View
to return to the
Frequency
window
Mean profit
value

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

Exhibit 14.20

14-

Crystal Ball
Simulation of Profit Analysis Model
(15 of 15)

Exhibit 14.21
Move arrow to
0.00 or set
lower limit
equal to 0.00

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

Probability (.8136)
that the company
will break even

14-

Verification of the Simulation Model


(1 of 2)
The analyst wants to be certain that the model
is internally correct and that all operations are
logical and mathematically correct.
Testing procedures for validity:

Run a small number of trials of the model


and compare
with manually derived
solutions.

Divide the model into parts and run parts


separately to
reduce the complexity of
checking.

Simplify mathematical relationships (if


possible) for easier testing.

Compare results with actual real-world


Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Halldata.
14-

Verification of the Simulation Model


(2 of 2)
The analyst must determine if the models starting
conditions are correct (system empty, etc).
Must determine how long model should run to
insure steady-state conditions.
A standard, fool-proof procedure for validation is
not available.
Validity of the model rests ultimately on the
expertise and experience of the model developer.
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Hall

14-

Some Areas of Simulation


Application
Queuing
Inventory Control
Production and Manufacturing
Finance
Marketing
Public Service Operations
Environmental and Resource Analysis

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Example Problem Solution (1 of 6)


Willow Creek Emergency Rescue Squad
Minor emergency requires two-person crew
Regular emergency requires a three-person
crew
Major emergency requires a five-person
crew

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

C
a
l0
s
P
r
o
b
a
b
i
l
t
y
.
0
5
1
1
2
2
.
5
3
2
4
.
5
1
5
61.060

Example Problem Solution (2 of 6)


Distribution of the number of calls per night and
emergency type:

1. Manually simulate 10
nights of calls
2. Determine the average
number of calls each night
3. Determine the maximum
number of crew members
that might be needed on
any
given night.
Copyright 2013 Pearson Education, Inc. Publishing
as
Prentice Hall

14-

Example Problem Solution (3 of 6)


Step 1: Develop random number ranges for the
probability distributions.

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Example Problem Solution (4 of 6)


Step 2: Set up a tabular simulation (use the second
column of random numbers in Table 14.3).

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Example Problem Solution (5 of 6)


Step 2 continued:

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Example Problem Solution (6 of 6)


Step 3: Compute Results:
average number of minor emergency calls per night
= 10/10 =1.0
average number of regular emergency calls per night
=14/10 = 1.4
average number of major emergency calls per night =
3/10 = 0.30
If calls of all types occurred on same night, the
maximum number of squad members required
would be 14.
Copyright 2013 Pearson Education, Inc. Publishing as
Prentice Hall

14-

All rights reserved. No part of this publication may be reproduced, stored in a retrieval
system, or transmitted, in any form or by any means, electronic, mechanical, photocopying,
recording, or otherwise, without the prior written permission of the publisher.
Printed in the United States of America.

Copyright 2013 Pearson Education, Inc. Publishing as


Prentice Hall

14-

Das könnte Ihnen auch gefallen