You are on page 1of 28

SIMULATION AND MODELLING

By
Edwin Omol
CHAPTER ONE
CONTENT:
• Types of Simulation
• Variables in Simulation and Modelling
• Construction of a Simulated Model
• Monte Carlo Simulation
• Random numbers Selection
• Simple Queuing Simulation: Single server, single
channel "first come first served“ (FCFS) model
• Application of simulation models
SIMULATION
• Simulation can be defined as a technique that
imitates the operation as it evolves over time.
• It is basically a technique of conducting
experiments on a model of a system.
• Simulation model usually takes the form of a set
of assumptions about the operation of the
system, expressed as mathematical or logical
relations between the objects of interest in the
system.
HOW TO STUDY SYSTEMS:
• In order to study a system once it is defined,
two alternatives are available:-
i) To study the actual system itself and the other
ii) To construct the model of the system and
study the model
• Generally the study of the actual system has the
disadvantages of being time consuming, expensive and
/ or outright impossible (e.g. in a saw mill operation, it
would be extremely time consuming and costly to try
every possibility of cutting logs to maximize profit
Likewise it would be impossible to study a proposed
system without constructing some form of model.
• Consequently models most existing or proposed
systems are constructed and the models are analysed
how the actual system will react to change. However,
many realistic systems can't be modeled for solution
by the standard operation research methods.
Therefore some form of simulation must be used to
provide the solution.
EXAMPLES OF PROBLEMS
• Simulation is a general method which can-be
used to solve problems in many areas of
management such as
i) Inventory management
ii) Queuing problems
iii) Capital budgeting
iv) Project management
v) Profit planning (CVP analysis etc.)
DEFINITION OF TERMS IN SIMULATION
a) A System - a system can be defined as a collection of entities that act &
interact towards the accomplishment of some logical end. .
b) State of a system- This is the collection of the variables necessary' to
describe the status of the system at any given time. Systems are usually
classified as either discrete or continuous.
c) A discrete system is one which the state variable change only as discrete
or countable points in time
d) A continuous system- is one in which the state variables change
continuously over time
e) Dynamic simulation-Representation a system as it evolves-overtime.
f) Static simulation model- Representation of a system at a particular point
in time
g) Model –a model is a representation of the system and it usually takes
the form of a set of assumption about the operation of the system
TYPES OF SIMULATION MODEL
Static simulation model: This is a representation of
a system at a particular point in time.
Dynamic simulation model: This is a
representation of a system as it evolves over time.
Deterministic simulation model: This is a model
that contains No random variables.
Stochastic simulation model: This model contains
one or more random variables.
Discrete Vs Continuous Simulation Models
WHEN SIMULATION IS USED
i) When the assumptions made are unrealistic or
unattainable.
ii) When the system takes too long to observe e.g.
demographic / population issues(time compression
advantage)
iii) When, the cost and the danger of experimenting
with the real world situations is very high.
iv) Where there are difficulties in making
observations e.g. space research and practice.
Molecular research.
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
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 values 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 re-order level and re-order quantity.
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.' In an inventory simulation demand
and lead time 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 other types of 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 stock-out.
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 queuing,
demand will be probabilistic and variable 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 parameters although strictly speaking there is a
difference between the two concepts.
OUTPUT VARIABLES
• These are the results of the simulation. They arise
from the calculations and tests performed in the
model the input values of the controlled values.
The values derived for me probabilistic elements
and the specified parameters and status values.
The output variables must be carefully chosen to
reflect the factors which are critical to the really
system being simulated and they related to the
objectives of the really system.
Examples of Output Vaiables
•Cost of stock holding
•Number of stock outs
•Number of unsatisfied orders
•Number of replenishment orders
•Cost of the re-ordering and so on
CONSTRUCTING A SIMULATION MODEL

Some broad guidelines for constructing a simulation model


