SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
Simulation examples
Presented by:
Md. Habibur Rahman (11-94853-2)
Adnan Mehedi (12-95467-1)
Course:
Simulation and Modeling Techniques
Instructor:
Dr. Md. Shamim Akhter
 Example: Bagha
• Today, Bilal works alone at the bar at Bagha in
Gulshan 2, Road 44
• When a customer arrives, he/she is served if Bilal
is free.
• Otherwise, he/she joins the queue.
• Customers are served using a “first come, first
served” logic.
• When Bilal has finished serving a customer,
• he starts serving the next customer in line, or
• waits for the next customer to arrive if the
queue is empty.
Discrete-Event Simulation
 The amount of time required by Bilal to
serve a customer is a random variable Xs
with pdf fs.
 unt of time between the arrival of two
customers is a random variable Xa with
pdf fa.
 Bagha does not accept the arrival of
customers after time T.
Discrete-Event Simulation (cont.)
Possible questions:
 In average, how much time does a
customer wait after his/her arrival, until
being served?
 Data needed:
• Inter-arrival times of customers
• Service times
Discrete-Event Simulation (cont.)
 Consider this scenario at Bagha
 Simulation clock: 15
Discrete-Event Simulation (cont.)
Arrival
interval
Customer
arrives
Begin
service
Service
duration
Service
complete
5 5 5 2 7
1 6 7 4 11
3 9 11 3 14
3 12 14 1 15
 What can we calculate at the end of
simulation?
 Average waiting time for a customer: 1.25
 P(customer has to wait): 0.75
 P(Server busy): 0.66
 Average queue length: 0.33
Statistics – Performance Measures
Average Wait time for a customer
= total time customers wait in queue
total number of customers
Average wait time of those who wait
= total time of customers who wait in queue
number of customers who wait
Statistics – Performance Measures
Proportion of server busy time
= number of time units server busy
total time units of simulation
Average service Time
= total service time
number of customers serviced
More Statistics
Average time customer spends in system
= total time customers spend in system
total number of customers
Probability a customer has to wait in queue
= number of customers who wait
total number of customers
More Statistics
 One possible problem formulation:
• "Customers have to wait too long in my bank"
 A typical objective:
• Determine the effect of an additional cashier
on the mean queue length
The queue in the bank
A typical simulation result
 Event notice: A data record specifying an
event
• The event notice must contain all the
information necessary to execute the event (in
particular the time it is scheduled to occur)
 (Future) event list: A list of event notices
for future events
• The event list is the main data structure in a
discrete-event simulator
Event Notice, Event List
 The (future) event list (FEL) controls the
simulation
 The FEL contains all future events that are
scheduled
 The FEL is ordered by increasing time of
event notice
 Example FEL (at some simulation time ≤ t1):
The Event List
 Example: Simulation of the Mensa:
 Some state variables:
• # people in line 1
• # people at meal line 1 & 2
• # people at cashier 1 & 2
• # people eating at tables
The Event List
The Event List
 Operations on the FEL:
• Insert an event into FEL (at appropriate
position!)
• Remove first event from FEL for processing
• Delete an event from the FEL
 The FEL is thus usually stored as a linked
list
Simulation Algorithm
Simulation Algorithm
 Usually, activities last for varying amounts
of time:
• Inter-arrival times at bank
• Service times at bank
• Time to failure for a machine
• Time that a user program runs
 Such times are random or stochastic
Timing
 The simulator will need to use random
variables
 We will need to do some statistics
 For event list, we will need more advanced
data structures (trees): O(log n)
 Improve understanding of system
 Study new designs without interrupting
real system
Conclusion
Thank you 

Weitere ähnliche Inhalte

Was ist angesagt?

Unit2 montecarlosimulation
Unit2 montecarlosimulationUnit2 montecarlosimulation
Unit2 montecarlosimulationDevaKumari Vijay
 
