You are on page 1of 15

MODULE 6

CONCEPTS IN SIMULATION

A. Definition

Simulation, in the OR context, generally refers to a technique for conducting


experiments with a digital computer on a model of a management system over an
extended period of simulated time.
It is the process of designing a computerized model of a system and conducting
experiments with this model to the purpose of either:
¨ Understanding the behavior of the system.

¨ Evaluating the various strategies for the operation of the system.

B. Major Characteristics

1. Simulation imitates reality.


2. Simulation is a technique for conducting experiments.
3. Simulation is a descriptive rather than a normative tool; there is usually
no automatic search for an optimal solution.
4. Simulation is usually called for only when the problem under investigation is too
complex to be treated by analytical models or by numerical optimization
techniques. It is thus sometimes referred to as the “technique of last resort.”
C. Advantages

1. Simulation theory is relatively straightforward.


2. The simulation model is simply the aggregate of many elementary relationships
and interdependencies, much of which is introduced slowly by request of the
manager and in a patchwork manner.
3. Simulation is descriptive rather than normative. This allows the manager to
ask what-if questions (especially when used with an on-line computer). Thus,
managers who employ a trial-and-error approach to problem solving can do it
faster and cheaper with less risk, using the aid of simulation and computers.
4. An accurate simulation model requires an intimate knowledge of the problem,
thus forcing the management scientist (or OR expert) to constantly
interface with the manager.
5. The model is built from the manager’s perspective and in his or her decision
structure rather than the OR expert’s.
6. The simulation model is built for one particular problem and, typically, will
not solve any other problem. Thus, no generalized understanding is
required of the manager; every component in the model corresponds one to one
with a part of the real life system.
7. Simulation can handle an extremely wide variation in problem types such as

1
inventory and staffing, as well as higher managerial functions like long-
range planning. Thus, it is “always there” when the manager needs it.
8. The manager can experiment with different factors to determine which are
important and with different policies and alternatives to determine which
are the best. The experimentation is done with a model rather than by
interfering with the system.
9. Simulation, in general, allows for inclusion of the real-life complexities of
problems; simplifications are not necessary. For example: simulation utilizes
the real-life probability distributions rather than approximate theoretical
distributions.
10. Due to the nature of simulation, a great amount of time compression can
be attained, giving the manager some feel as to the long-term effects of
various policies, in a matter of minutes.
11. The great amount of time compression enables experimentation with a
very large sample (especially when computers are used). Therefore, as
much accuracy can be achieved as desired at a relatively low cost.
D. Disadvantages

1. An optimal solution cannot be guaranteed.


2. Constructing a simulation model is frequently a slow and costly process.
3. Solutions and inferences from a simulation study are usually not
transferable to other problems. This is due to the incorporation in the model
of the unique factors of the problems.
4. Simulation is sometimes so tempting to apply that analytical solutions that can
yield optimal results are often overlooked.
5. In contrast to real-world sampling, there may be model specification errors.

E. Areas of Simulation Application


Simulation is one of the most useful of all management science techniques. The
reason for this popularity is that simulation can be applied to a number of problems that
are to difficult to model and solve analytically. following are descriptions of some of the
most common applications of simulation.

Queuing

A major application of simulation has been in the analysis of queuing systems.The


assumptions required to solve the operating characteristic formulas are relatively
restrictive. For the more complex queuing systems, it is not possible to develop
analytical formulas, and simulation is often the only available means of analysis.

Inventory Control

Simulation is one of the few means for analyzing inventory systems in which demand
is a random variable, reflecting demand uncertainty.

Production and Manufacturing

2
Simulation is often applied to production problems, such as production scheduling,
production sequencing, assemble line balancing, plant layout, and plant location
analysis. it is surprising how often various production processes can be viewed as
queuing systems that can only be analyzed using simulation. Because machine
breakdown typically occur according to some probability distributions, maintenance
problems are also frequently analyzed using simulation.

Finance

Simulation has been used to generate values of the various contributing factors to
derive estimates of cash flows. Simulation has also been used to determine the
inputs onto rate of return calculations in which the inputs are random variables, such
as market size, selling price, growth rate, and market share.

Marketing

