0% found this document useful (0 votes)
26 views30 pages

Lec 6 Simulation

The document discusses the simulation of manufacturing systems, using a baseball player example to illustrate probability calculations for scoring points based on hits. It emphasizes the importance of building models, running simulations, and understanding different types of models and their applications. Additionally, it introduces Monte Carlo simulations as a method for approximating results through random sampling and highlights the need for careful design in simulation experiments.

Uploaded by

nahla13ibrahim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views30 pages

Lec 6 Simulation

The document discusses the simulation of manufacturing systems, using a baseball player example to illustrate probability calculations for scoring points based on hits. It emphasizes the importance of building models, running simulations, and understanding different types of models and their applications. Additionally, it introduces Monte Carlo simulations as a method for approximating results through random sampling and highlights the need for careful design in simulation experiments.

Uploaded by

nahla13ibrahim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

‫بسم الله الرحمن الرحيم‬

‫جامعة وادي النيل‬


‫كلية الهندسة والتقنية‬
‫قسم التصنيع‬
Manufacturing Systems
Analysis

Simulation of
Manufacturing System
Lecture (6)
Example:
 Baseball player Example:
 A baseball team wants to hire a baseball player
whom the probability shows his performance as
follows:
 He can hit or miss a ball by 50%
 Half of his hits score single (count 1 point)
 Quarter of his hits score double (count 2 points)
 1/12 of his hits score triple (count 3 points)
 And 1/6 of his hits score home run (count 2 points)
 What is the probability of scoring 20 points in the
next 25 runs?
Example:
 Baseball player Example:
 First we need to build a model. The model can
be a mathematical one
 Or let us build a physical model:
 In this model we will use a COIN and
two DICES
Example:
 Baseball player Example:
 He can hit or miss a ball by 50%
 Then we can toss the coin if it is HEAD he hits
and if it is TAIL he miss.
Example:
 Baseball player Example:
 For the rest we will use the DICES:
 Half of his hits score single (count 1 point)
 Quarter of his hits score double (count 2 points)
 1/12 of his hits score triple (count 3 points)
 And 1/6 of his hits score home run (count 2 points)
 TWO DICES can give 2, 3,4,5,6,7,8, 9, 10,11,&
12 combinations.
Example:
 Baseball player Example:
 The dices give:
 2 only 1 time (1+1)
 3; 2 times (1+2 & 2+1)
 4; 3 times (1+3, 2+2, 3+1)
 5; 4 times (1+4, 2+3, 3+2 4+1)
 6; 5 times (1+5, 2+4, 3+3, 4+2, 5+1)
 7; 6 times (1+6, 2+5, 3+4, 4+3, 5+2, 6+1)
 8; 5 times (2+6, 3+5, 4+4, 5+3, 6+2)
 9; 4 times (3+6, 4+5, 5+4, 6+3)
 10; 3 times (4+6, 5+5, 6+4)
 11; 2 times (5+6, 6+5)
 12; only 1 time (6+6)
Example:
 Baseball player Example:
 The total probabilities of the two dices is 36 times
Hence we can divide that between the player
performance
 Half of his hits score single (count 1 point) (select 18
probabilities) Example (6, 7, 8 & 3 ie. 5+6+5+2=18)
 Quarter of his hits score double (count 2 points) (select 9
probabilities) Example (4, 5, & 11 ie. 3+4+2=9)
 1/12 of his hits score triple (count 3 points) (select 3
probabilities) Example (10 ie. 3)
 And 1/6 of his hits score home run (count 2 points)
(select 9 probabilities) Example (2, 9, & 12 ie. 1+4+1=6)
Example:
 Now draw a table and start run the model physically
Total Home Triple Double Single; Dice Toss
;run 10 ; 3,6,7,8 readin Coin
2,9,12 4,5,11 g
0 T
1 1 8 H
3 2 12 H
4 1 3 H
4 T
4 T
6 2 9 H
6 T
9 3 10 H
T
…Cont
Example:
 Baseball player Example:
 What is the probability of scoring 20 points in
the next 25 runs?
 You can continue up to 25 times to find whether
or not he will score 20 points
 This will not give a real results. So it is
recommended to run the model many times and
get the average of each 25 times.
Tutorial:
 Restaurant customers:
 A restaurant usually opens its doors for customers at 6:00 PM and
closes at 11:00 PM. If we assume that customers comes in a
frequency of 10 minutes each time on the following order:
 Few customers come as individual, about 5%
 Some come as couple or two persons about 50%
 20% of the customers come as three persons
 20% of the customers come as four persons
 Few customers com in group of five or more, about 5%
 Each customer usually order a full meal, what is the expected
number of full meals the restaurant can sell each night?
 Prepare a model for the case and then run a manual simulation for
that model to reach an expected number sold per night.
Next lecture : Modeling
Modeling:
 Definition: "simplified representation of something real“

 A small object, usually built to scale, that represents in detail


another, often larger object:
 a. A preliminary work or construction that serves as a plan
from which a final product is to be made: a clay model ready for
casting.
 b. Such a work or construction used in testing or perfecting a
final product: a test model of a solar-powered vehicle.
 A schematic description of a system, theory, or phenomenon
that accounts for its known or inferred properties and may be
used for further study of its characteristics
Why Modeling:
 Reduce cost
 Save time
 Too much complexity
 Avoid disrupting production system
