You are on page 1of 139

MEE2013 Modeling and Simulation

of Manufacturing Systems

L1.1 Introduction to simulation, features and applications

Dr. Ashish Kumar Saxena,


Assistant Professor, CIMR
ashishkumar@vit.ac.in
Manufacturing Process

 Does any of you have been there in manufacturing industry ?

>50% Yes

Automotive Industry : Car, Bus, Bike other transport vehicles..


Aviation Industry : Aircraft
Semiconductor manufacturing: Chip board, ICs, Mobile, TV, Computer

Other industries: Optical fibre, Investment casting, CNC


industry

03.02.2021 Dr. Ashish Kumar Saxena 2


An inside view of manufacturing industry
Car manufacturing

03.02.2021 Dr. Ashish Kumar Saxena 3


An inside view of manufacturing industry
Aircraft manufacturing
(Boeing)

03.02.2021 Dr. Ashish Kumar Saxena 4


An inside view of ICs manufacturing unit

Semiconductor Industry

03.02.2021 Dr. Ashish Kumar Saxena 5


Characteristics of current manufacturing
systems

Extensive Money
Involve Getting competitive
day by day

High Level of
Complexity
Automation
required

Almost no
tolerance to
failure
Short Lead High Quality
Time Requirement

03.02.2021 Dr. Ashish Kumar Saxena 6


To meet such rigorous challenges in
manufacturing systems

Simulation is effective tool to plan and


execute the process

03.02.2021 Dr. Ashish Kumar Saxena 7


What is simulation…..

Simulation in broad sense  A mathematical model, that


imitates real system, and calculates the impact of uncertain inputs
to predict the output of complete process

Simulation model include:


– Model Inputs: that are uncertain numbers/variables
– An intermediate system for calculation
– Model output: depends on the inputs, these are uncertain
function

03.02.2021 Dr. Ashish Kumar Saxena 8


Simulation

Simulation, according to Shannon (1975), is “the


process of designing a model of a real system and
conducting experiments with this model for the purpose
either of understanding the behavior of the system or of
evaluating various strategies”

03.02.2021 Dr. Ashish Kumar Saxena 9


Features of simulation

• Can be done manually or computationally


• Study the system behaviour over time
• Correlate various entities of system via mathematical, symbolic
or logical relationships
• Is approximation of reality and also have some assumption
associated to it
• Closer the approximation to the reality better will be the model

03.02.2021 Dr. Ashish Kumar Saxena 10


Advantages with Simulation
• Easy to understand − Simulation allows to understand how the system
really operates without working on real time systems.

• Easy to test − Simulation allows to make changes into the system and their
effect on the output without working on real time systems.

• Easy to upgrade − Simulation allows to determine the system


requirements by applying different resource configurations

• Easy to identifying constraints − It allow to perform bottleneck analysis


that causes delay in the work process, information, etc.

• Easy to diagnose problems − Some systems are so complex that it is not


easy to understand their interaction at a time. However, simulation allows
to understand all the interactions and analyze their effect.
– Additionally, new policies, operations, and procedures can be explored without
affecting the real system.

03.02.2021 Dr. Ashish Kumar Saxena 11


Application Area
Manufacturing process Supply chain management Traffic management

City planning Construction sector Business Process Simulation

03.02.2021 Dr. Ashish Kumar Saxena 12


Application Area
Military operation Planning Healthcare

Telecommunication
Networking

03.02.2021 Dr. Ashish Kumar Saxena 13


Any Question ?

03.02.2021 Dr. Ashish Kumar Saxena 14


MEE2013 Modeling and Simulation
of Manufacturing Systems

L1.2 Basic Terminology, concept, types of models and steps of simulation


process

Dr. Ashish Kumar Saxena,


Assistant Professor, CIMR
ashishkumar@vit.ac.in
Introduction to simulation

For a given system, How to evaluate its performance ?

Use existing Develop instance of the


Measurement system to perform performance
measurement

System Develop a mathematical abstraction of


How to Analysis the system and derive formulas which
evaluate? describe the system performance

Simulation Develop a computer program which


implements a model of the system.
Perform experiments by running the
computer program

09.02.2021 Dr. Ashish Kumar Saxena 2


Introduction to simulation
How to study a system?

Measurements on an existing system


What to do, if system does not exist in reality?
What to do, if changes are very expensive or time consuming?

Mathematical analysis
Good solutions, but only feasible for simple systems.
Real world systems are too complex, e.g., factory, computer,
network, etc.

Simulation
Build the behavior of a system within a program

09.02.2021 Dr. Ashish Kumar Saxena 3


Introduction to simulation

There are many open questions


• What is a system?
• What is a model?
• What is performance and how to measure it?
• On what does performance depend?
• How to build a model?
• How to numerically evaluate it?
• How to interpret such results?

09.02.2021 Dr. Ashish Kumar Saxena 4


Introduction to simulation
What is a simulation?

A simulation is the imitation of the operation of a real-world


system over time.

What is the method?

Generate an artificial history of a system


Draw inferences from the artificial history concerning the characteristics
of the system

How it is done?

Develop a model
Model consists of entities (objects)

09.02.2021 Dr. Ashish Kumar Saxena 5


When is simulation appropriate ?
Simulation can be used for the following purposes:
 Simulation enables the study of experiments with internal
interactions
 Informational, organizational, and environmental changes can be
simulated to see the model’s behavior
 Knowledge from simulations can be used to improve the system
 Observing results from simulation can give insight to which variables
are the most important ones
 Simulation can be used as pedagogical device to reinforce the
learning material
 Simulations can be used to verify analytical results, e.g., queueing
systems
 Animation of a simulation can show the system in action, so that the
plan can be visualized

09.02.2021 Dr. Ashish Kumar Saxena 6


When is simulation not appropriate ?

Simulation should not be used, in the case


When problem is solvable by common sense
When the problem can be solved mathematically
When direct experiments are easier
When the simulation costs exceed the savings
When the simulation requires time, which is not available
When no (input) data is available, but simulations need data
When the simulation can not be verified or validated
When the system behavior is too complex or unknown

09.02.2021 Dr. Ashish Kumar Saxena 7


