0% found this document useful (0 votes)
10 views

Lesson38SimulationTheory

Thoery
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Lesson38SimulationTheory

Thoery
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Unit 5

SIMULATION THEORY

Lesson 38

Learning objectives:

• To learn to tackle a wide variety of problems by simulation.


• To understand the seven steps of conducting a simulation.
• Explain the advantages and disadvantages of simulation.

Why Simulation?
This is a fundamental and quantitative way to understand complex systems/phenomena
which is complementary to the traditional approaches of theory and experiment.
Simulation (Sim.) is concerned with powerful methods of analysis designed to exploit
high performance computing. This approach is becoming increasingly widespread in
basic research and advanced technological applications, cross cutting the fields of
physics, chemistry, mechanics, engineering, and biology.

What is Simulation?
Simulation means imitation of reality. The purpose of simulation in the business world is
to understand the behavior of a system. Before making many important decisions, we
simulate the result to insure that we are doing the right thing.

Simulation is used under two conditions.

• First, when experimentation is not possible. Note that if we can do a real


experiment, the results would obviously be better than simulation.

• Second condition for using simulation is when the analytical solution procedure
is not known. If analytical formulas are known then we can find the actual
expected value of the results quickly by using the formulas. In simulation we
can hope to get the same results after simulating thousands of times.
Simulation is basically a data generation technique. Sometimes it is time consuming to
conduct real study to know about a situation or problem. One useful application for
computers is the simulation of real life events that we consider to be partially or totally
random. An example is the simulation of the flow of customers into and out of a bank, to
help determine service requirements. The use of simulation frees the programmer and
user from having to observe a bank and keep track of exactly when each customer arrives
and leaves. A more familiar computer application of randomness is in computer games. If
the sequence of events in such a game were predetermined, the player would quickly
learn the sequence and become bored. One solution would be to have a large number of
games stored in the program, but this could take up an inordinate amount of memory
space. The usual solution is for the game program to choose its own moves at random.
Thus, simulation is used when actual experimentation is not feasible.

The meaning of the term Simulation can be best explained with a few illustrations. We
read and hear about Air force pilots being trained under simulated conditions. Since it
would be impossible to train a person when an actual war is going on, all the conditions
that would prevail during a war are reconstructed and enacted so that the trainee could
develop the skills and instincts that would be required of him during combat conditions.
Thus, war conditions are simulated to impart training.

Let us take another example of simulation. All automobile manufacturing companies


have a test-track on which the vehicles would be initially driven. The test-track would
ideally have all the bends, slopes, potholes etc., that can be found on the roadways on
which the vehicles would be subsequently driven. The test-track is therefore, a simulated
version of the actual conditions of the various roadways. Simulation, in general, means
the creation of conditions that prevail in reality, in order to draw certain conclusions from
the trials that are conducted in the artificial conditions. A vehicle manufacturer, by
driving the vehicle on the test-track, is conducting a trial in artificial conditions in order
to draw conclusions regarding the road-worthiness of the vehicle.

Simulation as an Approach to Decision Making

Decision-making involves choosing an action from several available alternatives. In a


business the idea is to choose the course of action which would in some sense optimize
the results obtained. While on one hand we may apply intuitive methods or subjective
methods based on 'hunches' or previous experiences and knowledge of the person taking
the decision on the other, we may apply quantitative or mathematical methods also to the
process of decision making in a business environment.

When quantitative or mathematical methods are applied, we may adopt two approaches.
They are,

(1) Analytical approach (covered under previous chapter of ‘Queuing) and

(2) Simulation
We will only use the word simulation, when a system has one or more random variables.
Changing parameters and analyzing a deterministic system is generally referred to as
sensitivity analysis.

The general procedure for simulation can be described as follows.

1. Make sure you understand all the variables involved in the system, how they
interact with one another, the input parameters of the system, and the performance
measures you are interested in calculating.

2. Prepare a cumulative probability distribution for each random variable. For well-
known distributions like Normal, it is enough to identify the parameters.

3. Generate simulated sample of required size, by repeating the following steps as


many times as necessary.

• Pick a random number between 0 and 1.

• For discrete distributions find the smallest X where the cumulative probability
> the random number. For continuous distributions, find X where area to the
left equals the random number.

4. Track, accumulate and report performance measures.

There Are Many Kinds of Simulations.

• This unit teaches the concepts of Monte Carlo simulation, but it also notes that
there are many physical kinds of simulation models as well.

• The idea of simulation is analogous whether we are conducting a wind tunnel


simulation or a math simulation.
Simulation

What it is & What it is not?

Simulation is Simulation is not

A technique which uses computers. An analytical technique


which provide exact
solution

An approach for reproducing the


processes by which events of
chance and change are created in
a computer A programming language
but it could be
programmed into a set of
commands that can form a
language to facilitate the
programming of
simulation.
A procedure for testing and
experimenting on models to answer
what if……….
Simulation Development
then so………
and ………
Major development steps of simulation process are:

1. Define problem
What is the problem? Has it been accurately defined?

2. Introduce important variables


What are the important variables? Have they been
introduced in the problem as defined above?

3. Construct model
Has a simulation model been constructed? Does it depict all
the features of the real-life situation?

4. Specify values to test


What are the values of variables to be tested? Has the range
of values been properly defined?

5. Conduct simulation
Has the model been simulated on the basis of pre-defined
criterion? Any deviations?

6. Examine results
Have the results of simulation been examined? Are they
OK? How many repeated runs have been conducted?

