You are on page 1of 67

SIMULATION

7/6/2014 Dr. DEGA NAGARAJU, SMBS 1


Manufacturi

Application
ng

s
Areas of
Business Process Applications
Simulation

7/6/2014 Dr. DEGA NAGARAJU, SMBS 2


Applications:
COMPUTER SYSTEMS: hardware components, software
systems, networks, data base management, information
processing, etc..
MANUFACTURING: material handling systems, assembly
lines, automated production facilities, inventory control
systems, plant layout, etc..
BUSINESS: stock and commodity analysis, pricing policies,
marketing strategies, cash flow analysis, forecasting, etc..
GOVERNMENT: military weapons and their use, military
tactics, population forecasting, land use, health care
delivery, fire protection, criminal justice, traffic control, etc..

And the list goes on and on...


7/6/2014 Dr. DEGA NAGARAJU, SMBS 3
Examples of Applications at Disney World

Cruise Line Operation: Simulate the arrival and


check-in process at the dock.

Private Island Arrival: How to transport passengers


to the beach area? Drop-off point far from the
beach. Used simulation to determine whether
to invest in trams, how many trams to purchase,
average transport and waiting times, etc..

7/6/2014 Dr. DEGA NAGARAJU, SMBS 4


A few more applications

Transportation systems:
War gaming: test Flight Simulator
improved operations; urban
strategies; training planning

Games
Parallel computer systems: Computer communication
developing
7/6/2014 scalable software
Dr. DEGA NAGARAJU, SMBS
network: protocol design 5
Logical
extension to
the analytical
Is it possible to
&
represent all real
mathematical
life problems
techniques
mathematically?

Managerial decision
making Why do we
Aircraft-wind tunnel- go for
aerodynamic simulation
characteristics ?
Scale models of
machines-plant layout
Pilot training-flight Method of
simulator John Von Neumann & last resort
Car Manufacturing Stanislaw Ulam
Simulation Nuclear Shielding
TV games(chess playing problem
game, snake and 1950-Digital Computers
7/6/2014 Dr. DEGA NAGARAJU, SMBS 6
ladders)
Certain processes : too costly or impossible
Difficult-mathematical equations
Draw backs No straight forward analytical solution
of scientific Ex: queuing problems, job shop problems,
methods? multi-integral problems etc.
Difficulty in performing validating
experiments for mathematical models

Dynamic programming, queuing theory,


network models
Why do Draw backs of Dynamic programming-optimal strategies-
we go for Analytical uncertainties-analyze multi-planning
methods? problems
simulati- DP-simple cases-less number of static
on? variables

LPP-data does not change over the entire


Draw backs of planning horizon
iterative One time decision process-average values for
methods? decision variables
Many real life situations-uncertainties
7/6/2014 Dr. DEGA NAGARAJU, SMBS 7
Websters Dictionary:
to assume the mere appearance of ,
without the reality

7/6/2014 Dr. DEGA NAGARAJU, SMBS 8


Definition:
Simulation is the process of designing a
model of a real system and conducting
experiments with this model for the purpose
of either understanding the behavior of the
system and/or evaluating various strategies
for the operation of the system.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 9


Allows us to:
Model complex systems in a detailed way
Describe the behavior of systems
Construct theories or hypotheses that account for
the observed behavior
Use the model to predict future behavior, that is,
the effects that will be produced by changes in the
system
Analyze proposed systems
7/6/2014 Dr. DEGA NAGARAJU, SMBS 10
Brief History Not a very old technique...
World War II

Monte Carlo simulation: originated with


the work on the atomic bomb. Used to
simulate bombing raids. Given the
security code name Monte-Carlo.

Still widely used today for certain problems


which are not analytically solvable (for
example: complex multiple integrals)
7/6/2014 Dr. DEGA NAGARAJU, SMBS 11
Brief History (cont..)
Late 50s, early 60s
Computers improve
First languages introduced: SIMSCRIPT,
GPSS (General purpose simulation system) (IBM)
Simulation viewed at the tool of last resort

Late 60s, early 70s


Primary computers were mainframes: accessibility
and interaction was limited
GASP IV introduced by Pritsker. Triggered a wave
of diverse applications. Significant in the evolution
of simulation.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 12