Advantages with simulation
• Policies, procedures, decision rules, information flows can be
explored without disrupting the real system
• New hardware designs, physical layouts, transportation systems,
protocols, computer systems, and network architectures can be
tested without committing resources
• Hypotheses about how or why a phenomenon occurs can be tested
for feasibility
• Time can be compressed or expanded
• Slow-down or Speed-up
• Insight can be obtained about the interaction of variables
• Insight can be obtained about the importance of variables to the
performance of the system
• Bottleneck analysis can be performed to detect excessive delays
• Simulation can help to understand how the system operates rather
than how people think the system operates
• “What if” questions can be answered

09.02.2021 Dr. Ashish Kumar Saxena 8


Disadvantages with simulation
• Model building requires training, it is like an art.
Compare model building with programming.
• Simulation results can be difficult to interpret
Most outputs are essentially random variables
Thus, not simple to decide whether output is randomness or
system behavior
• Simulation can be time consuming and expensive
Skimping in time and resources could lead to useless/wrong
results

• Some of above disadvantages can be overcome


Simulation packages contain models that only need input data
Simulation packages contain output-analysis capabilities
Sophistication in computer technology improves simulation times
For most of the real-world problems there are no closed form
solutions
09.02.2021 Dr. Ashish Kumar Saxena 9
System and System enviroment
System: A system is a group of objects that are joined together in some
regular interaction or interdependence toward the accomplishment of
some purpose.
Example: a) Automobile factory: Machines, parts, and workers operate
jointly to produce a vehicle
b) Computer network: User, hosts, routers, lines establish a network

System environment: Everything outside the system, but affects the


system.

Caution: It is important to decide on the boundary between the system


and the system environment. This decision depends on the purpose of
the study.
09.02.2021 Dr. Ashish Kumar Saxena 10
MEE2013 Modeling and Simulation
of Manufacturing Systems

L1.3 Basic Terminology, concept, types of models and steps of simulation


process

Dr. Ashish Kumar Saxena,


Assistant Professor, CIMR
ashishkumar@vit.ac.in
Basic terminology in Simulation

In order to understand or analyse the system we need some terms:


• Entity : An object of interest in a system

• Attribute: Property of the entity

• Activity: Action taking place over define time period

• State of the system : Collection of variables describing the


system any point of time

• Event: An incidence whose occurrence does change the state of


the system

10.02.2021 Dr. Ashish Kumar Saxena 2


Some examples
System Entity Attribute Activities Events State Variable

Arrival and
Checking Making No of busy tellers,
Banking Customers departure of
A/c balance deposit no of customers
customer
Arrival at a
No of riders in
Start point station,
Rapid rail Riders Travelling each station, no
& end point Reaching
of riders in transit
destination
Speed,
Welding Machine status
capacity,
Production Machines machining, Breakdown (Busy, ideal, or
Breakdown
cutting down)
rate
Length, Transmitting Arrival at No of packets in
Communication Massage
destination , receiving destination wait
receiving
Inventory level,
Inventory Warehouse Capacity order demand
backlog demand
distributing
10.02.2021 Dr. Ashish Kumar Saxena 3
Discrete vs. Continuous

• Discrete: The system state variable


remain constant over some interval of
time and value change at DISCRETE sets
of points (called event times). e.g. Bank,
Grocery, Router, Host, Jobs in queue.

• Continuous: the system state variables


are defined by differential equation
results whose value changes
continuously over time. e.g. Head of the
water behind the dam, Temperature
10.02.2021 Dr. Ashish Kumar Saxena 4
Model of a system
 Model is a representation of the system developed for purpose of
studying a process/system
 It is important to consider all aspects of the system that affect the
problem under investigation
Or may say
 Model is a simplified (and abstract) representation of a system

 It should specify
 important components
 Assumptions/approximation about how the system works

 However must contain enough details to reach at meaningful


conclusions

10.02.2021 Dr. Ashish Kumar Saxena 5


Principles of Modeling
• Conceptualizing a model requires system knowledge, engineering judgment,
and model-building tools.
• The secret to being a good modeler is recognizing the need and having the
ability to remodel.
• The modeling process is evolutionary because the act of modeling reveals
important information piecemeal.
• The problem or problem statement is the primary controlling element in
model-based problem solving.
• In modeling combined systems, the continuous aspects of the problem should
be considered first. The discrete aspects of the model should then be
developed.
• A model should be evaluated according to its usefulness. From an absolute
perspective, a model is neither good or bad, nor is it neutral.
• The purpose of modeling is knowledge and understanding, not models.
• Know when to model “top-down” and when to model “bottom-up”.
• It is important to learn modeling techniques, but more important to learn to
consider the tradeoffs among alternative techniques.
[Ref: A. Alan B. Pritsker, James O. Henriksen, Paul A. Fishwick, Gordon M. Clark,
“Principles of Modeling”, Winter Simulation Conference, 1991]
10.02.2021 Dr. Ashish Kumar Saxena 6
Basic concept of modeling and simulation
Object: An entity exists in the real world to study the behavior of a model.

Base Model: A hypothetical explanation of object properties and its behavior,


which is valid across the model.

System: An articulate object under definite conditions, exists in the real world.

Experimental Frame: Used to study a real world system, consists of two sets of
variables: frame input variables & frame output variables.

Verification: A process of comparing two or more items to ensure their


accuracy. In Modelling & Simulation, verification can be done by comparing
the consistency of a simulation program

Validation: A process of comparing two results. It is performed by comparing


experiment measurements with the simulation results within the context of
an experimental frame. The model is invalid, if the results mismatch.
10.02.2021 Dr. Ashish Kumar Saxena 7
Simulation model
Simulation model is particular type of mathematical model of a system.

Type of simulation model


Static: A model that represent the system at a particular point of time
Dynamic: Represent the system over a time interval

Stochastic : Models with random variables.


Deterministic: Models without random variables..

Discrete : System state change occur only at discrete point of time


Continuous: System state change occur continuously

10.02.2021 Dr. Ashish Kumar Saxena 8


Simulation model
Monte Carlo
Stochastic simulation

Static

Deterministic

Models Discrete Discrete event


simulation

Stochastic

Dynamic Continuous

Deterministic

10.02.2021 Dr. Ashish Kumar Saxena 9


Discrete Event Simulation model

