VISION INSTITUTE OF PROFESSIONALS
SIMULATION
Introduction
Simulation is a general method which can be used to solve problems in many areas of management such
as:
Inventory management
Queuing problems
Capital budgeting
Project management
Profit planning (c-v-p analysis) and so on.
It is usually used when the number of assumptions in a modeling exercise is large so that a number may
be violated.
Simulation is not an analytical technique, neither is it an optimization tool. An experiment is run and with
the results, statistical inferences are drawn about the general characteristics of the population.
Definition
Simulation can be defined as a quantitative technique which describes a process by developing a model of
that process and then conducts a series of organized trial and error experiments to predict the behaviour
of that process through time often with the aid of a computer.
When simulation is used.
1. Unrealistic or untenable assumptions.
2. When a system takes too long to observe e.g. demographic (population) issues (time compression
advantage)
3. Cost and danger of experimenting with real world situations
4. Difficulty of observation e.g. space research and particle (molecular) research
TYPES OF SIMULATION
1. Discrete Vs Continuous Simulations
Discrete - The relevant variables take on specific values i.e. there’s existence of gaps e.g.
number of units of a product which are demanded.
Continuous - The relevant variables take every value within a given range. These are
measurements of time, mass, weight or length. E.g. time a candidate takes to complete a 3
hour exam
2. Deterministic Vs Stochastic Simulations
Deterministic: - The factors or variables under consideration are known with certainty so that a
specific outcome is certain given a set of inputs e.g. in c-v-p under certainty, profit can be
simulated with certainty if we know price, costs and output.
Stochastic - Factors under consideration are not known, i.e. they are uncertain and hence they
are better treated as random variables.
Most simulations have at least one factor as uncertain e.g. in c-v-p analysis,
f Vc, fc, x, p
1
At least one of these is uncertain
3. Fixed Interval Vs Next event Simulations
Fixed interval - Within a given interval, we want to count the occurrences of a given variable
e.g. sales per day. In this case, day (time) is the fixed interval. Number of errors per page, in
this case, page (space) is the fixed interval.
Next-event simulation - The time or space when something happens next is the subject of
analysis. E.g. how long does the next machine take to break down? “How long” is the next
event.
Steps in Simulation
1. Define the problem
2. Identify the relevant decision variables
3. Formulate the model you intend to use
4. Specify values of the decision variables to be tested and collect the relevant data.
5. Test the model by comparing its behaviour with that of the actual problem environment i.e. run
the simulation trials.
6. Change the values of the decision variables in step 4 and run the trials again. This process is
repeated until the results approximate reality as closely as possible or until some other objective is
achieved, e.g.
* Weekly profit is maximized
* Daily cost is minimized and so on.
7. Make recommendations to management
Examples
i) A set of prices and costs and supply-demand relationships could be used to simulate profits
ii) The components of a queuing system such as arrival rates and service rates could be used to
simulate a queuing system to generate such data as waiting times, length of a queue, probability
of the facility being busy and so on.
iii) In inventory management, such variables as demand and lead time can be used in simulation to
generate such cost data as holding cost, shortage cost and ordering cost
MONTE – CARLO SAMPLING TECHNIQUE
This is a way of allocating random numbers. When a system contains
elements that exhibit chance in their behaviour, the method of Monte Carlo
sampling may be applied.
The basis of this method is experimentation on the chance or probabilistic
elements through sampling.
Steps
1. Set up probability distributions for the relevant random variables
2. Build a cumulative probability distribution for each variable in step 1.
3. Establish intervals of random numbers (RNs) for each variable and allocate the random number
ranges
4. Obtain the random numbers. These can be obtained from
(i) RN table
(ii) Calculators
(iii) Computers
5. Run the simulation trials
2
RNs and their Allocation
1. For the uniform RN table, each digit has an equal chance of occurring at any point in the table
(hence “uniform” distribution)
2. Each number or group of numbers is allocated once and once only.
3. The numbers allocated to a value of the random variable is directly proportional to the probability
of that value
4. (i) Single decimal probability distributions are allocated 10 digits i.e. from 0 to 9 or from 1 to 0
(ii) Two decimal probability distributions are allocated 100 digits i.e. from 00 – 99 or 01 – 00.
(iii) Three decimal probability distributions are allocated 1000 digits i.e.
from 000 - 999 or 001 - 000, and so on.
VARIABLES IN A SIMULATION MODEL
A business model usually consists of linked series of equations and formulae arranged so that they
‘behave’ in a similar manner to the real system being investigated. The formulae and equations use a
number of factors or variables which can be classified into 4 groups:
a) Input or exogenous variables
b) Parameters
c) Status variables
d) Output or endogenous variables.
These are described next.
Input variables
These variables are of two types: controlled and non-controlled.
Controlled variables
These are the variables that can be controlled by management. Changing the input values of the
controlled variables, and noting the change in the output results, is the prime activity of simulation. For
example, typical controlled variables in an inventory simulation might be the order quantity and the
reorder point. These could be altered and the effect on the system outputs noted.
Non-controlled variables
These are input variables which are not under management control. Typically these are probabilistic or
stochastic variables i.e they vary but in some uncontrollable, probabilistic fashion.
For example, in a production simulation the number of breakdowns would be deemed to vary in
accordance with a probability distribution derived from records of past breakdown frequencies or
subjectively. In an inventory simulation, demand and leadtime would also be generally classified as non-
controlled, probabilistic variables.
Parameters
These are also input variables which, for a given simulation, have a constant value. Parameters are
factors which help to specify the relationships between the variables. For example in a production
simulation, a parameter (or constant) might be the time taken for routine maintenance;
in an inventory simulation a parameter might be the cost of a stockout.
3
Status variables
In some types of simulation the behavior of the system (rates, usages, speeds, demand and so on) varies
not only according to individual characteristics but also according to the general state of the system at
various times or seasons. As an example, in a simulation of supermarket demand and checkout
queueing, demand will be probabilistic and varies on any given day but the general level of demand will
be greatly influenced by the day of the week and the season of the year. Status variables would be
required to specify the day(s) and season(s) to be used in a simulation.
Note: On occasions, status variables and parameters would both be termed just as parameters,
although strictly there is a difference between the two concepts.
Output variables
There are the results of the simulation. They arise from the calculations and tests performed in the
model, the input values for the controlled variables, the values derived from the probabilistic elements
and the specified parameters and status variables. The output variables must be carefully chosen to
reflect the factors which are critical to the real system being simulated and they must relate to the
objectives of the real system. For example, output variables for an inventory simulation would typically
include:
holding cost
number of stockouts
number of unsatisfied orders
number of orders made
ordering cost and so on
Constructing a simulation model
Some broad guidelines for constructing a simulation model are given below. These will be found useful for
dealing with examination questions but in this area especially, practice is vital.
Step 1: Identify the objective(s) of the simulation. A detailed listing of the results expected from
the simulation will help to clarify step 5 - the output variables.
Step 2: Identify the input variables. Distinguish between controlled and non-controlled variables.
Step 3: Where necessary determine the probability distribution for the non-controlled variables.
Step 4: Identify any parameters and status variables.
Step 5: Identify the output variables.
Step 6: Determine the logic of the model.
This is the heart of the simulation construction.
The key questions are: How are the input variables changed into output results? What formulae/decision
rules are required? How will the probabilistic elements be dealt with? How should the results be
presented?
ROLE OF COMPUTER IN SIMULATION
1. It generates random numbers
2. It simulates thousands of trials extremely fast, accurately and reliably.
A computer can also store large mass of data
4
3. A computer simulates several combinations of decision variables (e.g. order quantity and re-order
level in inventory management or one service channel and two service channels for queuing
system) in a matter of seconds
4. It provides management with printed reports which are very useful in decision making.
Advantages of Simulation
1. Simulation is well suited to problems which are difficult or impossible to solve analytically e.g.
where many assumptions are unrealistic e.g. in queuing problems, inventory management, capital
budgeting and so on.
2. It allows an analyst or decision maker to experiment with system behaviour in a controlled
environment instead of real life setting which can be very costly and has inherent risk.
3. It enables a decision maker to compress time in order to evaluate long term effects of various
alternatives
4. Simulation can serve as a mode for training decision-makers by enabling them to observe the
behaviour of a system under different conditions without experimenting with the actual system,
e.g. military and medical training.
5. Simulation has the advantage of being relatively free from complicated mathematics and thus it
can easily be understood by the operating personnel and non-technical managers. This helps in
getting the proposed plans accepted and implemented.
6. Simulation models are comparatively flexible and can be easily modified to accommodate the
changing environment.
With a computer, a manager can try out several policy options in a matter of minutes
7. Simulation allows us to study the interactive effect of individual components or variables to
determine which ones are important
8. Recent advances in software makes some simulation models very easy to develop.
Disadvantages of Simulation
1. Simulation is not precise. It is not an optimization process and does not necessarily yield an
optimal answer but merely provides a set of the systems responses to different operating
conditions. In many cases this lack of precision is difficult to measure. However as number of
simulation trials increases, precision increases provided the probability distribution of the relevant
variables does not change.
2. A good simulation model may be expensive in terms of
(i) design personnel (consultants).
(ii) computing facilities, especially software
3. A Simulation model is unique. Its solutions and inferences are not usually transferable to other
problems. This further increases the cost of simulation.
4. Simulation can take time in terms of:
(i) data collection
(ii) design of the model
This could delay decision making which is costly in the long run.
5
5. In a number of situations, it is not possible to quantify all the variables that affect the behaviour of
a system.
Overview of a Simulation Study in Practice
In deciding how to model a system, you will find that issues related to design and analysis and
representing the model in the software certainly are essential to a successful simulation study,
but they are not the only ingredients. We will take all this up in Chapter 13 in some detail, but
we want to mention briefly at this early point what is involved.
No simulation study will follow a cut-and-dried “formula,” but there are several aspects that do tend to
come up frequently:
o Understand the system. Whether it exists or not, you must have an intuitive, down-to-earth feel for
what is going on. This will entail site visits and involvement of people who work in the system on a
day-do-day basis.
o Be clear about your goals. Realism is the watchword here; do not promise the sun, moon, and
stars. Understand what can be learned from the study, and expect no more. Specificity about what is
to be observed, manipulated, changed, and delivered is essential. And return to these goals
throughout the simulation study to keep your attention focused on what is important, namely making
decisions about how best (or at least better) to operate the system.
o Formulate the model representation. What level of detail is appropriate? What needs to be
modeled carefully and what can be dealt with in a fairly crude, high level manner? Get buy-ins to the
modeling assumptions from management and those in decision -making positions.
o Translate into modeling software. Once the modeling assumptions are agreed upon, represent
them faithfully in the simulation software. If there are difficulties, be sure to iron them out in an open
and honest way rather than burying them. Involve those who really know what is going on (animation
can be a big help here).
o Verify that your computer representation represents the conceptual model faithfully.
Probe the extreme regions of the input parameters, verify that the right things happen with “obvious”
input, and walk through the logic with those familiar with the system.
o Validate the model. Do the input distributions match what you have observed in the field? Do the
output performance measures from the model match up with those from reality? While statistical tests
can be carried out here, a good dose of common sense is also valuable.
o Design the experiments. Plan out what it is you want to know and how your simulation
experiments will get you to the answers in a precise and efficient way. Often, principles of classical
statistical experimental design can be of great help here.
o Run the experiments. This is where you go to lunch while the computer is grinding merrily away, or
maybe go home for the night or the weekend, or go on vacation. The need for careful experimental
design here is clear. But don’t panic-your computer probably spends most of its time doing nothing,
so carrying out your erroneous instructions
6
o Does not constitute the end of the world (remember, you are going to make your mistakes on
the computer where they don’t count rather than for real where they do).
o Analyze your results. Carry out the right kinds of statistical analyses to be able to make accurate
and precise statements. This is clearly tied up intimately with the design of the simulation
experiments.
o Get insight. This is far more easily said than done. What do the results mean at the gut level? Does
it all make sense? What are the implications? What further questions (and maybe simulations) are
suggested by the results? Are you looking at the right set of performance measures?
o Document what you have done. You are not going to be around forever, so make it easier on the
next person to understand what you have done and to carry things further. Documentation is also
critical for getting management buy-in and implementation of the recommendations you have worked
so hard to be able to make with precision and confidence.
By paying attention to these and similar issues, your shot at a successful simulation project will be greatly
improved.