Queues Chapter 8 (continued)

Slides:



Advertisements
Similar presentations
Simulation. Example: A Bank Simulator We are given: –The number of tellers –The arrival time of each customer –The amount of time each customer requires.
Advertisements

© 2006 Pearson Addison-Wesley. All rights reserved8-1 Chapter 8 Queues CS102 Sections 51 and 52 Marc Smith and Jim Ten Eyck Spring 2008.
Cmpt-225 Queues. A queue is a data structure that only allows items to be inserted at the end and removed from the front Queues are FIFO (First In First.
Chapter 7 Queues. © 2005 Pearson Addison-Wesley. All rights reserved7-2 The Abstract Data Type Queue A queue –New items enter at the back, or rear, of.
Cmpt-225 Simulation. Application: Simulation Simulation  A technique for modeling the behavior of both natural and human-made systems  Goal Generate.
© 2006 Pearson Addison-Wesley. All rights reserved8 A-1 Chapter 8 Queues (slightly modified by Dan Fleck)
Chapter 8 Queues. © 2004 Pearson Addison-Wesley. All rights reserved 8-2 The Abstract Data Type Queue A queue –New items enter at the back, or rear, of.
© 2011 Pearson Addison-Wesley. All rights reserved 8 B-1 Chapter 8 (continued) Queues.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Chapter 7: Queues Data Abstraction & Problem Solving with C++
Chapter 8 Fundamental Sampling Distributions and Data Descriptions.
Chapter 4 Mathematical Expectation.
Chapter 1 Functions Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Queues Chapter 8 (continued)
Chapter 3 Derivatives Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Chapter 7 Queues.
Data Abstraction & Problem Solving with C++
Data Structures Using C++ 2E
Determinants of the Money Supply
Chapter 1 Section 1-2 An Application of Inductive Reasoning: Number Patterns © 2008 Pearson Addison-Wesley. All rights reserved.
Chapter 2 Appendix Basic Statistics and the Law of Large Numbers.
Contracts and Moral Hazards
Chapter 3 Differentiation
© 2010 Pearson Education, Inc. All rights reserved
Chapter 9 Power Series Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Chapter 2 Limits Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
© 2010 Pearson Education, Inc. All rights reserved
Inflation, the Phillips Curve, and Central Bank Commitment
Chapter 13 Queues and Priority Queues
Pay and Productivity: Wage Determination within the Firm
Integration Techniques
Lexical and Syntax Analysis
Chapter 17 Linked Lists.
Chapter 19 Binary Search Trees.
11.7 Motion in Space Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Chapter 4 Inheritance.
Chapter 1 Preliminaries.
Chapter 7 Functions of Random Variables (Optional)
Chapter 14 Graphs and Paths.
Chapter 9 One- and Two-Sample Estimation Problems.
Probability and Probability Distributions
Chapter 10 Datapath Subsystems.
Chapter 5 Integration Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
11.8 Length of Curves Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Chapter 18 Bayesian Statistics.
Chapter 20 Hash Tables.
Copyright © 2011 Pearson Education, Inc
Lial/Hungerford/Holcomb: Mathematics with Applications 10e
Chapter 1 Preliminaries
Chapter 5 Some Discrete Probability Distributions.
Searching for Guinea Pig B: Case Study in Online Research
Chapter 12 Linear Regression and Correlation
Implementing Subprograms
Chapter 16 Nonparametric Statistics.
Chapter 1 Functions Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Chapter 6 Some Continuous Probability Distributions.
Understanding Interest Rates
Chapter 5 Algorithm Analysis.
The Facts to Be Explained
Alternate Proofs of Selected HO Theorems
Introduction: Some Representative Problems
Chapter 4 Mathematical Expectation.
Circuit Characterization and Performance Estimation
The Classical Model with Many Goods
Chapter 2 Part 1 Data and Expressions.
Chapter 6 Dynamic Programming.
Chapter 2 Reference Types.
Chapter 4 Greedy Algorithms.
Copyright © 2011 Pearson Education, Inc
Queues.
Presentation transcript:

Queues Chapter 8 (continued) © 2006 Pearson Addison-Wesley. All rights reserved

Application: Simulation A technique for modeling the behavior of both natural and human-made systems Goal Generate statistics that summarize the performance of an existing system Predict the performance of a proposed system Example A simulation of the behavior of a bank © 2006 Pearson Addison-Wesley. All rights reserved

Application: Simulation Figure 8-14a and 8-14b A blank line at at time a) 0; b) 12 © 2006 Pearson Addison-Wesley. All rights reserved

Application: Simulation Figure 8-14c and 8-14d A blank line at at time c) 20; d) 38 © 2006 Pearson Addison-Wesley. All rights reserved

Application: Simulation An event-driven simulation Simulated time is advanced to the time of the next event Events are generated by a mathematical model that is based on statistics and probability A time-driven simulation Simulated time is advanced by a single time unit © 2006 Pearson Addison-Wesley. All rights reserved

Application: Simulation The bank simulation is concerned with Arrival events Indicate the arrival at the bank of a new customer Departure events Indicate the departure from the bank of a customer who has completed a transaction © 2006 Pearson Addison-Wesley. All rights reserved