Discrete-event Simulation
• System state changes only at discrete set of points in time
• Simulation model is analysed by numerical methods
• Numerical methods employ computational procedures to
“solve” mathematical models
• The model is rather “run” than “solved”

10.02.2021 Dr. Ashish Kumar Saxena 10


Steps of simulation study

• Problem statement by client


Problem • Formulation by analyst
Formulation • All stakeholder should agree on formulate plan

• Define questions to be answer by simulation


Setting ObjectiveSetting
• Formulation
Objectiveof alternatives to be considered
and Overall Project • Metric for the evaluation the effectiveness
and Overall Project
• Overall project plan including logistics and time frame
Plan Plan
• No of people, time schedule, other resources etc
• To capture the essence of the problem without complicating it
• Can start with a simple model and make it more and more
Model close to reality Model
Conceptualization • Involvement ofConceptualization
client /end user is essential

• The needful data


• Accuracy
Data Collection • Methodology Data Collection
10.02.2021 Dr. Ashish Kumar Saxena 11
…..Continue
Steps of simulation study (conti..)
• Translate the model into a package like ARENA or GPSS
Model translation using syntax
• Some of the modern package are GUI based

• Is Syntax Ok?
Verification
• Are model represented correctly

• Run model for known test


Validation
• Design output as per requirement
• Do we need to incorporate failure ? l
represented correctly
Experimental Design
• Include exception, which we want to
simulate
Production run and • Estimating the measures
Analysis of performance

• Documentation and
More and more Run • Report detailed
procedure for
10.02.2021 Dr. Ashish Kumar Saxena 12
implementation
Any Question ?

10.02.2021 Dr. Ashish Kumar Saxena 13


MEE2013 Modeling and Simulation
of Manufacturing Systems

L1.4 Flow chart and Steps in Simulation, simulation process,


simulating single server queue

Dr. Ashish Kumar Saxena,


Assistant Professor, CIMR
ashishkumar@vit.ac.in
About last class…..

• System and System environment,


• Component of system
• examples
• Types of state variables
• Model of a system

Today we start with Steps in Simulation process


Steps of simulation study

• Problem statement by client


Problem • Formulation by analyst
Formulation • All stakeholder should agree on formulate plan

• Define questions to be answer by simulation


Setting ObjectiveSetting
• Formulation
Objectiveof alternatives to be considered
and Overall Project • Metric for the evaluation the effectiveness
and Overall Project
• Overall project plan including logistics and time frame
Plan Plan
• No of people, time schedule, other resources etc
• To capture the essence of the problem without complicating it
• Can start with a simple model and make it more and more
Model close to reality Model
Conceptualization • Involvement ofConceptualization
client /end user is essential

• The needful data


• Accuracy
Data Collection • Methodology Data Collection

…..Continue
Steps of simulation study (conti..)
• Translate the model into a package like ARENA or GPSS
Model translation using syntax
• Some of the modern package are GUI based

• Is Syntax Ok?
Verification
• Are model represented correctly

• Run model for known test


Validation

• Design output as per requirement


Experimental Design • Do we need to incorporate failure ? l
represented correctly
Production run and • Estimating the measures
Analysis of performance

• Documentation and
More and more Run • Report detailed
procedure for
implementation
Steps of simulation
study Problem formulation

Setting of objectives and overall project plan

Model conceptualization Data collection

Model Translation
No
Verified ?

Yes
No No
Validated ?

Yes

Experimental Design

Production run and analysis


Yes Yes
More Run?
No
Documentation and reporting

Implementation
Simulation example
Simulating single server queue
Queuing systems
Simulating Single sever queuing systems
Let us consider an example of super market, who have a single billing counter, following
are observations and assumption of the market
• The calling population is infinite
• Mean time of arrival of a customer is uniformly distributed between 2 to 7min, with
mean of 5 min
• Service time per customer is uniformly distributed between 1 to 6 min with mean of 4
min

• Since the mean customer arrival time is more than service time of each customer,
hence the system is stable
• First Come First Serve rule is applicable

Problem: Simulate the billing process of the supermarket, and find out efficiency of the
system over finite event
Simulation Process flow
Problem statement: Simulate the billing process of the supermarket, and find out
efficiency of the system over finite event

Customer arrival to
Stand in Waiting line Billing Process
billing counter

There are two events, in which system stage changes with time.
• Arrival event
• Departure event

Between these two events the complete process take place …….
So we should discuss these two events in detail.
Arrival Event Processing
No Customer Billing
Process start
Customer arrival at
Billing Counter busy ?
billing counter
Yes
Customer need to
stand in queue

Departure Event Processing

No Server Idle time start


Customer billing Anyone waiting in
Complete queue?

Yes 1 Customer start


billing, 1 reduced from
queue
As given in problem
Simulation Table
Simulation Table (Input from problem)
Simulation Table (Complete table)
Simulation Analysis

𝑁𝑜 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠 𝑤ℎ𝑜 ℎ𝑎𝑠 𝑡𝑜 𝑤𝑎𝑖𝑡


Probability that the customer has to wait =
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
10
= =0.66
15

𝑆𝑒𝑟𝑣𝑒𝑟 𝐼𝑑𝑙𝑒 𝑡𝑖𝑚𝑒


Service utilization time=1 −
𝑇𝑜𝑡𝑎𝑙 𝑡𝑖𝑚𝑒
3
=1- = 95.2%
63

Average time per customer spend in system


𝑇𝑜𝑡𝑎𝑙 𝑡𝑖𝑚𝑒 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟 𝑠𝑝𝑒𝑛𝑑 𝑖𝑛 𝑠𝑦𝑠𝑡𝑒𝑚
=
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
94
= =6.26 min
15
𝑇𝑜𝑡𝑎𝑙 𝑠𝑒𝑟𝑣𝑖𝑐𝑒 𝑡𝑖𝑚𝑒
Mean service time =
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
58
= =3.8 min
15
𝑇𝑜𝑡𝑎𝑙 𝑠𝑒𝑟𝑣𝑖𝑐𝑒 𝑡𝑖𝑚𝑒
Average time between arrivals =
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
56
= =4 min
14
𝑇𝑜𝑡𝑎𝑙 𝑤𝑎𝑖𝑡𝑖𝑛𝑔 𝑡𝑖𝑚𝑒 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
Mean waiting time =
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠 𝑤𝑎𝑖𝑡𝑒𝑑 𝑖𝑛 𝑠𝑦𝑠𝑡𝑒𝑚
34
= =2.8 min
12
Any Question ?
MEE2013 Modeling and Simulation
of Manufacturing Systems

