You are on page 1of 27

MEP 328 :

Modeling & Simulation


Lab

Department of Mechanical Engineering


Malaviya National Institute of Technology Jaipur
System: Collection of entities interacting to achieve a common
objective or logical end.

Model: A simplified description of a system, situation or process, often


in mathematical terms devised to facilitate calculation and prediction.
Physical model
Logical (Mathematical) model

Simulation: A simulation generally refers to a computerized version of


the model which is run over time to study the implications of the defined
interactions.

Simulator: An apparatus for reproducing the behavior of some


system.
SIMULATION
The technique of imitating the behavior of some
situation or system by means of an analogous model
apparatus either to gain information or to train
personal.
To simulate is to try to duplicate the characteristics of a
real system
We will study mathematical simulation models of real
systems to help make business decisions
Simulation is one of the most widely used decision
modeling techniques
The Process of Simulation
Advantages of Simulation
1. Flexibility
2. Can handle large and complex systems
3. Can answer what-if questions
4. Does not interfere with the real system
5. Allows study of interaction among
variables
6. Handles complications that other
methods cant
Limitations of Simulation
1. Can be expensive and time consuming
2. Does not generate optimal solutions
3. Managers must choose solutions they
want to try (what-if scenarios)
4. Each model is unique
Monte Carlo Simulation
It is a simulation technique in which statistical
distribution function are created by using a
series of random numbers.
Steps:
1. Determine the probability distribution for each
random variable
2. Use random numbers to generate random values
3. Repeat for some number of replications
Random Variables (RVs)
There are many random variables in real life
where there is uncertainty, such as:
Product demand
Lead time for orders
Time between equipment breakdown
Service time
Etc.
Step 1: Determine the Probability
Distribution for Each RV
There are many different probability
distributions (e.g. general discrete,
normal, Poisson, uniform, exponential,
binomial, etc.)

Usually use historical data to determine


which distribution fits best
Harrys Auto Shop Example
Want to simulate monthly demand for tires
Have data on past 60 months
Step 2: Use Random Numbers
to Generate Random Values
Random numbers are where all values
are equally likely
Rolling a single die generates random
numbers between 1 and 6
Using two-digit random numbers (00 to 99)
the probability of each is 1/100 or 0.01
Random numbers can be come from a
computer, a table, a roulette wheel, etc.
Random Number Intervals
for Harrys Auto Shop
Step 3: Replication of the Simulation

Repeatedly draw a random number and


determine the demand for a particular
month
A simulation must be replicated (or
repeated) many times to cover the full
range of variability and obtain meaningful
results
Role of Computers in Simulation
The Harrys example was done by hand
Computers are much faster
Software packages have built-in
procedures for a variety of probability
distributions
Simulation Software Packages
General purpose languages
(Visual Basic, C++, Fortran, etc.)

Special purpose languages and programs


(ARENA, GPSS, Simscript, Microsaint, BuildSim)

Spreadsheet models
Queuing Example
A shop has a clerk serving customers. The time between
arrival of customers varies between 1 to 5 minutes. The
service time varies between 1 to 3 minutes. Frequency
distribution of both are given:
Time between Frequency Service Time Frequency
Arrivals (Mins) (%) (Mins) (%)
1 35 1 20
2 25 1.5 35
3 20 2 25
4 12 2.5 15
5 8 3 5

Use the following random numbers to simulate the problem:


Arrival 48 51 06 22 80 56 6 92 51 13 65 60 51 50 30 94 57 26 78 33

Service 22 62 25 31 23 07 93 44 12 26 93 01 17 49 58 98 61 41 13 59

16
Step 1: Decide on number of arrivals to be simulated.

Step 2: Allocate Random Number to inter-arrival time and


service time.

Step 3: Simulate the arrivals using Random Numbers.

Step 4: Construct table to do the calculations.

17
Random Number Allocation
Time between Frequency Cumulative Random
Arrivals (Mins) (%) Frequency Numbers (00-99)
1 35 35 00-34
2 25 60 35-59
3 20 80 60-79
4 12 92 80-91
5 8 100 92-99

Service Time Frequency Cumulative Random


(Mins) (%) Frequency Numbers (00-99)
1 20 20 00-19
1.5 35 55 20-54
2 25 80 55-79
2.5 15 95 80-94
3 5 100 95-99
18
20
SIMULATION OF INVENTORY SYSTEMS

Question 1: After studying the weekly receipt and payments over the past 200
weeks, a retailer has developed the following info.

Weekly Probability Weekly Probability


receipt (Rs.) Payments (Rs.)

3000 0.2 4000 0.3


5000 0.3 6000 0.4
7000 0.4 8000 0.2
12000 0.1 10000 0.1

RN Receipt 3 91 38 55 17 46 32 43 69 72 24 22
RN Payment 61 96 30 32 3 88 48 28 88 18 71 99

21
Using the above set of RN, simulate the weekly pattern receipts &
payments for the 12 weeks of the next quarter.

A. Assume further that the opening balance is Rs. 8000. What is the
estimated balance at the end of 12 weeks.
B. What is the highest weekly balance during the quarter.
C. What is the average weekly balance for the quarter.

22
Step 1: Decide on number of arrivals to be simulated.

Step 2: Allocate Random Number to inter-arrival time and service time.

Step 3: Simulate the arrivals using Random Numbers.

Step 4: Construct table to do the calculations.

23
1. Assignment of random number:

For Weekly Receipts


WR P CP RN
3000 0.2 0.2 00-19
5000 0.3 0.5 20-49
7000 0.4 0.9 50-89
12000 0.1 1.00 90-99

For Weekly Payments


WP P CP RN
4000 0.3 0.3 00-29
6000 0.4 0.7 30-69
8000 0.2 0.9 70-89
10000 0.1 1.00 90-99
24
2. Simulation Worksheet:

Week No. Receipts Payments Balance (Rs.)


Opening 8000
RN Amount RN Amount

1 3 3000 61 6000 5000


2 91 12000 96 10000 7000
3 38 5000 30 6000 6000
4 55 7000 32 6000 7000
5 17 3000 3 4000 6000
6 46 5000 88 8000 3000
7 32 5000 48 6000 2000
8 43 5000 28 4000 3000
9 69 7000 88 8000 2000
10 72 7000 18 4000 5000
11 24 5000 71 8000 2000
12 22 5000 99 10000 -3000
25
Answer:

A. Estimated balance at the end of 12 weeks : -3000 Rs.

B. Highest weekly balance during the quarter: Rs. 7000 in week 2 & 4.

C. Average weekly balance for the quarter: Rs. 3750.

26
Thank You!!!

You might also like