0% found this document useful (0 votes)
11 views

Lecture 2

Programming

Uploaded by

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

Lecture 2

Programming

Uploaded by

xxareefa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 22

Introduction to

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

 Animation is useful for


 Debugging the model

 Demonstrating how the model works

 Animation-based debugging allows the practitioner


 To observe flaws in the model logic easily.

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

given time is known as the


 Batch size
 In some systems Batch size is always one
 In others, the entities may arrive in groups of different
sizes
 Examples of batch arrivals are
 Families going to a movie theatre
 Batch sizes may be two, three, four, or more. 8
Entities
Entity Interarrival Times:
 The amount of time between batch arrivals is known as
 Interarrival time
 For model, practitioner provide Interarrival time as
 Input data
Entity Attributes
Variables that have values unique to each entity in the

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

 Beginning of service times for entities

 Ending of service times for entities

 These events change the state of the system because


they can increase or decrease the number of entities in
the system or queue or change the state of the
resources between
 Idle
 Busy 13
Measures of Performance
Statistics
 Always interested in how well the actual system and
hence the system model performs.
 To ascertain this, need to calculate some sort of output
measure to
 Eventually compare with other alternative forms of the model
 Commonly utilized measures of performance (Kelton et
al., 2002):
 System time
 Queue time
 Time average number in queue
 Utilization

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

 B = either 0 for idle or 1 for busy


 dt= the length of time that B is observed
 T= Total length of time for the simulation
20
Resource Utilization
 As with the time-average number in queue, we are summing the
length of time that the resource is either busy or idle and then
dividing by the total time of the simulation run.
 The average utilization rate can be calculated using a bar chart in
the same manner as for the time-average number in queue.
 The only difference is that the vertical axis of the graph can take
only a value of either 0 or 1.

21
Summary

Any Questions?

22

You might also like