L1.5 Simulation examples: Queuing system

Dr. Ashish Kumar Saxena,


Assistant Professor, CIMR
ashishkumar@vit.ac.in
Simulation example
Simulating single server queue
Queuing systems
Simulating Single sever queuing systems
Let us consider an example of super market, who have a single billing counter, following
are observations and assumption of the market
• The calling population is infinite
• Mean time of arrival of a customer is uniformly distributed between 2 to 7min, with
mean of 5 min
• Service time per customer is uniformly distributed between 1 to 6 min with mean of 4
min

• Since the mean customer arrival time is more than service time of each customer,
hence the system is stable
• First Come First Serve rule is applicable

Problem: Simulate the billing process of the supermarket, and find out efficiency of the
system over finite event
06.03.2021 Dr. Ashish Kumar Saxena 2
Simulation Process flow
Problem statement: Simulate the billing process of the supermarket, and find out
efficiency of the system over finite event

Customer arrival to
Stand in Waiting line Billing Process
billing counter

There are two events, in which system stage changes with time.
• Arrival event
• Departure event

Between these two events the complete process take place …….
So we should discuss these two events in detail.

06.03.2021 Dr. Ashish Kumar Saxena 3


Arrival Event Processing
No Customer Billing
Process start
Customer arrival at
Billing Counter busy ?
billing counter
Yes
Customer need to
stand in queue

Departure Event Processing

No Server Idle time start


Customer billing Anyone waiting in
Complete queue?

Yes 1 Customer start


billing, 1 reduced from
queue
06.03.2021 Dr. Ashish Kumar Saxena 4
As given in problem

06.03.2021 Dr. Ashish Kumar Saxena 5


Simulation Table

06.03.2021 Dr. Ashish Kumar Saxena 6


Simulation Table (Complete
(Input fromtable)
problem)

06.03.2021 Dr. Ashish Kumar Saxena 7


Simulation Analysis

𝑁𝑜 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠 𝑤ℎ𝑜 ℎ𝑎𝑠 𝑡𝑜 𝑤𝑎𝑖𝑡


Probability that the customer has to wait =
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
2
=
11

𝑆𝑒𝑟𝑣𝑒𝑟 𝐼𝑑𝑙𝑒 𝑡𝑖𝑚𝑒


Service utilization time=1 −
𝑇𝑜𝑡𝑎𝑙 𝑡𝑖𝑚𝑒
6
=1- =……
44

Average time per customer spend in system


𝑇𝑜𝑡𝑎𝑙 𝑡𝑖𝑚𝑒 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟 𝑠𝑝𝑒𝑛𝑑 𝑖𝑛 𝑠𝑦𝑠𝑡𝑒𝑚
=
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
……
= =……..min
11

06.03.2021 Dr. Ashish Kumar Saxena 8


𝑇𝑜𝑡𝑎𝑙 𝑠𝑒𝑟𝑣𝑖𝑐𝑒 𝑡𝑖𝑚𝑒
Mean service time =
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
….
= =…… min
11
𝑇𝑜𝑡𝑎𝑙 𝑖𝑛𝑡𝑒𝑟𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑡𝑖𝑚𝑒
Average time between arrivals =
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
…….
= =…….min
14
𝑇𝑜𝑡𝑎𝑙 𝑤𝑎𝑖𝑡𝑖𝑛𝑔 𝑡𝑖𝑚𝑒 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
Mean waiting time =
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠 𝑤𝑎𝑖𝑡𝑒𝑑 𝑖𝑛 𝑠𝑦𝑠𝑡𝑒𝑚
…….
= =…….. min
……

06.03.2021 Dr. Ashish Kumar Saxena 9


Any Question ?

06.03.2021 Dr. Ashish Kumar Saxena 10


MEE2013 Modeling and Simulation
of Manufacturing Systems

L1.6 Inventory simulation example

Dr. Ashish Kumar Saxena,


Assistant Professor, CIMR
ashishkumar@vit.ac.in
Simulating single server queue
Problem statement: Simulate the billing process of the supermarket, and find out
efficiency of the system over finite event

Customer arrival to
Stand in Waiting line Billing Process
billing counter

Arrival Event Processing Customer Billing


No
Process start
Customer arrival at
Billing Counter busy ?
billing counter
Customer need to
Yes
stand in queue

Departure Event Processing Server Idle time start


No
Customer billing Anyone waiting in
Complete queue?
1 Customer start
Yes billing, 1 reduced from
queue
Inventory simulation problem
Problem statement:
Simulate the inventory situation of engine blocks stored in an engine assembly plant

Everyday demand varies from 200 to 300 in multiples of 20, the probability of demands is
known and given in table 1. The economic order quantity for engine block is 2500 and as a
policy the company maintains a safety stock of 250 engine blocks. The reorder point is 1000
and the lead time to delivery varies from 1 to 5 days with associated probabilities given in
table 2.
Simulate the inventory system for 100days and compute i) the average inventory ii) Days of
shortage iii) maximum inventory iv) Minimum days v) Order frequency vi) Probability of stock
going below safety stock. Also compute is there any need for policy revision ?
Table 1 daily demand Table 2 Lead time
Demand Probability Lead Time
Probability
(Days)
200 0.1
1 0.1
220 0.15
2 0.2
240 0.25
3 0.4
260 0.25
4 0.2
280 0.15
5 0.1
300 0.1
2500

Engine Stock
(numbers)
Reorder 1000
point

0
Lead time

Lead time Time (Days)


Simulation Process flow
Received
Stock Use
demand

Reorder event processing Continue with


No
available stock
Reorder Point
Monitor Stock
reached ?
Yes Place order

Order receipt processing


Enter into the
Order Receipt
stock
Engine Stock
(numbers)
Closing Stock

2300

1800

1300

800

300

-200 0 10 20 30 40 50 60 70