Brief History (cont.)
Late 70s, early 80s
SLAM introduced in 1979 by Pritsker and Pegden.
Models more credible because of sophisticated tools.
SIMAN introduced in 1982 by Pegden. First language
to run on both a mainframe as well as a
microcomputer.
Late 80s through present
Powerful PCs
Languages are very sophisticated (market almost
saturated)
Major advancement: graphics. Models can now be animated.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 13


What can be simulated?
Almost anything can

and

almost everything has...

7/6/2014 Dr. DEGA NAGARAJU, SMBS 14


Introduction to Simulation
Real-world A set of assumptions
Modeling &
process concerning the behavior of a system Analysis

Simulation
a) the imitation of the operation of a real-world process or system over time.
b) to develop a set of assumptions of mathematical, logical, and symbolic relationship
between the entities of interest, of the system.
c) to estimate the measures of performance of the system with the simulation-
generated data.

Simulation modeling can be used


a) as an analysis tool for predicting the effect of changes to existing systems.
b) as a design tool to predict the performance of new systems .

7/6/2014 Dr. DEGA NAGARAJU, SMBS 15


Imitation of the
Simulation operation of a real
model world process

Behavior of a Whether done by


system hand or on a
Simula- Computer
Set of Assumptions: It involves
Mathematical, Logical,
tion 1. The generation of
Symbolic relationships an artificial history
b/w entities, Objects of of a system &
interest 2. The observation of
that artificial
Used as: history
an analysis tool,
7/6/2014 a design tool Dr. DEGA NAGARAJU, SMBS 16
Solved by:
Differential Calculus,
Probability Theory,
Algebraic Methods

Simulation
Models
Solution Consists:
One or more numerical
parameters(Measures of
Performance)

Complex real world


systems:
Numerical computer
based simulation
7/6/2014 Dr. DEGA NAGARAJU, SMBS 17
7/6/2014 Dr. DEGA NAGARAJU, SMBS 18
Steps in a Simulation Study
Problem formulation -1
Policy maker/Analyst understand and agree with the formulation.
Setting of objectives and overall project plan -2
Model conceptualization -3
The art of modeling is enhanced by an ability to abstract the
essential features of a problem, to select and modify basic
assumptions that characterize the system, and then to enrich and
elaborate the model until a useful approximation results.
Data collection -4
As the complexity of the model changes, the required data
elements may also change.
Model translation -5
GPSS/HTM or special-purpose simulation software
7/6/2014 Dr. DEGA NAGARAJU, SMBS 19
Steps in a Simulation Study (Contd.)
Verified? -6
Is the computer program performing properly?
Debugging for correct input parameters and logical structure
Validated? -7
The determination that a model is an accurate representation of
the real system.
Validation is achieved through the calibration of the model
Experimental design -8
The decision on the length of the initialization period, the length
of simulation runs, and the number of replications to be made of
each run.
Production runs and analysis -9
7/6/2014
To estimateDr.measures of performances
DEGA NAGARAJU, SMBS 20
Steps in a Simulation Study (Contd.)

More runs? -10


Documentation and reporting -11
Program documentation : for the relationships between input
parameters and output measures of performance, and for a
modification
Progress documentation : the history of a simulation, a
chronology of work done and decision made.
Implementation -12

7/6/2014 Dr. DEGA NAGARAJU, SMBS 21


Steps in a Simulation Study (Contd.)

Four phases according to Figure 1.3


First phase : a period of discovery or orientation
(step 1, step2)
Second phase : a model building and data collection
(step 3, step 4, step 5, step 6, step 7)
Third phase : running the model
(step 8, step 9, step 10)
Fourth phase : an implementation
(step 11, step 12)

7/6/2014 Dr. DEGA NAGARAJU, SMBS 22


The basic nature of Simulation
State changes continuously
Continuous with time Common
Deterministic in nature features
Two problems essential to
Arrival & Sale of Merchandise
occur in discrete steps simulation
Discrete
Stochastic in nature

Common features:
Mathematical model of the system under study
Change of the state in accordance with some equations (rules or laws) for a
long period
Collection of information about the system (solution to the problem)
Programming the calculations for a digital computer
Simulate or mimic the real system with the help of computer
Continue the process until the desired analytic solution is obtained
7/6/2014 Dr. DEGA NAGARAJU, SMBS 23
The basic nature of Simulation (Cont.)
Simulation of manually Pencil and
Inventory control paper

System which can be


Can also be simulated
simulated on a digital
manually
computer

Simulation as an analytic tool is useful only when done on a computer

7/6/2014 Dr. DEGA NAGARAJU, SMBS 24