Simulation Techniques
Simulation TechniquesSimulation Techniques
Simulation Techniquesmailrenuka
 
Introduction to Simulation
Introduction to SimulationIntroduction to Simulation
Introduction to Simulationchimco.net
 
Class 2 variables, classes methods...
Class 2   variables, classes methods...Class 2   variables, classes methods...
Class 2 variables, classes methods...Fernando Loizides
 
Queuing theory network
Queuing theory networkQueuing theory network
Queuing theory networkAmit Dahal
 
Monte Carlo Simulations
Monte Carlo SimulationsMonte Carlo Simulations
Monte Carlo Simulationsgfbreaux
 
Unit 1 introduction to simulation
Unit 1 introduction to simulationUnit 1 introduction to simulation
Unit 1 introduction to simulationDevaKumari Vijay
 
Waiting line model(or presentation)
Waiting line model(or presentation)Waiting line model(or presentation)
Waiting line model(or presentation)Muhammad NasRi
 

Was ist angesagt? (11)

Simulation
SimulationSimulation
Simulation
 
Unit2 montecarlosimulation
Unit2 montecarlosimulationUnit2 montecarlosimulation
Unit2 montecarlosimulation
 
Simulation Techniques
Simulation TechniquesSimulation Techniques
Simulation Techniques
 
Introduction to Simulation
Introduction to SimulationIntroduction to Simulation
Introduction to Simulation
 
Class 2 variables, classes methods...
Class 2   variables, classes methods...Class 2   variables, classes methods...
Class 2 variables, classes methods...
 
Queuing theory network
Queuing theory networkQueuing theory network
Queuing theory network
 
Monte Carlo Simulations
Monte Carlo SimulationsMonte Carlo Simulations
Monte Carlo Simulations
 
Queuing unit v ppt
Queuing unit v pptQueuing unit v ppt
Queuing unit v ppt
 
Unit 1 introduction to simulation
Unit 1 introduction to simulationUnit 1 introduction to simulation
Unit 1 introduction to simulation
 
Waiting line model(or presentation)
Waiting line model(or presentation)Waiting line model(or presentation)
Waiting line model(or presentation)
 
Aa4506146150
Aa4506146150Aa4506146150
Aa4506146150
 

Ähnlich wie Simulation and modeling

Ähnlich wie Simulation and modeling (20)

Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)
 
Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)Queuing theory and simulation (MSOR)
Queuing theory and simulation (MSOR)
 
DES
DES DES
DES
 
Flow queue analysis co4.pptx business process management
Flow  queue analysis co4.pptx business process managementFlow  queue analysis co4.pptx business process management
Flow queue analysis co4.pptx business process management
 
Lecture7-QuantitativeAnalysis2.pptx
Lecture7-QuantitativeAnalysis2.pptxLecture7-QuantitativeAnalysis2.pptx
Lecture7-QuantitativeAnalysis2.pptx
 
Chapter 2 variety of modelling
Chapter 2 variety of modellingChapter 2 variety of modelling
Chapter 2 variety of modelling
 
Ssme queueing theory
Ssme queueing theorySsme queueing theory
Ssme queueing theory
 
Queuing Theory
Queuing TheoryQueuing Theory
Queuing Theory
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Unit V - Queuing Theory
Unit V - Queuing TheoryUnit V - Queuing Theory
Unit V - Queuing Theory
 
Queuing Theory by Dr. B. J. Mohite
Queuing Theory by Dr. B. J. MohiteQueuing Theory by Dr. B. J. Mohite
Queuing Theory by Dr. B. J. Mohite
 
OM Week 1.pptx
OM Week 1.pptxOM Week 1.pptx
OM Week 1.pptx
 
Introduction to Business Process Analysis and Redesign
Introduction to Business Process Analysis and RedesignIntroduction to Business Process Analysis and Redesign
Introduction to Business Process Analysis and Redesign
 
Unit 4 queuing models
Unit 4 queuing modelsUnit 4 queuing models
Unit 4 queuing models
 