Time (Days)
Results
𝑇𝑜𝑡𝑜𝑙 𝑛𝑜 𝑜𝑓 𝑢𝑛𝑖𝑡𝑠 𝑜𝑓 𝑒𝑛𝑔𝑖𝑛𝑒𝑠 𝑎𝑡 𝑐𝑙𝑜𝑠𝑖𝑛𝑔 𝑡𝑖𝑚𝑒
Average Inventory =
𝑇𝑜𝑡𝑎𝑙 𝑁𝑜 𝑜𝑓 𝑑𝑎𝑦𝑠
61960
= = 1032.6𝑢𝑛𝑖𝑡𝑠
60

Days of shortage = 2 days

Maximum Inventory = 2280 units

Minimum Inventory =-220 units

Order frequency =60/8= approximate in 7.5 days

Probability of stock below safety stock = 6/60=0.1


Is there any need for policy revision ?
Any Question ?
MEE2013 Modeling and Simulation
of Manufacturing Systems

L1.7 Basic nature and General Principals of Simulation

Dr. Ashish Kumar Saxena,


Assistant Professor, CIMR
ashishkumar@vit.ac.in
Inventory simulation problem
Problem statement:
Simulate the inventory situation of engine blocks stored in an engine assembly plant

Everyday demands varies from 200 to 300 in multiples of 20, the probability of demands is
known and given in table 1. The economic order quantity for engine block is 2500 and as a
policy the company maintains a safety stock of 250 engine blocks. The reorder point is 1000
and the lead time to delivery varies from 1 to 5 days with associated probabilities given in
table 2.
Simulate the inventory system for 100days and compute i) the average inventory ii) Days of
shortage iii) maximum inventory iv) Minimum days v) Order frequency vi) Probability of stock
going below safety stock. Also compute is there any need for policy revision ?
Table 1 daily demand Table 2 Lead time
Demand Probability Lead Time
Probability
(Days)
200 0.1
1 0.1
220 0.15
2 0.2
240 0.25
3 0.4
260 0.25
4 0.2
280 0.15
19.02.2021 Dr. Ashish K. Saxena 5 0.1 2
300 0.1
1. How the demand table utilize in this problem and How did
we generated the random demand for all 100 days ?

2. Similar question for arises for lead time probability table

19.02.2021 Dr. Ashish K. Saxena 3


Simulation Process flow

Received order Stock Use

Reorder event processing Continue with


No
available stock
Reorder Point
Monitor Stock
reached ?
Yes Place order

Order receipt processing


Enter into the
Order Receipt
stock
19.02.2021 Dr. Ashish K. Saxena 4
Basic nature of simulation model
Two kind of model:
 Deterministic model: Has known set of input and thus its output

 Stochastic model: Has one or more random input variables with


some probability associated thus the output is also variable

Simulation:
• is a Mathematical Model of the system under study
• Is a Collection of system information
• Carried out with/without programming the calculation
• Changes in the state take place in accordance with rule/equations
• Mimic the real system
• Continue the process until the desired analytic solution achieved
19.02.2021 Dr. Ashish K. Saxena 5
Concepts/terminology in Discrete Event Simulation
System: Collection of entities (e.g. People, machine), interacted
together to accomplish goals

Model: An abstract representation of system, which contain


structural/logical/mathematical relationships in terms of state, entities
and their attributes, sets, processes, events and activities

System State: A collections of variables that contain all the necessary


information to describe a system at any point of time.

Entity: Any object or component in the system the require explicit


representation in the model (e.g. A server, A customer, A machine)

Attributes: The properties of a given entity (e.g. Priority of a waiting


customer)
19.02.2021 Dr. Ashish K. Saxena 6
List: A collection of associated entities, ordered in logical fashion (e.g
customer in waiting line ordered by First Come First Serve or by priority)

Event: An instantaneous act to change state of a system

Event Notice : A record of current or future time event, with necessary data
require to execute the event

Event List: event notice of future events, ordered by time, also known as FEL
(Future Event List)

Activity: A duration of time of specified length, which is known when it begins

Delay: A duration of time of unspecified indefinite length, which is not known


until it end

Clock: A variable representing simulated time


19.02.2021 Dr. Ashish K. Saxena 7
Any Question ?

19.02.2021 Dr. Ashish K. Saxena 8


MEE2013 Modeling and Simulation
of Manufacturing Systems

L1.8 Discrete event Simulation, general principle, examples

Dr. Ashish Kumar Saxena,


Assistant Professor, CIMR
ashishkumar@vit.ac.in
Discrete event simulation: General Principles
 Basic building blocks of all discrete event simulation :
Entities, Attributes, Activities and Events

 The system is model in terms of


• Each state at each point of time
• The entities always pass through the system and it represent the
system resources
• The activities and events cause to change the state of the system

 Discrete event models are appropriate for those system in which change in
the state take place only at the discrete point in time

 Here we will deal exclusively with dynamic, stochastic system, which


change in discrete manner

23.02.2021 Dr. Ashish K. Saxena 2


Concepts in discrete event simulation
• A model is consist of
• Static description of the model and
• The dynamic relationships and interactions between the components
Some question that need to be answered for the dynamic behaviour
• Event
• How does each event affect system state, entity, attribute and set contents ?
• Activities
• How activities are defined ? (Deterministic/Probabilistic/Some other way)
• what event triggers the beginning or end of each activity ?
• Can the activity beginning regardless of system state or its beginning
conditioned on the system being in a certain state ?
• Delays
• Which event trigger the beginning and end of each type of delay ?
• System State initialization
• What is system state at time “0” ?
• What events should be generated at time 0 to “prime” the model- that is, to
get the simulation started
23.02.2021 Dr. Ashish K. Saxena 3
Concepts in discrete event simulation

• A discrete-event simulation proceeds by producing a sequence of


system snapshots over time

• A snapshot of the system at a given time includes


• System state
• Status of all entities
• Status of all sets
• Sets are used to collect required information for calculating
performance metrics
• Future event list (FEL)
• Statistics

23.02.2021 Dr. Ashish K. Saxena 4


Another example of discrete simulation
Call centre technical support problem….
• A computer technical support centre has two people A and B
• providing service on phone call. They answer the questions of customer
and provide them solution.
• The time between two calls ranges between 1 to 4 mins, with distribution
given in table 1.
• The service time distribution their service are given in table 2 and 3
respectively.
• A is more experienced than B, so A takes the call when both are free.
Table 1 Inter arrival Time Table 2 “A” service Time Table 3 “B” service Time
Time Probability Service Service
Probability Probability
1 0.25 Time Time