The basic nature of Simulation (Cont.)
Experimental technique
To simulate is to
Fast and inexpensive method
experiment
Ex: Inventory control problem

No unifying theory of computer


simulation
No unified theory
No fundamental theorems
No underlying principles

Each application of Simulation is adhoc to a great extent


Simulation is an art

7/6/2014 Dr. DEGA NAGARAJU, SMBS 25


When Simulation is the Appropriate Tool (1)
Simulation enables the study of, and experimentation with, the internal interactions
of a complex system, or of a subsystem within a complex system.
Informational, organizational, and environmental changes can be simulated, and the
effect of these alterations on the models behavior can be observed.
The knowledge gained in designing a simulation model may be of great value
toward suggesting improvement in the system under investigation.
By changing simulation inputs and observing the resulting outputs, valuable insight
may be obtained into which variables are most important and how variables interact.
Simulation can be used as a pedagogical device to reinforce analytic solution
methodologies.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 26


When Simulation is the Appropriate Tool (2)
Simulation can be used to experiment with new designs or policies prior to
implementation, so as to prepare for what may happen.
Simulation can be used to verify analytic solutions.
By simulating different capabilities for a machine, requirements can be
determined.
Simulation models designed for training allow learning without the cost and
disruption of on-the-job learning.
Animation shows a system in simulated operation so that the plan can be
visualized.
The modern system (factory, wafer fabrication plant, service organization, etc.)
is so complex that the interactions can be treated only through simulation.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 27


To study the Study of the internal
interactions of a interactions of a
complex modern complex System
systems: factory,
Effect of
fabrication plant,
Informational,
service organization
organizational and
environmental
changes on model
behavior
Simulation models: When
For training without Simulation is the
the cost and appropriate tool?
Used as a
disruption of on the
pedagogical device
job learning
to reinforce analytic
solution
methodologies
To verify analytic
Experimentation
solutions
with new design
7/6/2014 Dr. DEGA NAGARAJU, SMBS 28
When Simulation is not Appropriate
When the problem can be solved using common sense.
When the problem can be solved analytically.
When it is easier to perform direct experiments.
When the simulation costs exceed the savings.
When the resources or time are not available.
When system behavior is too complex or cant be defined.
When there isnt the ability to verify and validate the model.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 29


resources or
time are not
When the

available
When
When there is nt the Simulation is When the simulation costs
ability to verify and not exceed the savings
validate the model
Appropriate?
common sense
can be solved using
When the problem

7/6/2014 Dr. DEGA NAGARAJU, SMBS 30


Advantages and Disadvantages of Simulation (1)

Advantages
New polices, operating procedures, decision rules, information flows, organizational
procedures, and so on can be explored without disrupting ongoing operations of the
real system.
New hardware designs, physical layouts, transportation systems, and so on, can be
tested without committing resources for their acquisition.
Hypotheses about how or why certain phenomena occur can be tested for feasibility.
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 indicating where work-in-process, information,
materials, and so on are being excessively delayed.
A simulation study can help in understanding how the system operates rather than how
individuals think the system operates.
What-if questions can be answered. This is particularly useful in the design of new
system.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 31


Advantages and Disadvantages of Simulation (2)
Disadvantages
Model building requires special training. It is an art that is learned over time and
through experience. Furthermore, if two models are constructed by two competent
individuals, they may have similarities, but it is highly unlikely that they will be the
same.
Simulation results may be difficult to interpret. Since most simulation outputs are
essentially random variables (they are usually based on random inputs), it may be
hard to determine whether an observation is a result of system interrelationships or
randomness.
Simulation modeling and analysis can be time consuming and expensive. Skimping
on resources for modeling and analysis may result in a simulation model or analysis
that is not sufficient for the task.
Simulation is used in some cases when an analytical solution is possible, or even
preferable, as discussed in Section 1.2. This might be particularly true in the
simulation of some waiting lines where closed-form queueing models are available.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 32


Advantages of Simulation
New polices, operating procedures, decision rules, information flows, organizational procedures, and so on can be
1 explored without disrupting ongoing operations of the real system

New hardware designs, physical layouts, transportation systems, and so on, can be tested without committing
2 resources for their acquisition.

Hypotheses about how or why certain phenomena occur can be tested for feasibility.
3

Insight can be obtained about the interaction of variables.


4

Insight can be obtained about the importance of variables to the performance of the system.
5