ASH Archit ecture and Advanced Usage.pdf
ASH Archit ecture and Advanced Usage.pdfASH Archit ecture and Advanced Usage.pdf
ASH Archit ecture and Advanced Usage.pdf
 
Future group iift the strategists
Future group iift the strategistsFuture group iift the strategists
Future group iift the strategists
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
QUEUING THEORY
QUEUING THEORY QUEUING THEORY
QUEUING THEORY
 
Ramniwas final
Ramniwas finalRamniwas final
Ramniwas final
 
Simulation chapter 4
Simulation chapter 4Simulation chapter 4
Simulation chapter 4
 

Mehr von Habibur Rahman

Cycling for the body and mind
Cycling for the body and mindCycling for the body and mind
Cycling for the body and mindHabibur Rahman
 
Poster Presentation of the 3rd IEEE Int. Conf. on ICIEV’14
Poster Presentation of the 3rd IEEE Int. Conf. on ICIEV’14Poster Presentation of the 3rd IEEE Int. Conf. on ICIEV’14
Poster Presentation of the 3rd IEEE Int. Conf. on ICIEV’14Habibur Rahman
 
A version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentationA version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentationHabibur Rahman
 
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...Habibur Rahman
 
A tutorial on GreenCloud
A tutorial on GreenCloudA tutorial on GreenCloud
A tutorial on GreenCloudHabibur Rahman
 
A tutorial on CloudSim
A tutorial on CloudSimA tutorial on CloudSim
A tutorial on CloudSimHabibur Rahman
 
Survey on cloud simulator
Survey on cloud simulatorSurvey on cloud simulator
Survey on cloud simulatorHabibur Rahman
 
Performace analysis of mipv4 vs mipv6
Performace  analysis of mipv4 vs mipv6Performace  analysis of mipv4 vs mipv6
Performace analysis of mipv4 vs mipv6Habibur Rahman
 
Localization with mobile anchor points in wireless sensor networks
Localization with mobile anchor points in wireless sensor networksLocalization with mobile anchor points in wireless sensor networks
Localization with mobile anchor points in wireless sensor networksHabibur Rahman
 
Directed diffusion for wireless sensor networking
Directed diffusion for wireless sensor networkingDirected diffusion for wireless sensor networking
Directed diffusion for wireless sensor networkingHabibur Rahman
 

Mehr von Habibur Rahman (11)

Cycling for the body and mind
Cycling for the body and mindCycling for the body and mind
Cycling for the body and mind
 
Poster Presentation of the 3rd IEEE Int. Conf. on ICIEV’14
Poster Presentation of the 3rd IEEE Int. Conf. on ICIEV’14Poster Presentation of the 3rd IEEE Int. Conf. on ICIEV’14
Poster Presentation of the 3rd IEEE Int. Conf. on ICIEV’14
 
A version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentationA version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentation
 
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
Segmentation of Color Image using Adaptive Thresholding and Masking with Wate...
 
A tutorial on GreenCloud
A tutorial on GreenCloudA tutorial on GreenCloud
A tutorial on GreenCloud
 
A tutorial on CloudSim
A tutorial on CloudSimA tutorial on CloudSim
A tutorial on CloudSim
 
H.323 protocol
H.323 protocolH.323 protocol
H.323 protocol
 
Survey on cloud simulator
Survey on cloud simulatorSurvey on cloud simulator
Survey on cloud simulator
 
Performace analysis of mipv4 vs mipv6
Performace  analysis of mipv4 vs mipv6Performace  analysis of mipv4 vs mipv6
Performace analysis of mipv4 vs mipv6
 
Localization with mobile anchor points in wireless sensor networks
Localization with mobile anchor points in wireless sensor networksLocalization with mobile anchor points in wireless sensor networks
Localization with mobile anchor points in wireless sensor networks
 