2 0.40 2 0.30 3 0.35

3 0.20 3 0.28 4 0.25

4 0.15 4 0.25 5 0.20

23.02.2021
5Dr. Ashish K. Saxena
0.17 6 0.20 5
Simulation parameters in Call Centre problem….
• System state
 LQ(t)- # of customer (callers) waiting at time t
 LA(t)- 0 or 1 state of ‘A’ at time t (0 for free)
 LB(t)- 0 or 1 state of ‘B’ at time t (0 for free)

• Entities: Callers

• Events
 Arrival of a call
 Service completion by ‘A’
 Service completion by ‘B’

• Activities
 Inter arrival time of customer (callers)
 Service time by ‘A’ & ‘B’

• Delay-
23.02.2021
customer (Caller) waiting in the queue until A or B is free
Dr. Ashish K. Saxena 6
Cumulative
Entities Future
System Statistic
Clock and Set 1 Set 2 ……. event list
State and
Attribute (FEL)
counters
LQ(t),
i LA(t),
LB(t)

23.02.2021 Dr. Ashish K. Saxena 7


Event Scheduling /Time Advance Algorithm
Future event list (FEL)
• The future event list is the key driver
• All the event are chronologically ordered in the FEL
• The event times satisfy: t < t1 ≤ t2 ≤ t3 ≤ ... ≤ tn
• The event associated with t1 is the imminent event, i.e., the next
event to occur
• Scheduling of an event
• At the beginning of an activity the duration is computed and
an end-of-activity event is placed on the future event list
• The content of the FEL is changing during simulation run
• Efficient management of the FEL has a major impact on the
performance of a simulation run
• The future event list to be periodically updated
• As the clock advances
• As various events occur

23.02.2021 Dr. Ashish K. Saxena 8


Three basic approaches or word views

• Event Scheduling world view

• The process interaction world view

• Activity scanning world view

23.02.2021 Dr. Ashish K. Saxena 9


Any Question ?

23.02.2021 Dr. Ashish K. Saxena 10


MEE2013 Modeling and Simulation
of Manufacturing Systems

L1.9 Types of word view

Dr. Ashish Kumar Saxena,


Assistant Professor, CIMR
ashishkumar@vit.ac.in
Three basic approaches or word views
• Event Scheduling world view
• In this word view simulation analyst concentrate on events and on their
effect on state

• Process interaction world view


• Simulation analyst thinks in terms of processes
• Define model in terms of entity/objective and their life cycle as flows
through system
• Most popular word view in simulation packages, as it allows the analyst to
describe process flow in terms of blocks

• Activity scanning world view


• Analyst concentrate on activities of the model and those condition that
allow the activity to begin
• Uses fixed time increment and rule based approach to decide whether any
activities can begin at each point in simulated time
Event scheduling word views
Arrival event execution
Arrival event
Occurs at CLOCK=t

No Is Yes
Set LS(t)=1 Increase LQ(t) by 1
LS(t)=1 ?

Generate Service time


ts, schedule new
departure at t+ ts

Generate Inter arrival


time ta, schedule new
arrival at t+ta

Collect statistics LS(t)= no of customer in service


LQ(t)= no of customer in queue
Return control to time
advance routine to
continue simulation
Event scheduling word views
Departure event execution
Departure event
Occurs at CLOCK=t

No Is Yes
Set LS(t)=0 Reduce LQ(t) by 1
LS(t)>0 ?

Generate Service time


ts , schedule new
departure at t+ ts

Collect statistics

Return control to time LS(t)= no of customer in service


advance routine to
LQ(t)= no of customer in queue
continue simulation
Process scheduling word view

Customer ‘n’

End
Arrival Begin Service
Event Service Event
Time X X X
Delay Activity
Interaction delayed until
service of ‘n’ get completed

Begin End
Arrival
Service service
Event
Event
Time X X X
Delay Activity

Customer ‘n+1’
Activity scanning word view
Dump truck problem
Traveling

Loading Weighing
Scale
Loading Weighing
queue queue

Activity Condition
Loading time Truck is at front of loading queue
Weighing time Truck is at front of weighing queue loading
Travel time Truck has just completed weighing

Delay Loading Delay Weighing Travel time

EL WL
Any Question ?
J component doubts
Database collection

Use online sources for machine learning few examples are as


follows
https://archive.ics.uci.edu/ml/index.php
https://elitedatascience.com/datasets
https://datasetsearch.research.google.com/
https://www.kaggle.com/datasets

Or you can use the data from the other authentic sources,

Make sure you do not violate the copyright issue of the source.
Type of projects for J
component
Work for real problem

Few examples
• Current Social Problem: Covid 19 related prediction, Pollution control, River pollution,
Decreasing ground water level etc.

• Service sector related: Supply chain related, Airport passengers boarding, connecting flight
baggage transfer, Seasonal flight delay predictions, car/bike/room rental services, tourism
industry related

• City planning related: Traffic planning, Automated car parking system

• Entertainment: Movie/serial/event promotion related

• Other: Restaurant recommendation, campus recruitment, University ranking system, fake


news
MEE2013 Modeling and Simulation
of Manufacturing Systems

Module 2 Mathematical and statistical models

L2.1 Basic statistics, probability, random variables and


probability distribution

Dr. Ashish Kumar Saxena,


Assistant Professor, CIMR
ashishkumar@vit.ac.in
Basic parameters of statistics

Measure of central tendency


 Mean : the average value of a given data set
 Median :The middle number in a sorted list of numbers in a
data set
 Mode : The number that appears most frequently in a data set

Measure of dispersion
 Range : difference between highest and lowest number
 Standard deviation & Variance : Shows how spread out a
group of numbers from its mean

26.02.2021 Dr. Ashish Kumar Saxena 2


Basic parameters of statistics
Measure of asymmetry : Skew
Skewness of graph measure the symmetry nature of probability distribution
of given data.
Mode
Median Mode Median

Mean Mean

Mode
Median
Mean

Normal distribution

26.02.2021 Dr. Ashish Kumar Saxena 3