Bottleneck analysis can be performed indicating where work-in-process, information, materials, and so on are being
6 excessively delayed

A simulation study can help in understanding how the system operates rather than how individuals think the system
7 operates.

What-if questions can be answered. This is particularly useful in the design of new system.
8
7/6/2014 Dr. DEGA NAGARAJU, SMBS 33
Disadvantages of Simulation
Model building requires special training. It is an art that is learned over time and through experience.
Furthermore, if two models are constructed by two competent individuals, they may have similarities,
1 but it is highly unlikely that they will be the same.

Simulation results may be difficult to interpret. Since most simulation outputs are essentially random
variables (they are usually based on random inputs), it may be hard to determine whether an
2 observation is a result of system interrelationships or randomness.

Simulation modeling and analysis can be time consuming and expensive. Skimping on resources for
modeling and analysis may result in a simulation model or analysis that is not sufficient for the task.
3

Simulation is used in some cases when an analytical solution is possible, or even preferable. This
might be particularly true in the simulation of some waiting lines where closed-form queueing
4 models are available.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 34


Manufacturi

Application
ng

s
Areas of
Business Process Applications
Simulation

7/6/2014 Dr. DEGA NAGARAJU, SMBS 35


Applications:
COMPUTER SYSTEMS: hardware components, software
systems, networks, data base management, information
processing, etc..
MANUFACTURING: material handling systems, assembly
lines, automated production facilities, inventory control
systems, plant layout, etc..
BUSINESS: stock and commodity analysis, pricing policies,
marketing strategies, cash flow analysis, forecasting, etc..
GOVERNMENT: military weapons and their use, military
tactics, population forecasting, land use, health care
delivery, fire protection, criminal justice, traffic control, etc..

And the list goes on and on...


7/6/2014 Dr. DEGA NAGARAJU, SMBS 36
Examples of Applications at Disney World

Cruise Line Operation: Simulate the arrival and


check-in process at the dock.

Private Island Arrival: How to transport passengers


to the beach area? Drop-off point far from the
beach. Used simulation to determine whether
to invest in trams, how many trams to purchase,
average transport and waiting times, etc..

7/6/2014 Dr. DEGA NAGARAJU, SMBS 37


Examples of Applications at Disney World

Bus Maintenance Facility: Investigated best way


of scheduling preventative maintenance trips.

Alien Encounter Attraction: Visitors move through


three areas. Encountered major variability
when ride opened due to load and unload
times (therefore, visitors waiting long periods
before getting on the ride). Used simulation
to determine the length of the individual shows
so as to avoid bottlenecks.
7/6/2014 Dr. DEGA NAGARAJU, SMBS 38
A few more applications

Transportation systems:
War gaming: test Flight Simulator
improved operations; urban
strategies; training planning

Games
Parallel computer systems: Computer communication
developing
7/6/2014 scalable software
Dr. DEGA NAGARAJU, SMBS
network: protocol design 39
MODEL OF A SYSTEM Yes, but not always

How do we
Is it possible to
define the
conduct experiment
system
model? with the system?

Body of information gathered about


the system to study the system. New system may not yet exist. It may
be in hypothetical form or at the
No unique model of the system
For same system-different models-by
Why do we design stage.
Example: Developing & testing of
different analysts study the prototype models can be very
How the model
System? expensive and time consuming
is derived for Even System exists: No
experimentation.
the system? Example:
Establish the model To understand the relationships b/w its Is it possible to double the
Structure: System boundary, components or to predict how the system will unemployment rate to determine the
entities, attributes and operate under a new policy effect of employment on inflation?
activities of the system. Is it possible to reduce the number of
tellers at the bank to study the effect
Provide the data: Values of on the length of waiting lines?
the attributes, relationships Is it feasible to change the supply and
among the activities. demand of goods arbitrarily to study
the economic systems?
7/6/2014 Dr. DEGA NAGARAJU, SMBS 40
Example for the Model of a System
ENTITY ATTRIBUTE ACTIVITY

SHOPPER NO OF ITEMS
ARRIVE
GET
BASKET AVAILABILITY
SHOP
QUEUE
CHECK-OUT

COUNTER NUMBER OF
OCCUPANCY
RETURN
LEAVE
Elements of a Super Market

7/6/2014 Dr. DEGA NAGARAJU, SMBS 41


Types of models

Physical Mathematical

Static Dynamic Static Dynamic

Numerical Analytical Analytical Numerical

System
Simulation