Directed diffusion for wireless sensor networking
Directed diffusion for wireless sensor networkingDirected diffusion for wireless sensor networking
Directed diffusion for wireless sensor networking
 

Kürzlich hochgeladen

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentMahmoud Rabie
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 

Kürzlich hochgeladen (20)

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Digital Tools & AI in Career Development
Digital Tools & AI in Career DevelopmentDigital Tools & AI in Career Development
Digital Tools & AI in Career Development
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 

Simulation and modeling

  • 1. Simulation examples Presented by: Md. Habibur Rahman (11-94853-2) Adnan Mehedi (12-95467-1) Course: Simulation and Modeling Techniques Instructor: Dr. Md. Shamim Akhter
  • 2.  Example: Bagha • Today, Bilal works alone at the bar at Bagha in Gulshan 2, Road 44 • When a customer arrives, he/she is served if Bilal is free. • Otherwise, he/she joins the queue. • Customers are served using a “first come, first served” logic. • When Bilal has finished serving a customer, • he starts serving the next customer in line, or • waits for the next customer to arrive if the queue is empty. Discrete-Event Simulation
  • 3.  The amount of time required by Bilal to serve a customer is a random variable Xs with pdf fs.  unt of time between the arrival of two customers is a random variable Xa with pdf fa.  Bagha does not accept the arrival of customers after time T. Discrete-Event Simulation (cont.)
  • 4. Possible questions:  In average, how much time does a customer wait after his/her arrival, until being served?  Data needed: • Inter-arrival times of customers • Service times Discrete-Event Simulation (cont.)
  • 5.  Consider this scenario at Bagha  Simulation clock: 15 Discrete-Event Simulation (cont.) Arrival interval Customer arrives Begin service Service duration Service complete 5 5 5 2 7 1 6 7 4 11 3 9 11 3 14 3 12 14 1 15
  • 6.  What can we calculate at the end of simulation?  Average waiting time for a customer: 1.25  P(customer has to wait): 0.75  P(Server busy): 0.66  Average queue length: 0.33 Statistics – Performance Measures
  • 7. Average Wait time for a customer = total time customers wait in queue total number of customers Average wait time of those who wait = total time of customers who wait in queue number of customers who wait Statistics – Performance Measures
  • 8. Proportion of server busy time = number of time units server busy total time units of simulation Average service Time = total service time number of customers serviced More Statistics
  • 9. Average time customer spends in system = total time customers spend in system total number of customers Probability a customer has to wait in queue = number of customers who wait total number of customers More Statistics
  • 10.  One possible problem formulation: • "Customers have to wait too long in my bank"  A typical objective: • Determine the effect of an additional cashier on the mean queue length The queue in the bank
  • 12.  Event notice: A data record specifying an event • The event notice must contain all the information necessary to execute the event (in particular the time it is scheduled to occur)  (Future) event list: A list of event notices for future events • The event list is the main data structure in a discrete-event simulator Event Notice, Event List
  • 13.  The (future) event list (FEL) controls the simulation  The FEL contains all future events that are scheduled  The FEL is ordered by increasing time of event notice  Example FEL (at some simulation time ≤ t1): The Event List
  • 14.  Example: Simulation of the Mensa:  Some state variables: • # people in line 1 • # people at meal line 1 & 2 • # people at cashier 1 & 2 • # people eating at tables The Event List
  • 15. The Event List  Operations on the FEL: • Insert an event into FEL (at appropriate position!) • Remove first event from FEL for processing • Delete an event from the FEL  The FEL is thus usually stored as a linked list
  • 18.  Usually, activities last for varying amounts of time: • Inter-arrival times at bank • Service times at bank • Time to failure for a machine • Time that a user program runs  Such times are random or stochastic Timing
  • 19.  The simulator will need to use random variables  We will need to do some statistics  For event list, we will need more advanced data structures (trees): O(log n)  Improve understanding of system  Study new designs without interrupting real system Conclusion