Basic parameters of statistics
Measure of sharpness of peak: Kurtosis
A measure of the “tailedness” of the probability distribution

26.02.2021 Dr. Ashish Kumar Saxena 4


Probability

 Represent how likely an event is to occur

 Probability of an event is a number between 0 to 1

 0 indicate for Impossible event

 1 tends for certain event

 Sum of the probabilities of all possible events is always 1

26.02.2021 Dr. Ashish Kumar Saxena 5


Calculation of Probability

By using theoretical model


 Probability of getting Head in toss of a coin
 Probability of getting 6 in a rolling dice

By using Empirical data


 Probability of service time to customer in call centre
 Probability of rain based on historical data

By subjective and judgemental method


 Probability of stock price rise by certain amount on
particular day

26.02.2021 Dr. Ashish Kumar Saxena 6


Probability Terminology and Concepts
Random variable (RV):
A numeric outcome that results from an experiment.
• For each element in an experimental sample space,
random variable can take on exactly one value

Types
 Discrete random variables : Can take only on a finite or countably
infinite set of outcome
 Continuous distribution function: Can take on any value along a
continuum (but may be report “discretely”)

Representation:
Random variables denoted by Upper case letter (X)
Individual outcomes for given random variable are denoted
by26.02.2021
lower case letters (x1,x2,…..)
Dr. Ashish Kumar Saxena 7
Probability Terminology and Concepts
Probability distribution:
A statistical function, which describes all the possible values
and likelihood that a random variable can take within given range.
This range is bounded between minimum and maximum
possible value

 Discrete probability distribution : Assign the probabilities (masses)


to individual outcomes
𝑝 𝑥𝑖 = 𝑃 𝑋 ,
Possible value of X may be listed as 𝑥1 , 𝑥2 , 𝑥3 ,……. 𝑥𝑖 . In finite case the list
terminates, in countably infinite case, list continue indefinitely
 Continuous probability distribution : Assign probability density at
individual points, probability of ranges can be obtained by
integrating density function
𝑏
𝑃 𝑎 ≤ 𝑋 ≤ 𝑏 = න 𝑓 𝑥 𝑑𝑥
26.02.2021 𝑎
Dr. Ashish Kumar Saxena 8
Discrete distribution
Probability mass function
𝑝 𝑥𝑖 = 𝑃 𝑋 = 𝑥
𝑝 𝑥𝑖 ≥ 0 ∀𝑥
෍ 𝑝 𝑥𝑖 = 1
𝐴𝑙𝑙 𝑥

Cumulative distribution function (CDF) : Summing the probabilities for


all outcomes less than or equal to given value.
If x is discrete, than
𝐹 𝑋 = 𝑃 𝑋 ≤ 𝑥 = ෍ 𝑝 𝑥𝑖
𝑎𝑙𝑙 𝑥𝑖 ≤𝑥

26.02.2021 Dr. Ashish Kumar Saxena 9


Any Question ?

26.02.2021 Dr. Ashish Kumar Saxena 10


MEE2013 Modeling and Simulation
of Manufacturing Systems

L2.2 Probability distribution, Concept and example of


discrete probability distribution, Cumulative distribution

Dr. Ashish Kumar Saxena,


Assistant Professor, CIMR
ashishkumar@vit.ac.in
Probability terminology and concepts
Probability distribution:

 Discrete probability distribution : Assign the probabilities (masses)


to individual outcomes
𝑝 𝑥𝑖 = 𝑃 𝑋 ,
Possible value of X may be listed as 𝑥1 , 𝑥2 , 𝑥3 ,……. 𝑥𝑖 . In finite case the list
terminates, in countably infinite case, list continue indefinitely

 Continuous probability distribution : Assign probability density at


individual points, probability of ranges can be obtained by
integrating density function
𝑏
𝑃 𝑎 ≤ 𝑋 ≤ 𝑏 = න 𝑓 𝑥 𝑑𝑥
𝑎

03.03.2021 Dr. Ashish Kumar Saxena 2


Discrete distribution
Probability mass function
𝑝 𝑥𝑖 = 𝑃 𝑋 = 𝑥
𝑝 𝑥𝑖 ≥ 0 ∀𝑥
෍ 𝑝 𝑥𝑖 = 1
𝐴𝑙𝑙 𝑥

Cumulative distribution function (CDF) : Summing the probabilities for


all outcomes less than or equal to given value.
If x is discrete, than
𝐹 𝑋 = 𝑃 𝑋 ≤ 𝑥 = ෍ 𝑝 𝑥𝑖
𝑎𝑙𝑙 𝑥𝑖 ≤𝑥

03.03.2021 Dr. Ashish Kumar Saxena 3


Example of Discrete probability distribution
Example : Rolling of 2 dies
Discrete distribution of the sum of up faces in two dies, following
table gives all possible values of x in Sample space
Die 1 1 2 3 4 5 6
Die 2

1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12
03.03.2021 Dr. Ashish Kumar Saxena 4
Example : Rolling of 2 dies
Here, X is the sum of up faces in two dies
X p(x) F(x)
Probability mass function p(x) and
0 0/36 0
Cumulative distribution function F(x)
1 0/36 0
2 1/36 1/36
𝑛𝑜 𝑜𝑓 𝑤𝑎𝑦𝑠 2𝑑𝑖𝑒𝑠 ℎ𝑎𝑠 𝑠𝑢𝑚 𝑥 3 2/36 3/36
𝑝 𝑥 =
𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟𝑠 𝑜𝑓 𝑟𝑒𝑠𝑢𝑙𝑡𝑠 4 3/36 6/36
5 4/36 10/36
𝑥
6 5/36 15/36
𝐹 𝑥 = ෍ 𝑝(𝑡) 7 6/36 21/36
𝑡=0 8 5/36 26/36
9 4/36 30/36
10 3/36 33/36
11 2/36 35/36
12 1/36 36/36
03.03.2021 Dr. Ashish Kumar Saxena 5
Example : Rolling of 2 dies- Probability Mass Function

03.03.2021 Dr. Ashish Kumar Saxena 6


Example : Rolling of 2 dies- Cumulative Distribution Function

03.03.2021 Dr. Ashish Kumar Saxena 7


Example of Discrete distribution
Bernoulli trails and Bernoulli distribution

• A Bernoulli trial is a random experiment, whose output is binary


