Lecture 2
Lecture 2
Simulation and
Modeling
(Lecture 2)
Azaz Ahmed Kiani
1
Introduction to Simulation
Our aim is not to derive and employ models just for the
description of a circumstance, but for
Subsequent simulation based on these models
System
Collection of interacting components that receives input and
provides output for some purpose
Simulation Modelling and Analysis
Process of creating and experimenting with
Computerized mathematical model of a physical system
2
Many different types of systems can be
simulated
Material-handling simulations
Include analysis of cranes, forklifts, and automatically guided
vehicles
Warehousing simulations
Involve manual or automated storage and retrieval of raw
materials or finished goods
Hospital and medical clinic models
Simulated to determine the number of rooms, nurses, and
physicians for a particular location.
Airport operations
Simulations performed on airport security checkpoints, check-in
counters, and gate assignments.
Information technology models
Involve how many and what type of network or support resources3
to have available.
Purposes of Simulation
Gaining insight into the operation of a system
Developing operating or resource policies to
Improve system performance
Testing new concepts and / or systems
Before implementation to know
Performance of new system before purchasing new system
Gaining information without disturbing the actual
critical or sensitive system
E.g. security checkpoint at a commercial airport
4
Advantages to Simulation
Experimentation in Compressed Time
Because some processes may take months or even years to
complete
Reduced Analytic Requirements
Study systems dynamically in real time during simulation runs
Easily Demonstrated Models
Most simulation-specific software packages possess the
capability of
Dynamically animating the model operation
5
Disadvantages to Simulation
Simulation cannot give accurate results when
Input data are inaccurate
Simulation cannot provide easy answers to
Complex problems
Simulation cannot solve problems by itself
Potential solutions are developed but are never or only poorly
implemented because of
Organizational inertia
Political considerations
6
Basic Simulation Model
Components
Simple system consists of Three types of major
components
Entities
Queues
Resources
7
Entities
Something that changes the state of the system
Entities could be
People
Objects
Entity Batches:
Number of entities that arrive in the system at the same
system
Even though the entity attribute will have the same name,
there could be
As many different values as there are entities
Example
Entity’s arrival time
Each entity’s attribute ARRTIME would store
Simulation system time that the Entity arrived in the system 9
Queues
Simulation term for
Lines
Entities generally wait in a queue until it is their turn to be
processed
queue itself is a concept
Simple systems generally use
First-In-First-Out (FIFO) queue priorities
10
Resources
Resources
Process or Serve entities that are in Queue
Examples
Customer service representatives
Barbers
Loan officers
ATMs
In simple models, resources can be either
Idle or
Busy.
11
Basic Simulation Model
Components
12
Simulation Event List
The simulation event list is a means of keeping track of
the different things that occur during a simulation run
(Law and Kelton, 2000).
Anything that occurs during the simulation run that can
affect the state of the system is defined as an event.
Entity arrivals to the queue
14
System Time
Total amount of time that the entity spends in the system
System time begins
Entity arrives in the system and enters the queue.
System time ends
Entity’s service time is complete and it exits the system
Where
Ti = the system time for an individual entity (arrival time – departure
time)
n = the number of entities that are processed through the system
15
Queue Time
Time that an entity spends in the queue
Waiting time in the queue
Where
Di = Queue time for an individual entity
(Queue arrival time – Service begin time)
n = Number of entities that are processed through the queue
16
Time-Average Number in
Queue
Time-average number in queue is
Time-dependent statistic
It is the average number of entities that you could expect
to see in the queue at any given time during the period of
interest
Where
Q = Number in the queue for a given length of time.
dt = Length of time that Q is observed.
T = Total length of time for the simulation.
17
Time-Average Number in
Queue
Manual calculations of the time-average number in
queue are best handled by
Drawing a two-axis graph of the system.
Vertical axis records the number of entities in the queue.
Horizontal axis records the simulation time.
Line is drawn at the number of entities in the queue for
Length of time that number of entities is in the queue.
18
Time-Average Number in
Queue
Entity time is calculated by
Calculating the area of each box.
Area of each Box : Number of entities (N) waiting
multiplied by
Ending time (Eet) for that number of entities in the queue minus
starting time (Est) for that number of entities in the queue.
Area =( N *(Edt - Est))
Total area is calculated by
Summing all of individual areas
Time average number in queue is then calculated by
Dividing the total area by the length of the simulation run.
19
Resource Utilization
Resource utilization is also a time-dependent statistic
At any given time a single resource can be either
Idle
Busy
Idle state corresponds to
Resource utilization level of 0
Busy state corresponds to
Resource utilization level of 1.
Average resource utilization is
21
Summary
Any Questions?
22