Transcript Lect4
Simulation
OPIM 310-Lecture #4
Instructor: Jose Cruz
Outline
What Is Simulation?
Advantages and Disadvantages of
Simulation
Monte Carlo Simulation
Simulation and Profit Analysis
The use of Excel spreadsheets in
simulation
What is Simulation?
An attempt to duplicate the features,
appearance, and characteristics of a
real system
1. To imitate a real-world situation
mathematically
2. To study its properties and operating
characteristics
3. To draw conclusions and make action
decisions based on the results of the
simulation
Simulation Applications
Ambulance location and
dispatching
Assembly-line balancing
Parking lot and harbor design
Distribution system design
Scheduling aircraft
Labor-hiring decisions
Personnel scheduling
Traffic-light timing
Voting pattern prediction
Bus scheduling
Design of library operations
Taxi, truck, and railroad dispatching
Production facility scheduling
Plant layout
Capital investments
Production scheduling
Sales forecasting
Inventory planning and control
Define problem
The
Process of
Simulation
Introduce variables
Construct model
Specify values
of variables
Conduct simulation
Examine results
Select best course
Advantages of Simulation
1. Relatively straightforward and flexible
2. Can be used to analyze large and
complex real-world situations that
cannot be solved by conventional
models
3. Real-world complications can be
included that most OM models cannot
permit
4. “Time compression” is possible
Advantages of Simulation
5. Allows “what-if” types of questions
6. Does not interfere with real-world
systems
7. Can study the interactive effects of
individual components or variables in
order to determine which ones are
important
Disadvantages of Simulation
1. Can be very expensive and may take
months to develop
2. It is a trial-and-error approach that may
produce different solutions in repeated
runs
3. Managers must generate all of the
conditions and constraints for
solutions they want to examine
4. Each simulation model is unique
Monte Carlo Simulation
Select numbers randomly from a
probability distribution
Use these values to observe how a
model performs over time
Random numbers each
have an equal likelihood
of being selected
at random
Distribution of Demand
LAPTOPS DEMANDED
PER WEEK,
0
1
2
3
4
FREQUENCY OF
DEMAND
PROBABILITY OF
DEMAND, P(x)
20
40
20
10
10
0.20
0.40
0.20
0.10
0.10
100
1.00
CUMULATIVE
0
0.20
0.60
0.80
0.90
Roulette Wheel of Demand
0
90
x=4
80
x=0
20
x=3
x=2
x=1
60
Generating Demand from
Random Numbers
DEMAND,
x
RANGES OF RANDOM NUMBERS,
r
0
1
2
3
4
0-19
20-59
60-79
80-89
90-99
r = 39
Random Number Table
39
73
72
75
37
65
71
18
12
17
76
23
47
25
79
45
70
33
69
88
45
90
84
17
74
19
65
51
17
63
90
97
67
95
52
69
60
47
21
06
64
12
97
78
34
61
11
19
58
30
15 Weeks of Demand
WEEK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
r
39
73
72
75
37
02
87
98
10
47
93
21
95
97
69
DEMAND (x)
1
2
2
2
1
0
3
4
0
1
4
1
4
4
2
= 31
REVENUE (S)
4,300
8,600
8,600
8,600
4,300
0
12,900
17,200
0
4,300
17,200
4,300 Average demand
17,200
= 31/15
17,200
= 2.07 laptops/week
8,600
$133,300
Computing Expected Demand
E(x) = (0.20)(0) + (0.40)(1) + (0.20)(2)
+ (0.10)(3) + (0.10)(4)
= 1.5 laptops per week
Not particularly close to
simulated result of 2.07 laptops
Difference is due to small
number of periods analyzed
Random Numbers in Excel
Simulation in Excel
Enter this formula
in G6 and copy to
G7:G20
Enter “=4300*G6”
in H6 and copy to
H7:H20
Generate random
numbers for cells
F6:F20 with the
formula “=RAND()”
in F6 and copying to
F7:F20
= AVERAGE (G6:G20)
Simulation in Excel
Example of Risk Analysis
PortaCom Project
PortCom’s product design group has developed a prototype
for a new high-quality portable printer. The new printer has an
innovative design and the potential to capture a significant
share of the portable printer market. Preliminary marketing
and financial analysis have provided the following information.
Selling price = $249 per unit
Administrative cost = $400,000
Advertising cost = $600,000
PortaCom believes that the costs and the demand range as
follows:
Unit direct labor cost = $43~$47
Unit parts cost = $80~$100
First-year demand = 1500~28,500 units
Simulation
•
The advantage of simulation is that it allows us
to assess the probability of a profit and the
probability of a loss.
Procedure of simulation
1. Check parameters
2. Check controllable inputs
3. Check probabilistic inputs
* Generate random numbers
4. Formulate a model
5. Draw a flowchart
Simulation
1. Check parameters
Selling price = $249 per unit
Administrative cost = $400,000
Advertising cost = $600,000
2. Check controllable inputs
Whether or not introduce the product
3. Check probabilistic inputs
Unit direct labor cost range = $43~$47
Unit parts cost range = $80~$100
First-year demand range = 1500~28,500 units
Simulation
4. Formulate a model
Profit=(249-c1-c2)X-1,000,000
5. Draw a flowchart
Probability Distribution of the
Direct Labor Cost
Direct labor cost
$43
$44
$45
$46
$47
Probability
0.1
0.2
0.4
0.2
0.1
Probability Distribution of the
Parts Costs
• The probability distribution for the parts cost per
unit is the uniform distribution as follows:
Probability Distribution of the
First-year Demand
• The first-year demand is described by the normal
probability distribution with mean 15,000 units
and the standard deviation 45000 units as
follows:
How to Generate Random
Numbers
• Computer-generated random numbers
* Assign ranges of random numbers to
to corresponding values of probabilistic
inputs. The prob. of any input value is
identical to the prob. of its occurrence in the
real system.
* Placing =RAND() in a cell of an Excel
worksheet will result in a random number.
Generate Random Value for
Direct Labor Cost
Interval of
Direct labor cost
Probability random numbers
$43
0.1
0.0~0.1
$44
0.2
0.1~0.3
$45
0.4
0.3~0.7
$46
0.2
0.7~0.9
$47
0.1
0.9~1.0
*Excell Statement
=Vlookup(Rand(),range, Col_index)
Generate Random Numbers for
Parts Cost
• With a uniform probability distribution, the
following relationship between the random
number and the associated value of the parts
cost is used.
Parts cost=a+r(b-a)
where r=random number
a=smallest value for parts cost
b=largest value for parts cost
Parts cost=80+r(100-80)=80+r20
Generate Random Numbers for
First-year Demand
• Because first-year demand is normally
distributed, we need a procedure for generating
random values from a normal distribution.
•
We use the following formula of Excell
=NORMINV(RAND(),mean,standard deviation)