Simulation can be used to ascertain how a particular market might react to the
introduction of a product or to an advertising campaign for an existing product.
Another area in marketing where simulation is applied is the analysis of distribution
channels to determine the most efficient distribution system.

Public Service Operation

The operations of police departments, fire departments, post office, hospitals, court
systems, airports, and other public systems have been analyzed by using simulation.
Typically, such operations are so complex and contain so many random variables
that no technique except simulation can be employed for analysis.

Environmental and Resource Analysis

Simulation models have been developed to ascertain the impact on the environment
of projects such as nuclear power plants, reservoirs, highways, and dams. In many
cases, these models include measures to analyze the financial feasibility of the
project.

Management Science Application

Simulating a 10-km Race in Boulder, Colorado.


The boulder, a popular 10-kilometer race held each Memorial Day in Colorado,
attracts many of the world’s best runners among its 20,000 participants. The race
starts at the Bank of Boulder at the northeastern corner of the city., winds through
the city of the streets, and ends at the University of Colorado’s football stadium in
the center of the city. As the race grew in size (from 2,200 participants in 1979 to
20,000 in 1985), its quality suffered from over crowding problems, especially at the
finish line, where runners are individually tagged as they finish. Large waiting lines
built up at the finish line, causing many complaints from the participants.

3
To correct this problem, race management implemented an interval start system
in 1986, wherein 24 groups of up to 1,000 runners each were started at 1-minute
intervals. While this solution alleviated the problem of street crowding, it did not
solve the queuing problem at the finish line.

A simulation model of the race was then developed to evaluate several possible
solutions-specifically increasing the number of finish lines chutes from the 8 used
previously to either 12 or 15. The model was also used to identify a set of block-start
intervals that would eliminate finish line queuing problems with either chute
scenario. Recommendations based on the simulation model were for a 12-chute
finish line configuration and specific block-start intervals. The race conducted using
the recommendations from the simulation model was flawless. The actual race
behavior was almost identical to the simulation results. No overcrowding or queuing
problems occurred at the finish line. The simulation model was used to fine-tune the
1986 and 1987 races, which were also conducted with virtually no problem.

F. The Simulation Process

1. Problem definition—The real world problem is examined and classified. The


objectives of the system are studied.
2. Construction of the simulation model—This step involves gathering the
necessary data. If a simulation is to be conducted by a computer, a program is
written, often in a special computer language.
3. Testing and validating the model—The simulation model must properly
imitate the system under study. This requires validation.
4. Design of the experiment—Once the model has been proven valid, the
experiment is designed. Included in this step is determining how long to run the
simulation (when to stop the experiment) and whether to consider all the data or
to ignore the transient start-up data.
5. Conducting the experiments—This may involve issues such as random
number generation, stopping rules, and derivation of the results.
6. Evaluating the results—Here, we deal with issues such as: “What constitutes
a significance difference?” “What do the results mean?” In addition to statistical
tools, we may also use a sensitivity analysis. At this stage, we may even change
the model and repeat the experiment.
7. Implementation—The implementation of the simulation results involves the
same issues as any other implementation.

G. TYPES OF SIMULATION:

v Probabilistic simulation in this type of simulation, one or more of the


independent variables is probabilistic. That is, it follows a certain probability
distribution. Two subcategories are recognized:

4
§ Discrete distributions involve a situation with a limited number of
events (or variables that can only take a finite number of values).
§ Continuous distributions refer to a situation involving variables
with an unlimited number of possible values that follow density
functions such as the normal distributions.
v Time dependent and time independent simulation Time independent
refers to a situation where it is not important to know exactly when the event
occurred; otherwise, it is time dependent.
v Visual simulation The results of the simulation could now be seen in a graphic
display
v Business games These are the simulations of competitive decision making in
business which may also involve probabilistic simulation.
v Large system simulation These are complex simulations of corporations or
even national economies.

The Monte Carlo Process

The Monte Carlo technique can be narrowly defined as a technique for selecting
numbers randomly from a probability distribution (i.e. “sampling”) for use in a trial
(computer) run of a simulation. This is not a type of simulation model but rather a
mathematical process used within in simulation.