TYPES OF MODELS
7/6/2014 Dr. DEGA NAGARAJU, SMBS 42
Based on some analogy b/w such systems as
Physical Models: mechanical & electrical, electrical & hydraulic
System attributes are represented by such
measurements as a voltage or the position of a
shaft
System activities are reflected in the physical
laws that drive the model:
Example: amount of voltage applied speed of
the shaft of the motor
Voltage applied Velocity of the vehicle
Number of revolutions of the shaft distance
traveled by the vehicle

Mathematical Used symbolic notations, mathematical


equations etc.
Models: System attributes are represented by variables
System activities are represented by
mathematical functions

7/6/2014 Dr. DEGA NAGARAJU, SMBS 43


Also called as Monte Carlo Simulation
Static Models: Represents the system at a particular point in time

Represents systems as they change over time


Dynamic Models: Example: Simulation of a bank from 9.00 am to
4.00 pm
Only certain forms of equations are solved
Analytical Models: Example: Linear differential equations are solved

Computational procedure is used to solve the


Numerical Models: models

7/6/2014 Dr. DEGA NAGARAJU, SMBS 44


Monte Carlo Simulation

Statistical distribution functions are created by using a


series of random numbers.
Data can be developed for many months or years in a
matter of few minutes on a digital computer.
Used to solve the problems which cant be adequately
represented by mathematical models or where
the solution of the model is not possible by
analytical method.
The solution obtained is very close to the optimal but
not exact.
7/6/2014 Dr. DEGA NAGARAJU, SMBS 45
Objectives, Variables, parameters, decision rules,
factors affecting conditions to carry experimentation, type of
the objectives 1. Problem distribution used, the manner in which time
Definition is changed, relationship b/w variables and
parameters

6. Evaluate the
2. Construct an
results of the
appropriate model
simulation

Select the best


course of action
Steps in Monte Starting conditions
for the simulation,
Carlo Simulation number of
simulation runs

5. Summarize & 3. Prepare the


examine the results model for
obtained in step 4 experimentation

Select the random number generator and create Define a coding system that will
the random numbers to be used;
4. Using steps 1 to
3, experiment with correlate the factors defined in step
Associate the generated random numbers with 1 with random numbers to be
the factors identified in step 1 and coded in step the model generated;
4(i)7/6/2014 Dr. DEGA NAGARAJU, SMBS 46
Systems and System Environment
System
defined as a group of objects that are joined together in some regular
interaction or interdependence toward the accomplishment of some
purpose.

System Environment
changes occurring outside the system.

The decision on the boundary between the system and its environment
may depend on the purpose of the study.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 47


Components of a System
Entity : an object of interest in the system.
Attribute : a property of an entity.
Activity : a time period of specified length.
State : the collection of variables necessary to describe the
system at any time, relative to the objectives of the
study.
Event : an instantaneous occurrence that may change the
state of the system.
Endogenous : to describe activities and events occurring
within a system.
Exogenous : to describe activities and events in an
environment that affect the system.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 48


Components of a System

7/6/2014 Dr. DEGA NAGARAJU, SMBS 49


Discrete and Continuous Systems
Systems can be categorized as discrete or continuous.
Bank : a discrete system
The head of water behind a dam : a continuous system

7/6/2014 Dr. DEGA NAGARAJU, SMBS 50


DISCRETE SYSTEMS
State variables change only at a discrete set of points in
time
Example: Bank
State variable: Number of customers in the
bank
Note: The state variable changes only when a new
customer arrives or when the service provided to the
customer is completed
7/6/2014 Dr. DEGA NAGARAJU, SMBS 51
CONTINUOUS SYSTEMS
State variables change continuously over time
Example: Head of water behind a dam
State variable: Head of water behind a dam
Note: During and for some time after a rain storm,
water flows into the lake behind the dam. Water is
drawn from the dam for flood control and to make
electricity. Evaporation also decreases the water level.
7/6/2014 Dr. DEGA NAGARAJU, SMBS 52
A grocery store has one checkout counter. Customers arrive at this checkout counter at
random from 1 to 8 minutes apart and each interval time has the same probability of
occurrence. The service times vary from 1 to 6 minutes, with probability given below:

Service (minutes) 1 2 3 4 5 6
Probability 0.10 0.20 0.30 0.25 0.10 0.05