are:
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.
WHY THE STEPS?
• 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 probabilistic elements be
dealt with? How should the results be
presented?
EXAMPLES OF THE VARIABLES THAT MAY BE
USED IN SIMULATION
i) A set of prices and cost and the standard relationships
could be used to simulate profits
ii) The components of a queuing system such as the
arrival rates and the service rates could be used to
simulate a queuing system to generate such data as the
waiting time, the length of a queue and the problems of
a system being busy.
iii) In inventory management, variables such as demand
and the lead time can be used in simulation to generate
such cost data as the holding cost, shortage cost,
ordering cost
TYPES OF SIMULATION MODELS
• Simulation models are often broken into three
categories. The first, the Monte Carlo method
discussed below , uses the concept probability
distribution and random numbers to evaluate
system responses to various policies.
• The two other categories are called operational
gaming and system simulation. Although in
theory the three models are distinctly different,
the growth - of computerized simulation has
tended to create a common basis in procedures
and blur these differences.
MONTE CARLO SIMULATION
• This is a form of simulation that deals with the
allocation of random numbers. When a system
contains elements that exhibit chance in their
behavior, the method of Monte Carlo sampling /
simulation may be applied.
• The basis of this method is experimentation on
chance or probabilistic elements through
sampling,
STEPS IN MONTE CARLO SIMULATION
1. Set up probability distribution for the relevant random
variables
2. Build up cumulative probability distributing for each of
the variables in step 1.
3. Establish the intervals of the random numbers for
each variable and allocate the random number ranges,
4. Obtain the random numbers -random numbers can be
obtained from:
a) Random number tables
b) Calculators
c) Computers
Operational gaming
• Operational gaming refers to simulation involving two or more
competing players. The best examples are military games and
business games. Both all participants to match their management
arid decision-making skills in hypothetical situations of conflict
• Military games are used world-wide to train a nation's top military
officers, to test offensive and defensive strategies, and to examine
the effectiveness of equipment and armies.
• Business games, first developed by the firm Booz, Allen and Hamilton
in the 1950s, are popular with both executives and business
students. They provide an opportunity to test out business skills and
decision-making ability in competitive environment. The person or
team that performs best in the simulated environment is rewarded
by knowing that his or' her company has been most successful in
earning the largest profit, grabbing a high market share, or perhaps
increasing the firm's trading value on the stock exchange.
Systems Simulation
• Systems simulation is similar to business gaming in that it allows users to
test various managerial policies and decisions to evaluate their effect on
the operating environment. The variation of simulation models the
dynamics of large systems. Such systems include corporate operations,
the national economy, a hospital, or a city government system.
• In a corporate operating system, sales, production levels, marketing
policies, investments, union contracts, .utility rates, financing, and other
factors are ail related in a series of mathematical' equations that are
examined by simulation. In a simulation of an urban government,
systems simulation may be employed to evaluate the impact of tax
increase, capital expenditures for roads and buildings, housing
availability, new garbage routs. In migration and out-migration, locations
of new schools or senior citizens centers, birth and death rates and many
more vital issues. Simulation of economic systems, often called
econometric models are used by government agencies, bankers, 'and
large organizations to predict inflation rates, domestic and foreign money
THE ROLE OF COMPUTERS IN SIMULATION

1. It generates the random number


2. It simulates thousands of trials extremely fast,
accurately and reliably. A computer can also stock large
mass of data.
3. The computer simulates several combinations of the
decision variables e.g. the re-order quantity and the re-
order level in the inventory management or the service
channel and the service time in queuing model in a
matter of seconds.
4. It provides the management with printed reports
which are very useful for decision making.
RANDOM NUMBER AND THEIR
ALLOCATION
1. For uniform random number table, each unit has an equal chance
of occurring at any point in the table i.e. a uniform distribution.
2. For uniform random number table, each unit has an equal chance
of occurring at any point in the table i.e. a uniform distribution.
3. Each number is allocated once and only once.
4. The number allocated to a value of the random number is directly
proportional to the problem of that value. i.e.
a) Single decimal probability distribution are allocated 10 digits i.e.
from 0-9 or from 1 -0
b) Two decimal probability distribution are allocated 100 digits i.e.
from 00-99 or 01 -DO
c) Three decimal probability distribution are located 1000 digits i.e.,
from 000-999 or 001- 000 etc.
Advantages of simulation
1. Simulation is well suited to problems which are difficult or impossible to solve analytically
i.e. where main assumptions are unrealistic e.g., inventory management, queuing problems
and capital budgeting.
2. Simulation allows the analyst or the decision maker to experiment with the system behavior
in a controlled environment instead of the real life setting which can be very costly or has
inherent risks
3. It enables a decision maker to compress time in order to evaluate the long term effects of
various alternatives.
4. Simulation can serve as a mode of training decision makers by enabling them to observe the
behavior of a system under different circumstances without experimenting with the actual
system e.g. military and business training/ gaming.
5. Simulation has the order of being relatively free from complicated mathematics thus very
easy to understand for the operating personnel and for the non-technical managers.
6. Simulation models are comparatively flexible and can easily be modified to accommodate
the changing environment e.g. a company manager can try several policy options in a matter
of minutes
7. Simulation allows us to study the interactive effects of the individual components or
variables to determine which ones are important.
8. Recent advancements in the software make some simulation models to be very easy to
Disadvantages of simulation
1. Simulation is not precise i.e. it's not an approximation process and it does
not necessarily yield an optimal answer but merely provides a set of system
responses to the different operating conditions. In many cases, lacking
precession is difficult to measure. However, as the number of simulation
trials increases precision, increases provided that in the problem distribution
the relevant variables do not change.
2. A good simulation model may be expensive in terms of design personnel
(consultants, computing facilities software e.t.c.)
3. Simulation model is unique i.e. its solutions and inferences are not easily
transferred to the other problems thus further increasing the cost of
simulation.
4. Simulation can take time in terms of data collection and the designing of
the model and this could delay the decision making which is costly in the
long run.
5. In a number of situations it's not possible to quantify all the variables that

You might also like