SIMULATION

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

SIMULATION

Prof. A.A.THAKRE
Assistant Professor
Dept. of Mechanical Engineering
VNIT NAGPUR
V NIT NAGPUR

………………………………………………………………………………………..
V NIT NAGPUR

To simulate means to imitate the reality.


Simulation involves developing a model of some real
system and performing sampling experiments on the
model rather than real system itself.
e.g. wind tunnel to study the aerodynamic property of
airplane.
Children cycling park, with various crossing and
signal, is a simulated model of city traffic system.
Simulation is important tool for so many situations
which can’t be represented mathematically due to
complexity of the problem or conflicting ideas needed to
properly describe the problem under study.
V NIT NAGPUR

1. “Simulation” is the process of designing a model of real


system and conducting experiments with this model for the
purpose of understanding the behavior (within the limits
imposed by criteria) for the operation of system.
2. It can also be defined as numerical technique for conducting
experiments on digital computer which involves certain types of
mathematical and logical relationship necessary to describe the
describe the behavior and structure of a complex real world
system over extended period of time.

Important strength of simulation is its ability to inter-link


various probabilistic strands of a situation.
e.g. random arrivals to queue may be linked to random
availability of service. Such situation requires a simulation of
the randomness of real world.
V NIT NAGPUR

Most common and economical way is to generate Random Numbers.


