Transcript Simulation

Lecture
6
MGMT 650
Simulation – Chapter 13
1
Announcements

HW #4 solutions and grades posted in BB
 HW #4 average = 111.30
 Final exam today
 Open book, open notes….
 Proposed class structure for today
Lecture – 6:00 – 7:50
 Class evaluations – 7:50 – 8:00
 Break – 8:00 – 8:30
 Final – 8:30 – 9:45

2
Lecture
6
Simulation
Chapter 13
3
Simulation Is …

Simulation – very broad term
 methods and applications to imitate or mimic real
systems, usually via computer
Applies in many fields and industries

Simulation models complex situations

Models are simple to use and understand

Models can play “what if” experiments

Extensive software packages available



ARENA, ProModel
Very popular and powerful method
4
Applications

Manufacturing facility
 Bank operation
 Airport operations (passengers, security, planes,
crews, baggage, overbooking)
 Hospital facilities (emergency room, operating
room, admissions)
 Traffic flow in a freeway system
 Waiting lines - fast-food restaurant, supermarkets
 Emergency-response system
 Military
5
Example – Simulating Machine Breakdowns



The manager of a machine shop is concerned about
machine breakdowns.
Historical data of breakdowns over the last 100 days is as
follows
Number of Breakdowns
Frequency
0
10
1
30
2
25
3
20
4
10
5
5
Simulate breakdowns for the manager for a 10-day period
6
Simulation Procedure
Number of Breakdowns
0
1
2
3
4
5
Day
1
2
3
4
5
6
7
8
9
10
Frequency
10
30
25
20
10
5
100
Random Number
90
73
82
16
94
92
68
5
84
91
Probability Cum Prob
0.10
0.10
0.30
0.40
0.25
0.65
0.20
0.85
0.10
0.95
0.05
1.00
Corresponding Random Numbers
01 to 10
11 to 40
41 to 65
61 to 85
86 to 95
96 to 00
Simulated # of Breakdowns
4
3
3
1
4
4
3
0
3
4
19
Expected number
of breakdowns
= 1.9 per day
7
Statistical Analysis
Day #
Replication 1 Replication 2 Replication 3 Replication 4 Replication 5 Replication 6 Replication 7 Replication 8Replication 9 Replication 10
1
1
4
4
1
0
2
5
1
1
0
2
3
5
0
2
0
4
3
2
0
3
3
3
1
1
1
2
1
0
1
1
5
4
1
2
2
3
2
3
1
1
1
1
5
2
0
1
1
1
5
2
2
0
2
6
0
2
3
1
3
1
4
3
2
2
7
1
1
2
2
1
2
1
1
1
0
8
3
3
2
2
0
4
2
1
3
2
9
1
1
1
2
2
1
4
0
1
4
10
5
1
3
2
3
2
1
0
1
1
2.00
2.00
1.90
1.70
1.40
2.50
2.30
1.20
1.10
2.00
95 % confidence interval for mean breakdowns for the 10-day
period is given by:
xt
n 1;1

2
s
0.458
 1.81  2.262(
)  [1.665,1.955]
n
10
8
Monte Carlo Simulation
Monte Carlo method: Probabilistic simulation
technique used when a process has a random
component




Identify a probability
distribution
Setup intervals of
random numbers to
match probability distribution
Obtain the random numbers
Interpret the results
9
Example 2 – Simulating a Reorder Policy






The manager of a truck dealership wants to acquire some insight into
how a proposed policy for reordering trucks might affect order
frequency
Under the new policy, 2 trucks will be ordered every time the
inventory of trucks is 5 or lower
Due to proximity between the dealership and the local office, orders
can be filled overnight
The “historical” probability for daily demand is as follows
Demand (x)
P(x)
0
0.50
1
0.40
2
0.10
Simulate a reorder policy for the dealer for the next 10 days
Assume a beginning inventory of 7 trucks
10
Example 2 Solutions
x
0
1
2
P(x)
0.5
0.4
0.1
Cum P(x) RN
0.5 01 to 50
0.9 51 to 90
1.0 91 to 00
Day
1
2
3
4
5
6
7
8
9
10
RN
81
20
82
34
85
35
10
14
84
92
Demand Begin Inv End Inv Reorder
1
7
6
0
0
6
6
0
1
6
5
2
0
7
7
0
1
7
6
0
0
6
6
0
0
6
6
0
0
6
6
0
1
6
5
2
2
7
5
2
11
In-class Example using MS-Excel





The time between mechanics’ requests for tools in a
AAMCO facility is normally distributed with a mean of
10 minutes and a standard deviation of 1 minute.
The time to fill requests is also normal with a mean of 9
minutes and a standard deviation of 1 minute.
Mechanics’ waiting time represents a cost of $2 per
minute.
Servers represent a cost of $1 per minute.
Simulate arrivals for the first 9 mechanic requests and
determine