The name Monte Carlo is an appropriate because the basic principle behind the
process is the same as in operation of a gambling casino in Monaco. In Monaco such
devices as roulette wheels, dice, and playing cards are used. These devices produce
numbered results at random value from a population. For example, a 7 resulting from
thrown dice is a random value from a population of 11 possible numbers (i.e., 2 through
12). This same process is employed, in principle, in the Monte Carlo process used in
simulation models.

MONTE CARLO METHODOLOGY

The Monte Carlo process involves four steps:

1. Construct the cumulative probability distribution.


2. Assign a range of random numbers to describe the cumulative distribution.
3. Select or generate a random number (RN).
4. Project a corresponding random observation of the variable.

Note: Step 2 can be eliminated if you use the graphical approach in constructing the
cumulative probability distribution since the graph already provides the RN range
assignments.

5
EXAMPLES:

1. To use an old statistical example for simulation, if an urn contains 100 balls, of which
10% are green, 40% are green, and 50% are spotted, develop a simulation model of
the process of drawing balls at random from the urn. Each time a ball is drawn and
its color is noted, it is replaced. Use the following random number as you desire.

Simulate drawing 10 balls from the urn. Show which numbers you have used.
26768 66954 83125 08021
42613 17457 55503 36458
95457 03704 47019 05752
95276 56970 84828 05752

SOLUTION

COLOR CUM. PROB. RANDOM NOS.


GREEN (G) 0.10 00-09
RED (R) 0.50 10-49
SPOTTED (S) 1.00 50-99

SIMULATION RUN NO. 1:


RANDOM NOS. COLOR RANDOM NOS. COLOR
76 S 45 R
61 S 70 S
45 R 97 S
27 R 12 R
95 S 50 S

The first simulation run resulted into 6 spotted and 4 red balls.

SIMULATION RUN NO. 2:


RANDOM NOS. COLOR RANDOM NOS. COLOR
26 R 17 R
42 R 03 G
95 S 56 S
95 S 83 S
66 S 55 S

The second simulation run resulted into 1 green, 3 red, and 6 spotted balls.

6
2. A rural clinic receives a delivery of fresh plasma once each week from a central
blood bank. The supply varies according to demand from the other clinics and
hospitals in the region but ranges between four and nine pints of the most
widely used blood type, type O. the number of patients per week requiring this
blood varies from zero to four, and each patient may need from one to four
pints. Given the following delivery quantities, patient distribution , and demand
per patient, what would be the number of pints in excess or short for a six-week
period? Use simulation to derive your answer. Consider that plasma is storable
and there is currently none on hand.

Delivery No. of Patients Patient Demand


Pints Cum. Prob. RN Blood Cum. Prob. RN Pints Cum. Prob. RN
4 0.15 00-14 0 0.25 00-24 1 0.40 00-39
5 0.35 15-34 1 0.50 25-49 2 0.70 40-69
6 0.60 35-59 2 0.80 50-79 3 0.90 70-89
7 0.75 60-74 3 0.95 80-94 4 1.00 90-99
8 0.90 75-89 4 1.00 95-99
9 1.00 90-99

SOLUTION
SIMULATION RUN NO. 1
Qty. Patients Qty.
Delivered Needing Needed
Blood
Week Beg. RN Pts. Total RN Patient Patient RN Pints No. of Pints
no. Invty. Blood Remaining
on
Hand
1 0 56 6 6 10 0 6
2 6 52 6 12 04 0 12
3 12 54 6 18 72 2 1st 50 2 16
2nd 23 1 15
4 15 08 4 19 83 3 1st 85 3 16
2nd 60 2 14
3rd 44 2 12
5 12 66 7 19 72 2 1st 69 2 17
2nd 59 2 15
6 15 08 4 19 55 2 1st 21 1 18
2nd 02 1 17
At the end of six weeks, there are 17 pints of blood on hand.