1. One of the following number is picked randomly satisfying the
criterion i.e. equal probability of selection of numbers.
0 1 2 3 − − − 9
Repeated selection of these numbers satisfying the above criterion
will generate the sequence of random numbers.
2. Random number tables stored in computer memory.
3. Electronic Device [Calculator :Press [Shift +RAN#]
4. Generation of Pseudo-Random Numbers
1. Mid Square Method 2421 (05861241)
8612 (74166544)
1665 (02772225)
2. Congruential Method -
(a, b, m = constants) xn +1 = (axn + b)(modulo)m
V NIT NAGPUR
V NIT NAGPUR

● Traffic light timing


● Pilot training
● Planning military
● Video games, computer games
● Scheduling of aircraft
● Assembling line balancing
● Most wide application is NDT.
V NIT NAGPUR

[1] Many important managerial decision problems that


are too intricate to be solved by mathematical
programming and experimentation with the actual
system ,even if possible , is too costly and risky.
Simulation offers the solution by allowing
experimentation with the model of system without
interfering with the real system.

[2] Through simulation, management can foresee the


difficulties which may come up due to introduction of
new machines, equipments and process.
V NIT NAGPUR

[3] It has an advantage of being flexible and can


be modified to accommodate the changing
environments of real situations.

[4] It has been used for training the operating


and managerial staff in the operation of
complex plans. It is always advantageous to
train people on simulated model before putting
into their hands on real system.
V NIT NAGPUR

● Simulation does not produce optimum results when


the model deals with uncertainties the results are
reliable approximation subject to statistical errors.
● Quantification of variables is another difficulty.
● In very large and complex problems the large number
of variables and interrelation between them make the
problem very hard to program.
● Simulation is by no means cheap method of analysis.
In so many situations, simulation is costlier and time
consuming.
V NIT NAGPUR
V NIT NAGPUR

How to generate Random Numbers


V NIT NAGPUR

Problems

Q.[1] Customers arrives at a retail sales depot in random fashion


at a rate of 15 customers per hour. The service time is normally
distributed with a mean 3 minutes and a standard deviation of 1
unit. Using Monte Carlo simulation technique estimate the
average waiting time and find out the probability that customer
has to wait for more than 5 minutes. Simulate for the 10 arrivals.
V NIT NAGPUR

Random Inter Absolute Random Z Service Service Service Waiting


Number arrival Arrival Number value Time Start End Time
Set 1 Time Time Set 2 (min.) Time Time (min)
(min.) (min.) (min) (min)
0.711 1.364 1.364 0.765 0.72 3.72 1.36 5.08 0

0.356 4.131 5.495 0.607 0.27 3.27 5.495 8.765 0

0.189 4.604 12.15 0.970 1.9 4.9 12.15 17.05 0

0.347 4.233 16.38 0.354 -0.37 2.63 17.05 19.68 0.67

0.982 0.0726 16.45 0.145 -1.06 1.94 19.68 21.62 3.23

0.597 2.063 18.51 0.341 -0.41 2.59 21.62 24.21 3.11

0.735 1.2313 19.74 0.857 1.07 4.07 24.21 28.28 4.47

0.916 0.351 20.09 0.728 0.61 3.61 28.28 31.89 8.19

0.069 10.695 30.78 0.757 0.7 3.7 31.89 35.59 1.11

0.59 2.1105 32.89 0.425 -0.19 2.81 35.59 38.4 2.7


V NIT NAGPUR

Q.[2] Customers arrives at a retail sales depot in random fashion


at a rate of 20 customers per hour. The service time is normally
distributed with a mean 2 minutes and a standard deviation of 1
unit. Estimate the average percentage customer waiting time &
average percentage idle time of the server by the simulation for
the next 10 arrivals.
V NIT NAGPUR

Random Inter Absolute Random Z Service Service Service Waiting Idle


Number arrival Arrival Number value Time Start End Time Time
Set 1 Time Time Set 2 (min.) Time Time (min) (min)
(min.) (min.) (min) (min)

0.1234 0.4678
0.0227 0.8836
0.0152 0.0748
0.031 0.595
0.061 0.4025
0.721 0.2006
0.9841 0.024
0.8452 0.076
0.4363 0.776
0.0357 0.2176
V NIT NAGPUR

Q.[3] A sample for 100 arrivals of customers at a retail sales depot is


according to the following distribution:
Time between arrivals(min.) 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Frequency 2 6 10 25 20 14 10 7 4 2

A study of time required to serve customers by adding up the bills,


receiving payments, placing packages, etc. yields the following
distribution:
Service time(min.) 0.5 1 1.5 2 2.5 3

Frequency 12 21 36 19 7 5

Estimate the average percentage customer waiting time & average


percentage idle time of the server by the simulation for the next 10
arrivals.
V NIT NAGPUR

SOLUTION :
TABLE-I TABLE-II

Time between Frequency Cumulative Service Frequency Cumulative


arrivals (min.) Frequency time(min.) Frequency

0.5 2 0.02 0.5 12 0.12


1 6 0.08 1 21 0.33
1.5 10 0.18 1.5 36 0.69
2 25 0.43 2 19 0.88
2.5 20 0.63 2.5 7 0.95
3 14 0.77 3 5 1
3.5 10 0.87
4 7 0.94
4.5 4 0.98
5 2 1
V NIT NAGPUR

Random Inter Absolute Random Service Service Service Waiting Idle


Number arriaval Arrival Number Time Start End Time Time
Set 1 Time Time Set 2 (min.) Time Time (min) (min)
(min.) (min.) (min) (min)

0.1234 1.5 1.5 0.4678 1.5 1.5 3 0 0


0.0227 1 2.5 0.8836 2.5 3 5.5 0.5 0
0.0152 0.5 3 0.0748 0.5 5.5 6 2.5 0
0.031 1 4 0.595 1.5 6 7.5 2 0
0.061 1 5 0.4025 1.5 7.5 9 2.5 0
0.721 3 8 0.2006 1 9 10 1 0
0.9841 5 13 0.024 0.5 13 13.5 0 3
0.8452 3.5 16.5 0.076 0.5 16.5 17 0 3
0.4363 2.5 19 0.776 2 19 21 0 2
0.0357 1 20 0.2176 1 21 22 1 0
V NIT NAGPUR

Q.[4] A newspaper boy purchases newspaper for 90 paise each and


sells them at Rs. 1 each. He can’t return the unsold papers. If the
daily demand follows the distribution given below, how many
newspapers he should purchase each day to maximize profit each
day. Simulate using Monte Carlo for 10 samples only.

Demand 30 31 32 33 34 35 36

Probability 0.1 0.2 0.3 0.2 0.1 0.05 0.05

Cumulative
0.1 0.3 0.6 0.8 0.9 0.95 1.00
Probability
V NIT NAGPUR

Solution :
Sr. Random Demand 30 31 32 33 34 35 36
No. No.
361 0.67 33 3 3.1 3.2 3.3
2 0.418 32 3 3.1 3.2 2.4
3 0.614 33 3 3.1 3.2 3.3
4 0.143 31 3 3.1 2.2 1.3
5 0.296 31 3 3.1 2.2 1.3
6 0.829 34 3 3.1 3.2 3.3
7 0.080 30 3 2.1 2.2 0.3
8 0.917 35 3 3.1 3.2 3.3
9 0.1 31 3 3.1 2.3 1.3
10 0.309 32 3 3.1 3.2 2.17
Daily Average Profit 3 3 2.71 2.17

You might also like