7. Select best plan.


Has the optimal solution been selected? Has it been
implemented?
Identify the Problem

Identify decision variables, performance


criterion and decision rules

Construct a simulation model

Validate the Model

Design experiments (specify values of


decision variables to be tested)

Modify the model by changing


Run or Conduct the the input data, i.e. values or
Simulation decision variables

NO
Is simulation process complete?

YES

Examine the results and select the best


course of action.

Steps in Simulation Process


Advantages of simulation Disadvantages of simulation
Relatively straightforward Requires generation of all conditions
and constraints of real-world problem
Can solve large, complex problems Each model is unique

Allows “what if” questions Often requires long, expensive process

Does not interfere with real-world systems Does not generate optimal solutions

Allows study of interactive variables

Allows time compression

Allows inclusion of real-world


complications

CONSTRUCTION OF A
MATHEMATICAL MODEL
The construction of a mathematical model for simulation can easily be understood
with the help of an example - discussed below:

The Bread-Seller Problem.


We try to discuss the formulation of a mathematical simulation model with the
help of the bread-seller problem. Consider a bread seller who has to decide on the number
of loaves of bread he must buy everyday so as to maximize his daily total profits. The
demand in this case is of a variable nature.

If the seller buys more units than he can sell, then the unsold bread is a waste,
reflecting loss to him. On the other hand, if he buys less units than the demand, then there
is an opportunity cost involved. i.e.; he losses the opportunity to sell additional units of
bread and hence his profit is not maximized.

Step I.
Suppose, the cost price per unit is Rs. 5 and the sales price per unit is Rs. 8.
Step II.
If demand exceeds the units bought, then the units sold is equal to the units bought.
However, if the demand for bread is less than the units bought by the bread-seller; then
the units sold is equal to the demand for it.
∴ Daily profit = (units sold x sales price per unit)
- (units bought by the bread - seller x Cost price per unit)
= 7 x units sold - 5 x units bought.

Step III.
Before analyzing the model, the value of daily demand for bread has to be generated. It
can be done in a number of ways. For convenience we assume that the bread-seller
follows the following approach:
He takes a box and fills it with 7 balls - each having a distinct number. To simulate a 7-
days (one week) demand, the seller draws one ball everyday from the box which is then
replaced back. The number marked on the ball determines his daily demand. Let us
assume that each ball has a distinct number - from 21 to 27. The bread-seller wishes to
know whether he must buy 23 units or 25 units everyday to maximize his profits.

Step IV.
The different buying strategies of the bread-seller can now be evaluated by simulating the
model:

Alternate I : Units bought : 23 Alternative II : Units bought : 25

Day Demand Units Units Daily Cumulative Units Units Daily Cumulative
brought sold profit profit brought sold profit profit
1 21 23 21 32 32 25 20 15 15
2 22 23 22 39 71 25 20 15 30
3 21 23 21 32 103 25 20 15 45
4 TI 23 23 46 149 25 20 15 60
5 25 23 23 46 195 25 23 36 96
6 26 23 23 46 241 25 23 36 132
7 27 23 23 46 287 25 23 36 168

In the given illustration, alternative 1 should be preferred by the bread seller,


since his total cumulative profits per week are more.

However, to be able to use the above result, the above experiment must be
repeated for many more days (in tens of thousands). As it becomes a very lengthy and
tedious process, involving much cost and time, the present day simulations are always
done with the help of a computer.
Step V.
Simulation Using Computers. The above experiment requires a large number of
repetitions to be of any use to the bread-seller decision-making. The bread-seller
generated his daily demand by using marked balls kept in a box. In simulations using
computers; the demand is generated with the help of random numbers.

A random number means a number which is equally likely to be drawn at random


from all the available choices. For example, all ten single digit numbers from 0 to 9 are
equally likely to be drawn from a box containing them. Hence, the probability of drawing
anyone of them is 1/10 or 0.10. Such random numbers can also be picked up from a
random number table, alternatively, these can be generated by using a completely
deterministic mathematical process such as the mid-square or the congruential method -
both of which are beyond the scope of our current discussion.

Use of Computers for Speedy Simulations

Computers are critical and have given life to the simulation process. Instead of
conducting simulation twenty or thirty times by hand, with computers we can run it
hundreds or thousands of times. This also ties in with the issue of time compression
mentioned earlier in the chapter.

Summary

To conclude I can say that simulation is needed in a situation where characteristics such
as uncertainty, complexity, dynamic interaction between the decision and subsequent
event, and need to develop detailed procedures & finely divided time intervals, combined
in one situation, it becomes too complex to be solved by any of the techniques of
mathematical programming and probabilistic models. It can be added that the simulations
technique is a dependable tool in situations where mathematical analysis is either too
costly or too complex.
Simulation
What Is Simulation?
• A model/process used to duplicate or mimic the real
system

Types of Simulation Models


• Physical simulation
• Computer simulation

When to Use (Computer) Simulation Models?


• Problems/systems are too complex
• There are random components in the system

Simulation
2

______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
__________________________________________________
Simulation
Benefits of Simulation Model
• It is relatively straightforward and generally easier
to understand
• It can answer “what-if” types of questions without
actually changing or building a real system
• It is generally cheaper and safer to experiment with
than a real system
Limitations
• It can be expensive and time consuming to develop
• It does not give optimal or exact solution to the
problem

Simulation
3

______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
______________________________________________________
__________________________________________________

You might also like