7
SIMULATION RUN NO. 2
Qty. Patients Qty.
Delivered Needing Needed
Blood
Week Beg. RN Pts. Total RN Patient Patient RN Pints No. of Pints
no. Invty. Blood Remaining
on
Hand
1 0 74 7 7 85 3 1st 21 1 6
2nd 06 1 5
3rd 71 3 2
2 2 31 5 7 28 1 96 4 3
3 3 02 4 7 72 2 1st 12 1 6
2nd 67 2 4
4 4 53 6 10 44 1 23 1 9
5 9 16 5 14 16 0 14
6 14 40 6 20 83 3 1st 65 2 18
2nd 34 1 17
3rd 82 3 14

At the end of 6 weeks, there were 14 pints on hand.

Simulation Experimentation: A Preview

The following is a list of the eight steps involved in the simulation


experimentation (including Monte Carlo):
1. Describe the system and obtain the probability distributions of the relevant elements
of the system. This is a crucial step requiring intimate familiarity with the system.
2. Define the appropriate measure(s) of system performance. If necessary, write it in
the form of an equation(s).
3. Construct a cumulative probability for each of the stochastic elements.
4. Assign representative numbers in correspondence with the cumulative distributions.
5. For each probabilistic element, take a random sample (generate a number at
random or pick one from a table of random numbers).
6. Derive the measures of performance and their variances.
7. If steady-state results are desired, repeat steps 5 and 6 until measure of
performance “stabilize” .
8. Repeat steps 5-7 for various managerial policies. Given the values of the
performance measures and their confidence intervals, decide on the appropriate
managerial policy.

8
Simulation Experimentation: A Preview
(Simulation of a Queuing System)

Manufacturing firms use a central to lend out tolls to employees. Consider a


typical situation with one clerk in the toolroom. Two different types of employees are
served by it: production employees and maintenance employees. Each has a different
rate of arrival, as shown in Table 1. The number of employees in both groups is large
enough so that the source of arrivals may be assumed infinite.
Currently, the production employees have priority over the maintenance
employees, that is, a production employee will always be placed at the head of the
waiting line. However, if a maintenance employee is being served, the service will
continue uninterrupted (i.e., the production employee has a regular priority and not a
“preemptive” priority over the maintenance employee).

Table 2 gives the distribution of service times, assuming that service can take
only three values: 0.10, 0.20, 0.30 hours. The table also includes the assigned numbers
required for the simulation.

The toolroom clerk earns P400 per hour. A production employee earns P500 per
hour, and a maintenance employee earns P600 per hour. The problem is to find the
number of clerks in the toolroom. Management also wishes to know if the existing
priority system should be maintained. Simulate for 10 hours operations.

Table 1. The Arrival Rates


Production Rates Maintenance Employees
Time between Time between
Assigned
arrivals arrivals Assigned
numbers
(hours) Probability (hours) Probability Numbers
0.20 0.40
0
0.30 0.1 0.60 0.25 00-24
1
0.50 0.1 1.00 0.60 25-84
2-5
0.80 0.4 0.15 85-99
6-8
1.00 0.3
9
0.1

Table 2. Service Times


Length of service time Assigned
(hours) Probability number
0.10 1/3 000-332
0.20 1/3 333-665
0.30 1/3 666-998

9
SOLUTION

Table 1: Generating arrivals (number 1 arrives at time zero, 7:00 a.m.)

Production employees Maintenance employees


Arrival Random Time
between Clock Random Time
between Clock
number number arrivals time number arrivals time
(hours) (hours)
2 5 7:30 52 7:36
3 2 .5 8:00 02 .6 8:00
4 0 .5 8:12 73 .4 8:36
5 2 .2 8:42 48 .6 9:12
6 7 .5 9:30 06 .6 9:36
7 3 .8 10:00 15 .4 10:00
8 4 .5 10:30 94 .4 11.:00
9 8 .5 11:18 12 1.0 11:24
10 0 .8 11:30 95 .4 12:24
11 6 .2 12:18 87 1.0 1:24
12 1 .8 12:36 04 1.0 1:48
13 5 .3 1:06 99 .4 2:48
14 9 .5 2:06 40 1.0 3:24
15 4 1.0 2:36 98 .6 4:24
.5 1.0

Table 2: Generating 30 services