Simulate the arrival of 6 customers and calculate (i) Average waiting time for a customer,
(ii) Probability that a customer has to wait, (iii) Probability of a server being idle (iv)
Average service time, (v) Average time between arrival. Use the following sequence of
random numbers:

Random digit for 913 727 015 948 309 922


arrival
Random digit for 84 10 74 53 17 79
service time

Assume the first customer arrives at time 0. Depict the simulation in a tabular form.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 53


ARRIVAL TIME DISTRIBUTION

Time between Probability Cumulative Random digit


arrivals Probability assignment
1 0.125 0.125 001-125
2 0.125 0.250 126-250
3 0.125 0.375 251-375
4 0.125 0.500 376-500
5 0.125 0.625 501-625
6 0.125 0.750 626-750
7 0.125 0.875 751-875
8 0.125 1.000 876-000

Arrival time varies from 1 to 8 minutes with equal probability, meaning that
the probability of each arrival = 1/8 = 0.125
7/6/2014 Dr. DEGA NAGARAJU, SMBS 54
SERVICE TIME DISTRIBUTION

Cumulative Random digit


Service Time Probability
Probability assignment
1 0.10 0.10 01-10
2 0.20 0.30 11-30
3 0.30 0.60 31-60
4 0.25 0.85 61-85
5 0.10 0.95 86-95
6 0.05 1.00 96-00

7/6/2014 Dr. DEGA NAGARAJU, SMBS 55


SIMULATION TABLE

Time
Time Time
Random Random Time Time custome Idle
Custom since Arrival Service custome
No. for No. for service service r spends time of
er last time time -r waits
Arrival Service begins ends in server
arrival in queue
system

1 - - 0 84 4 0 0 4 4 0
2 913 8 8 10 1 8 0 9 1 4
3 727 6 14 74 4 14 0 18 4 5
4 015 1 15 53 3 18 3 21 6 0
5 948 8 23 17 2 23 0 25 2 2
6 309 3 26 79 4 26 0 30 4 1
18 3 21 12

7/6/2014 Dr. DEGA NAGARAJU, SMBS 56


time for customer
Average waiting Total time customer waits in queue 3 0.5
Total no. of customers 6

Pr obability that a
customer has to wait

No. of customers who wait 1
Total no. of customers
0.166
6

being idle
Pr obability of server Total idle time of server 12 0.4
Total run time of system 30

time
Average service Total service time 18 3
Total no. of customer 6

arrivals
Average time between Sum of all times between arrivals(min utes) 26
No. of arrivals 1 6 1

7/6/2014 Dr. DEGA NAGARAJU, SMBS 57


who wait(min utes)
Average waiting time of those Total time customers wait in queue(min utes)
Total number of customers who wait
3
3min utes
1

Total time customer customer spends


Average time customer spends
in the system in the system(min utes)
Total number of customers
21
3.5min utes
6

7/6/2014 Dr. DEGA NAGARAJU, SMBS 58


A book store wishes to carry Ramayana in stock. Demand is probabilistic and
replenishment of stock takes 2 days (i.e., if an order is placed on March 1, it will be
delivered at the end of the day on March 3). The probabilities of demand are given
below: Demand 0 1 2 3 4
(daily)
Probability 0.05 0.10 0.30 0.45 0.10

Each time an order is placed, the store incurs an ordering cost of Rs. 10 per order.
The store also incurs a carrying cost of Rs. 0.50 per book per day. The inventory
carrying cost is calculated on the basis of stock at the time of each day. The manager
of the book store wishes to compare two options for his inventory decision.
A: Order 5 books when the inventory at the beginning of the day plus order
outstanding is less than 8 books.
B: Order 8 books when the inventory at the beginning of the day plus order
outstanding is less than 8.
Currently (beginning of the first day) the store has stock of 8 books plus 6 books
ordered 2 days ago and expected to arrive next day. Using Monte-Carlo Simulation
for 10 cycles, recommend which option the manager should choose. The two digit
random numbers are given below. 89, 34, 78, 63, 61, 81, 39, 16, 13, 73.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 59


Random
Demand Prob. Cum. Prob.
Nos.
0 0.05 0.05 00-04
1 0.10 0.15 05-14
2 0.30 0.45 15-44
3 0.45 0.90 45-89
4 0.10 1.00 90-99

Stock in hand = 8, and


stock on order = 6 (expected next day).

7/6/2014 Dr. DEGA NAGARAJU, SMBS 60


OPTION A