i.e. Output True/False, Right/Wrong, 0/1

• If Probability of success is p and Probability of failure is 1-p

• Probability in mass function is defined as


𝑝, 𝑖𝑓 𝑥𝑖 𝑖𝑠 1
𝑓 𝑥 = ቐ1 − 𝑝 = 𝑞, 𝑖𝑓 𝑥𝑖 𝑖𝑠 0
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

• Other parameters of Bernoulli distribution :


Mean =p
Variance = pq

03.03.2021 Dr. Ashish Kumar Saxena 8


Example of Discrete distribution
Binomial distribution
• If Bernoulli trials repeated ‘n’ number of times, than we have
Binomial distribution
• Probability in mass function is defined as
𝑛 𝑥 𝑛−𝑥
𝑝 𝑞 , 𝑥 = 1,2,3 … 𝑛
𝑓 𝑥 =ቐ 𝑥
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑛 𝑛!
• Here q=1-p and =
𝑥 𝑥!(𝑛−𝑥)!

• If X as sum of n independent Bernoulli random variables, each


with mean p and variance p(1-p)=pq.
X= X1+X2+X3…….+Xn

• Other parameter of Binomial distribution The


Mean = np
Variance = npq
03.03.2021 Dr. Ashish Kumar Saxena 9
Problem example 1
In a casting plant, 1% of the casting made are defective
(a)In a particular inspection, eight castings are tested. What are the
probability that all are found to be fine.
(b)Out of 8 tested castings if two of them are found to be defective, the
whole lot will be rejected. What is probability of lot rejection ?
(c)How many samples should be tested to have a 90% chance of
getting 1 defective sample

03.03.2021 Dr. Ashish Kumar Saxena 10


Solution example 1
If p is probability that the casting is defective
q= 1/100= 0.01
Thus the probability that the casting is not defective i.e. all are good
p=1-p=0.99
(a) Since 8 number of casting are tested, thus probability that none of 8
casting is defective = 𝐶08 𝑞0 𝑝8 = 1*(0.99)8=0.9227

(b) As mentioned if 2 casting out of 8 casting defective, whole lot of casting


is get rejected
i.e acceptance case is 0 zero casting defective or 1 casting defective
Total probability of less than 2 casting defective = Sum of (probability of 0
casting defective + 1 casting defective) in selecting 8 castings
=𝐶08 𝑞 0 𝑝8 + 𝐶18 𝑞1 𝑝8−1
=0.9227+0.0746=0.9973
Now the probability that lot is rejected means more than 2 casting are
defective =1- total probability of less than 2 casting defective
=1-0.9927= 0.0027
(c)03.03.2021
Let have n test to have 90% chances of getting 1 defective samples 11
Dr. Ashish Kumar Saxena
𝑞 𝑛 ≥ 0.9  0.99𝑛 ≥ 0.9  n≥11
Poisson distribution
Poisson distribution
• This distribution as an approximation of Binomial distribution

• When Bernoulli trials are large, when p is very small and np is


constant (). Binomial distribution approximates to Poisson
Distribution
𝑥
𝑛 𝑥 𝑛−𝑥 𝜆
i.e. 𝑝 𝑞 gets approximated to 𝑒 −𝜆
𝑥 𝑥!

• When can we approximate Binomial as Poisson ?


A thumb rule n>100 and p<0.005

03.03.2021 Dr. Ashish Kumar Saxena 12


Problem example 2
The probability that a machine develops a fault within the first 3
years of use is 0.0003. If 40 machine selected at random, calculate
the probability that 38 or more will not develop any faults within the
first 3 years of use.

03.03.2021 Dr. Ashish Kumar Saxena 13


Any Question ?

03.03.2021 Dr. Ashish Kumar Saxena 14


03.03.2021 Dr. Ashish Kumar Saxena 1
03.03.2021 Dr. Ashish Kumar Saxena 2
03.03.2021 Dr. Ashish Kumar Saxena 3
03.03.2021 Dr. Ashish Kumar Saxena 4
03.03.2021 Dr. Ashish Kumar Saxena 5
03.03.2021 Dr. Ashish Kumar Saxena 6
03.03.2021 Dr. Ashish Kumar Saxena 7
03.03.2021 Dr. Ashish Kumar Saxena 8
03.03.2021 Dr. Ashish Kumar Saxena 9
03.03.2021 Dr. Ashish Kumar Saxena 10
Problems example 4
In the manufacture of glassware, bubbles can occur in the glass which
reduces the status of glassware to that of ‘second’.
If on average, one in every 1000 items produced has a bubble. Calculate
the probability that exactly 6 items in a batch of 3000 are Second.
Solution
As per question, bubbled glass probability (p)= 1/1000=0.001
Thus, probability of good glassware (q)=1-p= 0.999
Now, the probability of having seconded glassware in a batch of 3000 items
()=np=3000*0.001=0.3
P= Probability of finding 6 seconded glassware

=𝐶63000 𝑝6 𝑞 2994
Using Poisson approximation
𝜆𝑥0 6
0.3
=𝑒 −𝜆 = 𝑒 −0.3
𝑥0! 6!
=
Finally, the probability of exactly 6 seconded glassware =

03.03.2021 Dr. Ashish Kumar Saxena 11


Question 1
A call taxi operates during day time, call arrival time for taxi varies between 10-30min as per
following table demand of call taxi varies

Inter-call
10 15 20 25 30
time (min)
Probability 0.14 0.22 0.43 0.17 0.04

Distribution of service time varies from 5 to 25 minutes, the service time probability
distribution varies as

Service
5 10 15 20 25
Time (min)
Probability 0.10 0.10 0.50 0.20 0.10
First come First serve rule is applicable.
Simulate the first 6 taxi services and obtain the probability that customer has to wait
for the service, average time customer spent in complete process of waiting and
service.

[Please use given that set of 6 random number for solution of problem:
0.24, 0.73, 0.58, 0.42, 0.33, 0.78]
Question 2

Simulate the process of first 10 customers. Find out average waiting time of customer and
average time spend in bank system.
[Please use given that set of 6 random number for solution of problem:
0.28, 0.65, 0.92, 0.87, 0.31, 0.11, 0.73, 0.58, 0.04, 0.33 ]

You might also like