Service Length of Service Length of service
number RN service (hours) number RN (hours)
1 782 .3 16 978 .3
2 309 .1 17 477 .2
3 194 .1 18 752 .3
4 308 .1 19 016 .1
5 421 .2 20 579 .2
6 392 .2 21 260 .1
7 283 .1 22 241 .1
8 682 .3 23 643 .2
9 871 .3 24 056 .1
10 744 .3 25 861 .3
11 244 .1 26 565 .2
12 773 .3 27 029 .1
13 264 .1 28 970 .3
14 283 .1 29 958 .3
15 879 .3 30 713 .3

10
Simulation for 10 hours operations:

Arrivals Prod. Maint. Waiting time


Service Service
P.E. Clock M.E. Clock Wait Wait
Emp. Time Time Start End Start End due to due to
No. P S
(min) (min)
1 7:00 7:00 7:00 7:18 7:18 7:24 18
2 7:30 7:36 7:30 7:36 7:36 7:42
3 8:00 8:00 8:00 8:12 8:24 8:30 24
4 8:12 8:36 8:12 8:24 8:36 8:54
5 8:42 9:12 8:54 9:10 9:12 9:30 12
6 9:30 9:36 9:30 9:36 9:36 9:54
7 10:00 10:00 10:00 10:06 10:06 10:12 6
8 10:30 11:00 10:30 10:48 11:00 11:18
9 11:18 11:24 11:18 11:30 11:48 11:54 24
10 11:30 12:24 11:30 11:48 12:30 12:36 6
11 12:18 1:24 12:18 12:30 1:24 1:30
12 12:36 1:48 12:36 12:42 1:48 2:06
13 1:06 2:48 1:06 1:18 2:48 3:06
14 2:06 3:24 2:06 2:18 3:24 3:42
15 2:36 4:24 2:36 2:48 4:24 4:42

Measures of System Effectiveness:

1. Arrivals. Fifteen production and maintenance employees arrived each, or an average


of 15/10 = 1.5 each hour for both.

2. Service. All 30 arrivals were served. The total service time was 6 hours. This means
that the toolroom clerk was busy 6/10 = 60 percent of the time. The average service
time was 6/30 = 0.2 hour.

3. Probability of waiting. Of the 15 maintenance workers, 5 had to wait for service.


Thus, the probability of a maintenance worker having to wait is 5/15 = 33.33
percent. There was only one production employee out of 15 (3.06 percent probability)
who had to wait.

4. Length of wait. Total waiting time was 1.5 hours. Thus, on the average, an employee
waited 1.5/30 = 0.05 hour (three minutes). However, the average waiting time for a
maintenance employee was 1.3/15 = 0.08 hour, versus 0.2/15 = 0.013 hour for a
production employee.

11
5. The total cost of waiting.

For production employees = 0.2 x P500 = P100, for the 10-hour period

For maintenance employees = 1.3 x P600 = P780


Total P880

Waiting cost per hour = 880/10 = P88

6. Priorities. In five cases (33.33 percent of all maintenance employees), priorities were
utilized by the production employees.

Simulation Experimentation: A Preview


(Simulation of a Machine Breakdown and Maintenance System)

In this example we will demonstrate the use of a continuous probability distribution.


The Bigelow Manufacturing Company produces a product on a number of machines. The
elapsed time between breakdowns of the machine is defined by the following continuous
probability distribution:
weeks
where
x = weeks between machine breakdown
As indicated in the previous section on continuous probability distributions, the
equation for generating x, given the random number r1, is

X=
When machine breaks down, it must be repaired, and it takes either 1, 2, or 3 days
for the repair to be completed, according to the discrete probability distribution shown in
Table 1. Every time a machine breaks down, the cost to the company is an estimated
$2,000 per day in lost production until the machine is repaired.

Table 1 Probability distribution of machine repair time


Machine Repair Time, Probability of Repair Cumulative Random Number
y (days) Time, P(y) Probability Range, r2
1 .15 .15 .00-.15
2 .55 .70 .16-.70
3 .30 .100 .71-1.00

The company would like to know whether 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. The maintenance program would result in the
following continuous function for time between breakdowns:

12
f(x) = x/18, 0 ≤ x ≤ 6 weeks
where

x = weeks between machine breakdowns

The equation for generating x, given the random number r1, for this probability
distribution is

X=6