Types of Models:
- Math programming (Linear, Integer, non-
Linear)
- Network
- Queueing
- MDP (Markov Decision Processes)
- Regression
- Forecasting
- Inventory
- Dynamic programming
- Probability
- Simulation
Principles of Models Building:
Do not build a complicated model when a simple
one will suffice.
Beware of modeling the problem to fit the
technique.
The deduction phase of modeling must be
conducted rigorously (conclusions one draws
from results).
Models should be validated prior to
implementation.
A model should never be taken too literally.
Simulation:
Simulation – very broad term – methods and
applications to imitate or mimic real systems,
usually through computer
– Simulation can be: Dynamic, Discrete, Stochastic
Simulation:
 Applies in many fields and industries
 Broadly interpreted, computer simulation refers to
methods for studying a wide variety of models of
systems
 Numerically evaluate on a computer
 Use software to imitate the system’s operations and
characteristics, often over time
 Can be used to study simple models but should not use
it if an analytical solution is available (Real power of
simulation is in studying complex models)
 Simulation can tolerate complex models since we don’t
even aspire to an analytical solution
Some Simulation Terminology:
 System – a collection of entities that act and
interact toward the accomplishment of some
logical end.
 State – the state of a system is the collection of
variables necessary to describe the status of the
system at any given time.
 Discrete – a discrete system is one in which the
state variables change only at discrete or
countable points in time.
 Continuous– a continuous system is one in which
the state variables change continuously over time.
Some Simulation Terminology:
 Static – a static simulation model is a representation
of a system at a particular point in time.
 Dynamic – a dynamic simulation is a representation
of a system as it evolves over time.
 Deterministic – a deterministic simulation model is
one that contains no random variables. All variables
are known with certainty, or in other words, no
probability is associated with them.
 Stochastic– a stochastic simulation model contains
random variables (variables containing probability
distributions).
Monte Carlo Simulations:
 Definition:
 Monte Carlo methods are a class of computational
algorithms that rely on repeated random sampling
to compute their results. Monte Carlo methods are
often used when simulating physical and
mathematical systems. Because of their reliance on
repeated computation of random or pseudo-
random numbers, these methods are most suited
to calculation by a computer and tend to be used
when it is infeasible or impossible to compute an
exact result with a deterministic algorithm.
Monte Carlo Simulations:
 Definition:
 There is no single Monte Carlo method; instead,
the term describes a large and widely-used class
of approaches. However, these approaches tend to
follow a particular pattern:
 Define a domain of possible inputs.
 Generate inputs randomly from the domain using a
certain specified probability distribution.
 Perform a deterministic computation using the inputs.
 Aggregate the results of the individual computations
into the final result.
Monte Carlo Simulations:
Monte Carlo simulation involves sorting the
probability distribution of parameter, then
drawing random samples from the
distribution to reproduce the parameters in
the simulation model. If enough samples are
drawn the distribution of the sample will
approximate the distribution of the
population.
Monte Carlo Simulations:
 The procedure is as follows:
 1. Observe the parameter.
 2. Convert to frequency and cumulative frequency.
 3. Convert to cumulative probability distribution.
 4. Associate a value of the parameter with random
number tables.
 5. Generate a stream of random number using
random number tables.
 6. Obtain the value of parameter corresponding to
reach random number.
Monte Carlo Simulations:
Step (1) The observed time might be:

 0.4, 0.1, 0.2, 0.4, 0.7, 0.3, 0.2, 0.5, 0.2, 0.6,
0.1, 0.3, 0.2, 0.1, 0.3, 0.2, 0.3, 0.2, 0.5, 0.4

(It is recommended to use large number of


observations)
Monte Carlo Simulations:
Step (2) & (3):
Cumulati Cumulati Frequen Value
ve ve cy
Probabili Frequen
ty cy
15% 3 3 0.1
45% 9 6 0.2
65% 13 4 0.3
80% 16 3 0.4
90% 18 2 0.5
95% 19 1 0.6
Monte Carlo Simulations:
Step (4):
Examine the table of random numbers. Each
digit is an independent sample from a
population in which the digit 0 to 9 are
equally likely. The digits are arranged in pairs
so that the number in each column may vary
from 00 to 99, with every two-digit
combination being equally likely. These
hundred random numbers correspond to
each per cent of probability:
Monte Carlo Simulations:
Step (4):
Range of Cumulative Value
Random Probability
Numbers
14 - 00 15% 0.1
44 - 15 45% 0.2
64 - 45 65% 0.3
79 - 65 80% 0.4
89 - 80 90% 0.5
94 - 90 95% 0.6
99 - 95 100% 0.7
Monte Carlo Simulations:
Step (5) & (6):
A stream of random number may be obtained by reading
the random number table across, down, diagonally or in
any other unbiased manner. Reading down the first
column we obtain the following number:
The parameter values are obtained by moving from
column three back to column 1 in the step 4 table.

3 04 16 44 45 93 22 95 74 20 Random
2 Numbers
0. 0.1 0.2 0. 0.3 0, 0.2 0.6 0.4 0.2 Parameter
2 2 6 Value
Monte Carlo Simulations:
Design of simulation experiments:
Because the values used in the model are
samples of the parameters distribution the
results of simulation run depend on the
particular random numbers used.
Consequently the results may be biased if
insufficient samples have been drawn. Care
must be taken to ensure the simulation
experiment is properly designed, in the
statistical sense.
‫والله الموفق‬

You might also like