Service time for each request
Waiting time for each request
Total cost in handling all requests
Assume 1 server only
12
AAMCO Solutions
Inter-request time Cum Int-req time Service Time Service Begins Service Ends Wait
11.70
11.70
8.80
11.70
20.50
7.08
18.78
10.28
20.50
30.78
5.38
24.16
8.98
24.16
33.14
5.92
30.08
8.26
30.08
38.34
6.17
36.25
8.49
36.25
44.74
7.10
43.35
8.61
43.35
51.96
6.58
49.93
8.76
49.93
58.69
7.52
57.45
8.09
57.45
65.54
5.71
63.16
8.91
63.16
72.08
Sum of wait
Server cost/min
Waiting cos/min
Total cost
Time
0.00
1.72
0.00
0.00
0.00
0.00
0.00
0.00
0.00
1.72
1
2
75.52
13
Discrete Event Simulation
Example 1 - A Simple Processing System
14
Discrete Event Simulation
Example 2 - Electronic Assembly/Test System





Produce two different sealed elect. units (A, B)
Arriving parts: cast metal cases machined to accept the
electronic parts
Part A, Part B – separate prep areas
Both go to Sealer for assembly, testing – then to Shipping
(out) if OK, or else to Rework
Rework – Salvaged (and Shipped), or Scrapped
15
Part A

Interarrivals: expo (5) minutes
 From arrival point, proceed immediately to Part A
Prep area


Process = (machine + deburr + clean) ~ tria (1,4,8)
minutes
Go immediately to Sealer

Process = (assemble + test) ~ tria (1,3,4) min.
 91% pass, go to Shipped; Else go to Rework

Rework: (re-process + testing) ~ expo (45)

80% pass, go to Salvaged; Else go to Scrapped
16
Part B

Interarrivals: batches of 4, expo (30) min.
 Upon arrival, batch separates into 4 individual
parts
 From arrival point, proceed immediately to Part B
Prep area


Process = (machine + deburr +clean) ~ tria (3,5,10)
Go to Sealer

Process = (assemble + test) ~ weib (2.5, 5.3) min.,
different from Part A, though at same station
 91% pass, go to Shipped; Else go to Rework

Rework: (re-process + test) = expo (45) min.

80% pass, go to Salvaged; Else go to Scrapped
17
Run Conditions, Output

Start empty & idle, run for four 8-hour shifts
(1,920 minutes)
 Collect statistics for each work area on

Resource utilization
 Number in queue
 Time in queue

For each exit point (Shipped, Salvaged, Scrapped),
collect total time in system (a.k.a. cycle time)
18
Simulation Models Are Beneficial

Systematic approach to problem solving
 Increase understanding of the problem
 Enable “what if” questions
 Specific objectives
 Power of mathematics and statistics
 Standardized format
 Require users to organize
19
Simulation Process
1.
Identify the problem
2.
Develop the simulation model
3.
Test the model
4.
Develop the experiments
5.
Run the simulation and evaluate results
6.
Repeat 4 and 5 until results are satisfactory
20
Different Kinds of Simulation

Static vs. Dynamic


Continuous-change vs. Discrete-change


Can the “state” change continuously or only at
discrete points in time?
Deterministic vs. Stochastic


Does time have a role in the model?
Is everything for sure or is there uncertainty?
Most operational models:

Dynamic, Discrete-change, Stochastic
21
Advantages of Simulation

Solves problems that are difficult or
impossible to solve mathematically
 Flexibility to model things as they are (even
if messy and complicated)
 Allows experimentation without risk to
actual system

Ability to model long-term effects

Serves as training tool for decision makers
22
Limitations of Simulation

Does not produce optimum solution

Model development may be difficult

Computer run time may be substantial

Monte Carlo simulation only applicable to
random systems
23
Fitting Probability Distributions to Existing Data
Data Summary
Number of Data Points
Min Data Value
Max Data Value
Sample Mean
Sample Std Dev
= 187
= 3.2
= 12.6
= 6.33
= 1.51
Histogram Summary
Histogram Range
Number of Intervals
= 3 to 13
= 13
24
ARENA – Input Analyzer
Distribution Summary
Distribution:Gamma
Expression: 3 + GAMM(0.775, 4.29)
Square Error:0.003873
Chi Square Test
Number of intervals
=7
Degrees of freedom
=4
Test Statistic
= 4.68
Corresponding p-value = 0.337
Kolmogorov-Smirnov Test
Test Statistic
= 0.0727
Corresponding p-value > 0.15
Data Summary
Number of Data Points
Min Data Value
Max Data Value
Sample Mean
Sample Std Dev
= 187
= 3.2
= 12.6
= 6.33
= 1.51
Histogram Summary
Histogram Range
Number of Intervals
= 3 to 13
= 13
25
Simulation in Industry
26
Course Conclusions




Recognize that not every tool is the best fit for every problem
Pay attention to variability
 Forecasting
 Inventory management - Deliveries from suppliers
Build flexibility into models
Pay careful attention to technology
 Opportunities


Improvement in service and response times
Risks
 Costs involved
 Difficult to integrate
 Need for periodic updates
 Requires training

Garbage in, garbage out
 Results and recommendations you present are only as reliable as the model and its
inputs

Most decisions involve tradeoffs
Not a good idea to make decisions to the exclusion of known information

27