Random Demand Opt. stock Cl. stock Opt. stock Order Cl. Stock
Receipt
No. sales in hand in hand on order Qty. on order
89 3 8 - 5 6 - 6
34 2 5 6 9 - - -
78 3 9 - 6 - 5 5
63 3 6 - 3 5 - 5
61 3 3 - 0 5 5 10
81 3 0 5 2 5 5 10
39 2 2 - 0 10 - 10
16 2 0 5 3 5 - 5
13 1 3 5 7 0 5 5
73 3 7 - 4 5 - 5
No. of orders =4 Ordering cost = 4 x 10 = Rs. 40.
Closing stock of 10 days = 39, Carrying cost = 39 x 0.50 = 19.50
Cost for 10 days = 59.50

7/6/2014 Dr. DEGA NAGARAJU, SMBS 61


OPTION B

Random Demand Opt. stock Cl. stock Opt. stock Order Cl. Stock
Receipt
No. sales in hand in hand on order Qty. on order
89 3 8 - 5 6 - 6
34 2 5 6 9 - - -
78 3 9 - 6 - 8 8
63 3 6 - 3 8 - 8
61 3 3 - 0 8 - 8
81 3 3 8 5 - 8 8
39 2 5 - 3 8 - 8
16 2 3 - 1 8 - 8
13 1 1 8 8 - - -
73 3 8 - 5 - 8 8
No. of orders =3 Ordering cost = 3 x 10 = Rs. 30.
Closing stock of 10 days = 45, Carrying cost = 45 x 0.50 = 22.50
Cost for 10 days = 52.50
Since, option B has lower cost, manager should choose option B
7/6/2014 Dr. DEGA NAGARAJU, SMBS 62
Discrete-event simulation (General Principles)

The basic building blocks of all discrete-event simulation models


: entities and attributes, activities and events.

A system is modeled in terms of


its state at each point in time
the entities that pass through the system and the entities that represent
system resources
the activities and events that cause system state to change.

Discrete-event models are appropriate for those systems for which changes in
system state occur only at discrete points in time.

This chapter deals exclusively with dynamic, stochastic systems (i.e.,


involving time and containing random elements) which change in a discrete
manner.
7/6/2014 Dr. DEGA NAGARAJU, SMBS 63
System : A collection of entities (e.g., people and machines) that interact
together over time to accomplish one or more goals.
Model : An abstract representation of a system, usually containing
structural, logical, or mathematical relationships which describe a
system in terms of state, entities and their attributes, sets, processes,
events, activities, and delays.
System state : A collection of variables that contain all the information
necessary to describe the system at any time.
Entity : Any object or component in the system which requires explicit
representation in the model (e.g., a server, a customer, a machine).
Attributes : The properties of a given entity (e.g., the priority of a waiting
customer, the routing of a job through a job shop).

7/6/2014 Dr. DEGA NAGARAJU, SMBS 64


List : A collection of (permanently or temporarily) associated entities, ordered
in some logical fashion (such as all customers currently in a waiting line,
ordered by first come, first served, or by priority).
Event : An instantaneous occurrence that changes the state of a system
(such as an arrival of a new customer).
Event notice : A record of an event to occur at the current or some future
time, along with any associated data necessary to execute the
event; at a minimum, the record includes the event type and
the event time.
Event list : A list of event notices for future events, ordered by time of
occurrence also known as the future event list (FEL).
Activity : A duration of time of specified length (e.g., a service time or
inter arrival time), which is known when it begins (although it may be
defined in terms of a statistical distribution).

7/6/2014 Dr. DEGA NAGARAJU, SMBS 65


Delay : A duration of time of unspecified indefinite length, which is not
known until it ends (e.g., a customer's delay in a last-in, first-out
waiting line which, when it begins, depends on future arrivals).
Clock : A variable representing simulated time, called CLOCK in the
examples to follow.
An activity typically represents a service time, an inter arrival time, or any other
processing time whose duration has been characterized and defined by the modeler.

An activity's duration may be specified in a number of ways:


1. Deterministic-for example, always exactly 5 minutes;
2. Statistical-for example, as a random draw from among 2, 5, 7 with equal
probabilities;
3. A function depending on system variables and/or entity attributes-for example,
loading time for an iron ore ship as a function of the ship's allowed cargo
weight and the loading rate in tons per hour.

7/6/2014 Dr. DEGA NAGARAJU, SMBS 66


7/6/2014 Dr. DEGA NAGARAJU, SMBS 67

You might also like