The reduced repair time resulting from the maintenance program is defined by the
discrete probability shown in Table 2.

Table 2 Revised probability distribution of machine repair time with the maintenance
program
Machine Repair Probability of Repair Cumulative Random Number
Time, y (days) Time, P(y) Probability Range, r2
1 .40 .40 0.00-.40
2 .50 .90 .41-.90
3 .10 1.00 .91-1.00

To solve this problem, we must first simulate the existing system to determine an
estimate of the average annual repair costs. Then we must simulate the system with the
maintenance program installed to see what the average annual repair costs will be with
the maintenance program. We will compare the average annual repair cost without the
maintenance program and compute the difference, which will be the average annual
savings in repair costs with the maintenance program. If this savings is more than the
annual cost of the maintenance program ($20,000), we will recommend that if be
implemented; if it is less, we will recommend that it not be implemented.
First, we will manually simulate the existing breakdown and the repair system without
the maintenance program, to see how the simulation model is developed. Table 3
illustrates the simulation of machine breakdowns and repair for 20 breakdowns, which
occur over a period of approximately 1 year (i.e., 52 weeks).

13
Table 3—Simulation Run
Time Between Repair Cumulative
Breakdowns, x Time, Cost, Time,
Breakdowns r1 (weeks) r2 y $2,000y (weeks)
(days)
1 .45 2.68 0.19 2 $4,000 2.68
2 .90 3.80 0.65 2 4,000 6.48
3 .84 3.67 0.51 2 4,000 10.15
4 .17 1.65 0.17 2 4,000 11.80
5 .74 3.44 0.63 2 4,000 15.24
6 .94 3.88 0.85 3 6,000 19.12
7 .07 1.06 0.37 2 4,000 20.18
8 .15 1.55 0.89 3 6,000 21.73
9 .04 .80 0.76 3 6,000 22.53
10 .31 2.23 0.71 3 6,000 24.76
11 .07 1.06 0.34 2 4,000 25.82
12 .99 3.98 0.11 1 2,000 29.80
13 .73 3.94 0.27 2 4,000 33.74
14 .13 3.42 0.10 1 2,000 37.16
15 .03 1.44 0.59 2 4,000 38.60
16 .62 .70 0.87 3 6,000 39.30
17 .47 3.15 0.08 1 2,000 42.45
18 .99 2.74 0.08 1 2,000 45.19
19 .75 3.98 0.89 3 6,000 49.17
20 3.46 0.42 2 4,000 52.63
$84,000

14
The next step in our simulation analysis is to simulate the machine breakdown
and repair system with the maintenance program installed.
Time
BREAKDOWNS R1 Between R2 Repair Cost, Cumulative
Breakdowns, Time, $2,000y Time,
x (weeks) y (days) Ex (weeks)

1 0.45 4.03 0.19 1 $ 2,000 4.03


2 0.90 5.69 0.65 2 4,000 9.72
3 0.84 5.50 0.51 2 4,000 15.22
4 0.17 2.47 0.17 1 2,000 17.69
5 0.74 5.16 0.63 2 4,000 22.85
6 0.94 5.82 0.85 2 4,000 28.67
7 0.07 1.59 0.37 1 2,000 30.29
8 0.15 2.32 0.89 2 4,000 32.58
9 0.04 1.20 0.76 2 4,000 33.78
10 0.31 3.34 0.71 2 4,000 37.12
11 0.07 1.59 0.34 1 2,000 38.71
12 0.99 5.97 0.11 1 2,000 44.68
13 0.97 5.91 0.27 1 2,000 50.59
14 0.73 5.12 0.10 1 2,000 55.71
$ 42,000

However, let us now concern ourselves with the potential difficulties caused by
the fact that we simulated each system only once. Because the time between
breakdowns and the repair times are probabilistic, the simulation results could exhibit
significant variation.

Statistical Analysis of Simulation Results

In general, the outcomes of a simulation model are statistical measures such as


averages, as in the examples presented earlier. Thus, as a part of the simulation
process, these statistical results are typically subjected to additional statistical analysis to
determine their degree of accuracy.

One of the most frequently used tools for the analysis of the statistical validity of
simulations results is confidence limits.

15

You might also like