Design of discrete-event simulations

Size: px
Start display at page:

Download "Design of discrete-event simulations"

Transcription

1 Design of discrete-event simulations Lecturer: Dmitri A. Moltchanov

2 OUTLINE: Discrete event simulation; Event advance design; Unit-time advance design; Lecture: Design of discrete-event simulations 2

3 1. Discrete event simulation The basic idea: only events change the state of the system; here is not need to track state of the system between these events. The whole system consists of the following components: system under consideration: stochastic process under considerations: product of other processes and RVs. system state: state of the stochastic process. simulation clock: tells the occurrence time of the next event. event list: holder for events. You may consider it as a two dimensional vector: time and event. Lecture: Design of discrete-event simulations 3

4 The idea of the event list is illustrated in the following figure: T i, i = 1, 2,..., are times; E i, i = 1, 2,..., are corresponding events. E 1 T 1 E 2 T 2 E 3 T 3... E i T i... Figure 1: The idea of the event list. Events are identified by event time and event type. There are two general types of events: basic events: these events modify the state of the system: arrivals/departures of customers. additional events: these are events needed by additional tasks of simulation: run, stoppage, collection of data. Lecture: Design of discrete-event simulations 4

5 Algorithm for discrete-event simulation: Initialization procedure: system clock should be set to zero; system state is assigned an initial value; generate list of the event and place the next event to this list. Handling of events during a simulation: system clock should be set to the occurrence time of the first (next) event in event list; handle the event making all appropriate actions associated with the event; update the system state. Stop of simulation. Note that the following is not included: storing of statistical data; statistical analysis of obtained data. Lecture: Design of discrete-event simulations 5

6 1.1. Time advance methods Time advance methods in discrete-event simulations: event-advance method; unit-advance method. unit-time advance: t 0 t 1 t 2 t 3 t 4 t 5 event advance: t 0 t 1 t 3 Figure 2: Time advance techniques in discrete-event simulations. Lecture: Design of discrete-event simulations 6

7 2. Event advance design This is the most popular design of discrete-event simulations. The idea: observe: state of the system changes each time an event occurs; therefore: during time between events state does not change; idea: we can just skip times between events! To implement this idea: each event is associated with a certain clock value; this value gives the time in the future when this event occurs. Treatment of the event: do everything what is needed for treatment of the event; regroup all events that will occur in the future according to values of their clocks; find the one with the smallest clock value; advance the master clock to the time of that event and treat it. Lecture: Design of discrete-event simulations 7

8 Machine interference problem: M unreliable machines; 1 repairmen. Figure 3: A full cycle of the machine. Figure 4: A model for downtime of the machine (queue is of D/D/1/ /M type). Lecture: Design of discrete-event simulations 8

9 Two types of events: arrival to the repairmen s queue; departure after the machine has been fixed. Lecture: Design of discrete-event simulations 9

10 2.1. Future event list Future event list: collection of events that occur in the future. Future event list contains: time of occurrence: determines when the events occurs. type of the event: determines what actions should be taken to process the events; these actions must be associated with all events. The problem: how to effectively determine the next event? we considered examples with only few events; there can be a lot of events; Efficiency of the finding algorithm depends on: amount information kept in the future list; the way how this information is organized. Lecture: Design of discrete-event simulations 10

11 What type of operation are performed in a list: locating the next event and its type: required when advancing the time. deleting the event: required when the events has already been treated. inserting the event in a list: required when generating new event; required when basic event generates conditional events. Basically, there are two ways of organizing a list: using sequential array; using linked list. Lecture: Design of discrete-event simulations 11

12 2.2. Sequential arrays The approach: all future event times are stored sequentially in array. How to implement: associate each event type with a certain integer i; clock associated with this event is stored in the ith position in array. Example: we need N positions in array: clock value of the type 1 event is stored in 1st position; clock value of the type 2 event is stored in 2nd position;... clock value of the type N event is store in Nth position; Figure 5: Using sequential array as a future event list. Lecture: Design of discrete-event simulations 12

13 How to find the next event: locate the smallest value in array of N elements. Example: find the smallest element and its index in array E[i], i = 0, 1,..., N 1: variable smallest returns the smallest element; variable index returns the index of the smallest element. smallest = E[0]; index = 0; for (i=1; i<n; i++) { if (E[i] < smallest) { smallest = E[i]; index = i; } } Lecture: Design of discrete-event simulations 13

14 How to deal with other functions: deletion: set the value of the clock associated with event of type i to very big one; not deleted physically! insertion: update the value of the clock associated with event of type i. not inserted physically! Advantages: insertion and deletion are made very easily; location of the next event depend on the number of event types: complexity is linear in time. Shortcoming: if the number of event types is large location is time consuming; in this case different organization of the future event list should be considered. Lecture: Design of discrete-event simulations 14

15 2.3. Linked list The idea: to access data elements in correct order we store data element; we store pointer to the next element. Definitions: pointer is referred to as link; data element and the link(s) are referred to as node. Example: node consists of two elements: one is data elements, the next one is link; link F points to the first element; link of the last node is set to zero. Figure 6: Using linked list as a future event list. Lecture: Design of discrete-event simulations 15

16 Linked lists: singly linked: nodes are connected by a single link; multiply linked: nodes can be connected by multiple links. Example: singly linked list: node consists of: two data elements: clock value CL i ; type of the event indicating by i. one link to the next element. Note: nodes are arranged in ascending order: CL i < CL j < < CL n. Figure 7: Usage of singly linked list in event advance discrete-event simulation. Lecture: Design of discrete-event simulations 16

17 Implementation example: arrange integer numbers in T in ascending order: create new array P of the same dimension; the content of P (i) is the link to location in T containing element larger than T (i); example: P (1) = 7, next larger after T (1) is T (7)... Notes: F (= 5) is the first element; node: location in T and corresponding location in P. Figure 8: Locating values in a singly linked list. Lecture: Design of discrete-event simulations 17

18 Locating element: we want to locate number 10 in T : using pointer F we check the value stored in the first node: (T (5), P (5)); using pointer P (5) we locate the second node: (T (3), P (3)); using pointer P (3) we locate the third node: (T (1), P (1)); pointer P (1) contains the address we are looking for; general: if we know address of the first node we can locate any element. Note: we can only move forward using singly linked link! Figure 9: Deletion of elements in a singly linked list. Lecture: Design of discrete-event simulations 18

19 Deletion: we want to delete number 10: change the value of the pointer of the previous node; previous node: (T (1), P (1)) = (5, 4); node containing 10 has the pointer P (7) = 4; to delete: set P (1) = P (7) = 4. Note: information is not physically deleted, just not accessible! Figure 10: Deletion of elements in a singly linked list. Lecture: Design of discrete-event simulations 19

20 Insertion: we want to insert number 6: locate two nodes between which we should put 6; starting from the first node we find them as: (5, 7) and (10, 4) (see previous slide); get unused location in T : T (2); set P (1) = 2 to go from T (1) = 5 to T (2) = 6; set T (2) = 6, P (2) = 7 to go from T (2) = 6 to T (7) = 10. Figure 11: Insertion of elements in a singly linked list. Lecture: Design of discrete-event simulations 20

21 2.4. Implementation of linked lists We have to be able: organize data elements and pointers into nodes; access node using pointer; create and delete nodes. There are two ways: use built-in commands to carry these operations (if any); set-up your own storage scheme. Notes: must be long enough to accommodate all events that might be generated; all unused nodes must be linked together to form a pool of free nodes. Lecture: Design of discrete-event simulations 21

22 2.5. Future event list using linked list General notes: nodes are organized such that CL i < CL j < < CL n ; the next event is given by pointer F (first node); when the event occurred and processed it should be deleted; if conditional events are generated they are place in linked list. Advantages: location and deletion is made easily: using linked lists in simulation we have to delete only the first node! Shortcomings we have to use location procedure to insert an event in a linked list; search of the linked lists might be time consuming if the number of event types is large; solution: use better location procedure (e.g. use pointer pointing to the middle of the list)! Lecture: Design of discrete-event simulations 22

23 2.6. Doubly linked lists The main problem of the singly linked lists: we can go only forward! Doubly linked lists: link two successive node with two pointers; we can go forward and backward! Note: there are some advantages for specific applications. Figure 12: Example of the doubly linked list. Lecture: Design of discrete-event simulations 23

24 3. Unit-time advance The basic idea: master clock is advanced in fixed increments of time. How it works: each time clock is advanced all future events clocks is compared to it; if any of these clocks is equal to the master clock this event is processed; if not, clock is advanced again. Note: this is less popular design. t 0 t 1 t 2 t 3 t 4 t 5 Figure 13: Unit-time advance design of discrete-event simulations. Lecture: Design of discrete-event simulations 24

25 Lecture: Design of discrete-event simulations 25

26 Notes of the event clocks: may contain future time with respect to the origin; may reflect the duration of the particular activity: e.g. departure clock may contain the duration of the service. If related clocks are used in simulation: when master clock is advanced by unit time: future clock is reduced by unit times; if any is zero we process the associated event. Lecture: Design of discrete-event simulations 26

27 Example: simulate a single server queue with finite population of customers: AT: interarrival times; ST: service time; MCL: master clock. Lecture: Design of discrete-event simulations 27

28 3.1. Selecting unit-time If all future events clocks are integer: event clocks must be a multiple of unit-time; unit-time must be a smallest common divisor. If some of future events are real we have a problem: some events may occur between two successive time instant of the master clock; occurrence of the events is not known to the master clock. Another problem: some events may occur at the same time instant of the master clock. Figure 14: Certain events may occur in between two successive times of the master clock. Lecture: Design of discrete-event simulations 28

29 Trade-off: time increment must be small enough to ensure that one event occurs in between; if it is too small, it is ineffective. Some rules for choosing unit-time: 1. set the time-unit to the half of the smallest variate generated: we know only probabilistically what will be the smallest variate generated. 2. run multiple pilot simulation with different unit-times to observe their effect: start with very small time-unit; increase it slightly; if there is no effect on results you may increase it again. Lecture: Design of discrete-event simulations 29

30 3.2. Notes on implementation of unit-time advance One can use for future event lists: sequential arrays; linked lists. Advantages: when events are approximately evenly separated from each other; the best case when events are about a unit-time from each other. Shortcomings: when there are few events and they are far apart from each other. Note: practically, no advantages comparing to event advance design. Lecture: Design of discrete-event simulations 30

Discrete-event simulations

Discrete-event simulations Discrete-event simulations Lecturer: Dmitri A. Moltchanov E-mail: moltchan@cs.tut.fi http://www.cs.tut.fi/kurssit/elt-53606/ OUTLINE: Why do we need simulations? Step-by-step simulations; Classifications;

More information

Variance reduction techniques

Variance reduction techniques Variance reduction techniques Lecturer: Dmitri A. Moltchanov E-mail: moltchan@cs.tut.fi http://www.cs.tut.fi/kurssit/elt-53606/ OUTLINE: Simulation with a given accuracy; Variance reduction techniques;

More information

Variance reduction techniques

Variance reduction techniques Variance reduction techniques Lecturer: Dmitri A. Moltchanov E-mail: moltchan@cs.tut.fi http://www.cs.tut.fi/ moltchan/modsim/ http://www.cs.tut.fi/kurssit/tlt-2706/ OUTLINE: Simulation with a given confidence;

More information

Uniform random numbers generators

Uniform random numbers generators Uniform random numbers generators Lecturer: Dmitri A. Moltchanov E-mail: moltchan@cs.tut.fi http://www.cs.tut.fi/kurssit/tlt-2707/ OUTLINE: The need for random numbers; Basic steps in generation; Uniformly

More information

Computer Simulation Techniques: The definitive introduction!

Computer Simulation Techniques: The definitive introduction! Clients CPU Computer Simulation Techniques: The definitive introduction! 1 2 2 3 3 7 b 4 5 6 9 6 9 Yes Is CPU No MCL = tarr queue MCL = MCL + 1 empty? A new arrival event occurs A departure event occurs

More information

1.225J J (ESD 205) Transportation Flow Systems

1.225J J (ESD 205) Transportation Flow Systems 1.225J J (ESD 25) Transportation Flow Systems Lecture 9 Simulation Models Prof. Ismail Chabini and Prof. Amedeo R. Odoni Lecture 9 Outline About this lecture: It is based on R16. Only material covered

More information

GI/M/1 and GI/M/m queuing systems

GI/M/1 and GI/M/m queuing systems GI/M/1 and GI/M/m queuing systems Dmitri A. Moltchanov moltchan@cs.tut.fi http://www.cs.tut.fi/kurssit/tlt-2716/ OUTLINE: GI/M/1 queuing system; Methods of analysis; Imbedded Markov chain approach; Waiting

More information

Outline Resource Introduction Usage Testing Exercises. Linked Lists COMP SCI / SFWR ENG 2S03. Department of Computing and Software McMaster University

Outline Resource Introduction Usage Testing Exercises. Linked Lists COMP SCI / SFWR ENG 2S03. Department of Computing and Software McMaster University COMP SCI / SFWR ENG 2S03 Department of Computing and Software McMaster University Week 10: November 7 - November 11 Outline 1 Resource 2 Introduction Nodes Illustration 3 Usage Accessing and Modifying

More information

Simulation & Modeling Event-Oriented Simulations

Simulation & Modeling Event-Oriented Simulations Simulation & Modeling Event-Oriented Simulations Outline Simulation modeling characteristics Concept of Time A DES Simulation (Computation) DES System = model + simulation execution Data Structures Program

More information

Discrete Event Simulation. Motive

Discrete Event Simulation. Motive Discrete Event Simulation These slides are created by Dr. Yih Huang of George Mason University. Students registered in Dr. Huang's courses at GMU can make a single machine-readable copy and print a single

More information

Queueing Theory and Simulation. Introduction

Queueing Theory and Simulation. Introduction Queueing Theory and Simulation Based on the slides of Dr. Dharma P. Agrawal, University of Cincinnati and Dr. Hiroyuki Ohsaki Graduate School of Information Science & Technology, Osaka University, Japan

More information

Verification and Validation. CS1538: Introduction to Simulations

Verification and Validation. CS1538: Introduction to Simulations Verification and Validation CS1538: Introduction to Simulations Steps in a Simulation Study Problem & Objective Formulation Model Conceptualization Data Collection Model translation, Verification, Validation

More information

Insert Sorted List Insert as the Last element (the First element?) Delete Chaining. 2 Slide courtesy of Dr. Sang-Eon Park

Insert Sorted List Insert as the Last element (the First element?) Delete Chaining. 2 Slide courtesy of Dr. Sang-Eon Park 1617 Preview Data Structure Review COSC COSC Data Structure Review Linked Lists Stacks Queues Linked Lists Singly Linked List Doubly Linked List Typical Functions s Hash Functions Collision Resolution

More information

Ways to study a system System

Ways to study a system System Simulation What is simulation? Simple synonym: imitation We are interested in studying a system Instead of experimenting with the system itself we experiment with a model of the system Ways to study a

More information

Queuing Networks: Burke s Theorem, Kleinrock s Approximation, and Jackson s Theorem. Wade Trappe

Queuing Networks: Burke s Theorem, Kleinrock s Approximation, and Jackson s Theorem. Wade Trappe Queuing Networks: Burke s Theorem, Kleinrock s Approximation, and Jackson s Theorem Wade Trappe Lecture Overview Network of Queues Introduction Queues in Tandem roduct Form Solutions Burke s Theorem What

More information

Topic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number

Topic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number Topic Contents Factoring Methods Unit 3 The smallest divisor of an integer The GCD of two numbers Generating prime numbers Computing prime factors of an integer Generating pseudo random numbers Raising

More information

Clock-driven scheduling

Clock-driven scheduling Clock-driven scheduling Also known as static or off-line scheduling Michal Sojka Czech Technical University in Prague, Faculty of Electrical Engineering, Department of Control Engineering November 8, 2017

More information

4. Multilayer Perceptrons

4. Multilayer Perceptrons 4. Multilayer Perceptrons This is a supervised error-correction learning algorithm. 1 4.1 Introduction A multilayer feedforward network consists of an input layer, one or more hidden layers, and an output

More information

Lecture 7: Simulation of Markov Processes. Pasi Lassila Department of Communications and Networking

Lecture 7: Simulation of Markov Processes. Pasi Lassila Department of Communications and Networking Lecture 7: Simulation of Markov Processes Pasi Lassila Department of Communications and Networking Contents Markov processes theory recap Elementary queuing models for data networks Simulation of Markov

More information

M/G/1 and M/G/1/K systems

M/G/1 and M/G/1/K systems M/G/1 and M/G/1/K systems Dmitri A. Moltchanov dmitri.moltchanov@tut.fi http://www.cs.tut.fi/kurssit/elt-53606/ OUTLINE: Description of M/G/1 system; Methods of analysis; Residual life approach; Imbedded

More information

EE 368. Weeks 3 (Notes)

EE 368. Weeks 3 (Notes) EE 368 Weeks 3 (Notes) 1 State of a Queuing System State: Set of parameters that describe the condition of the system at a point in time. Why do we need it? Average size of Queue Average waiting time How

More information

λ λ λ In-class problems

λ λ λ In-class problems In-class problems 1. Customers arrive at a single-service facility at a Poisson rate of 40 per hour. When two or fewer customers are present, a single attendant operates the facility, and the service time

More information

Chapter 2 Queueing Theory and Simulation

Chapter 2 Queueing Theory and Simulation Chapter 2 Queueing Theory and Simulation Based on the slides of Dr. Dharma P. Agrawal, University of Cincinnati and Dr. Hiroyuki Ohsaki Graduate School of Information Science & Technology, Osaka University,

More information

ISE/OR 762 Stochastic Simulation Techniques

ISE/OR 762 Stochastic Simulation Techniques ISE/OR 762 Stochastic Simulation Techniques Topic 0: Introduction to Discrete Event Simulation Yunan Liu Department of Industrial and Systems Engineering NC State University January 9, 2018 Yunan Liu (NC

More information

Overall Plan of Simulation and Modeling I. Chapters

Overall Plan of Simulation and Modeling I. Chapters Overall Plan of Simulation and Modeling I Chapters Introduction to Simulation Discrete Simulation Analytical Modeling Modeling Paradigms Input Modeling Random Number Generation Output Analysis Continuous

More information

Algorithms and Complexity theory

Algorithms and Complexity theory Algorithms and Complexity theory Thibaut Barthelemy Some slides kindly provided by Fabien Tricoire University of Vienna WS 2014 Outline 1 Algorithms Overview How to write an algorithm 2 Complexity theory

More information

1.225 Transportation Flow Systems Quiz (December 17, 2001; Duration: 3 hours)

1.225 Transportation Flow Systems Quiz (December 17, 2001; Duration: 3 hours) 1.225 Transportation Flow Systems Quiz (December 17, 2001; Duration: 3 hours) Student Name: Alias: Instructions: 1. This exam is open-book 2. No cooperation is permitted 3. Please write down your name

More information

Class 8: Numbers Exercise 3B

Class 8: Numbers Exercise 3B Class : Numbers Exercise B 1. Compare the following pairs of rational numbers: 1 1 i First take the LCM of. LCM = 96 Therefore: 1 = 96 Hence we see that < 6 96 96 1 1 1 1 = 6 96 1 or we can say that

More information

Queues. Principles of Computer Science II. Basic features of Queues

Queues. Principles of Computer Science II. Basic features of Queues Queues Principles of Computer Science II Abstract Data Types Ioannis Chatzigiannakis Sapienza University of Rome Lecture 9 Queue is also an abstract data type or a linear data structure, in which the first

More information

Computation Theory Finite Automata

Computation Theory Finite Automata Computation Theory Dept. of Computing ITT Dublin October 14, 2010 Computation Theory I 1 We would like a model that captures the general nature of computation Consider two simple problems: 2 Design a program

More information

How to deal with uncertainties and dynamicity?

How to deal with uncertainties and dynamicity? How to deal with uncertainties and dynamicity? http://graal.ens-lyon.fr/ lmarchal/scheduling/ 19 novembre 2012 1/ 37 Outline 1 Sensitivity and Robustness 2 Analyzing the sensitivity : the case of Backfilling

More information

Motivation Subgradient Method Stochastic Subgradient Method. Convex Optimization. Lecture 15 - Gradient Descent in Machine Learning

Motivation Subgradient Method Stochastic Subgradient Method. Convex Optimization. Lecture 15 - Gradient Descent in Machine Learning Convex Optimization Lecture 15 - Gradient Descent in Machine Learning Instructor: Yuanzhang Xiao University of Hawaii at Manoa Fall 2017 1 / 21 Today s Lecture 1 Motivation 2 Subgradient Method 3 Stochastic

More information

Introduction to Randomized Algorithms III

Introduction to Randomized Algorithms III Introduction to Randomized Algorithms III Joaquim Madeira Version 0.1 November 2017 U. Aveiro, November 2017 1 Overview Probabilistic counters Counting with probability 1 / 2 Counting with probability

More information

CSE548, AMS542: Analysis of Algorithms, Fall 2017 Date: Oct 26. Homework #2. ( Due: Nov 8 )

CSE548, AMS542: Analysis of Algorithms, Fall 2017 Date: Oct 26. Homework #2. ( Due: Nov 8 ) CSE548, AMS542: Analysis of Algorithms, Fall 2017 Date: Oct 26 Homework #2 ( Due: Nov 8 ) Task 1. [ 80 Points ] Average Case Analysis of Median-of-3 Quicksort Consider the median-of-3 quicksort algorithm

More information

Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I

Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I Diophantine equations are equations intended to be solved in the integers. We re going to focus on Linear Diophantine Equations.

More information

Environment (E) IBP IBP IBP 2 N 2 N. server. System (S) Adapter (A) ACV

Environment (E) IBP IBP IBP 2 N 2 N. server. System (S) Adapter (A) ACV The Adaptive Cross Validation Method - applied to polling schemes Anders Svensson and Johan M Karlsson Department of Communication Systems Lund Institute of Technology P. O. Box 118, 22100 Lund, Sweden

More information

LECTURE 28. Analyzing digital computation at a very low level! The Latch Pipelined Datapath Control Signals Concept of State

LECTURE 28. Analyzing digital computation at a very low level! The Latch Pipelined Datapath Control Signals Concept of State Today LECTURE 28 Analyzing digital computation at a very low level! The Latch Pipelined Datapath Control Signals Concept of State Time permitting, RC circuits (where we intentionally put in resistance

More information

Pipelined Computations

Pipelined Computations Chapter 5 Slide 155 Pipelined Computations Pipelined Computations Slide 156 Problem divided into a series of tasks that have to be completed one after the other (the basis of sequential programming). Each

More information

7 Variance Reduction Techniques

7 Variance Reduction Techniques 7 Variance Reduction Techniques In a simulation study, we are interested in one or more performance measures for some stochastic model. For example, we want to determine the long-run average waiting time,

More information

Lecture 13: Sequential Circuits, FSM

Lecture 13: Sequential Circuits, FSM Lecture 13: Sequential Circuits, FSM Today s topics: Sequential circuits Finite state machines 1 Clocks A microprocessor is composed of many different circuits that are operating simultaneously if each

More information

Hash tables. Hash tables

Hash tables. Hash tables Dictionary Definition A dictionary is a data-structure that stores a set of elements where each element has a unique key, and supports the following operations: Search(S, k) Return the element whose key

More information

Skip Lists. What is a Skip List. Skip Lists 3/19/14

Skip Lists. What is a Skip List. Skip Lists 3/19/14 Presentation for use with the textbook Data Structures and Algorithms in Java, 6 th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser, Wiley, 2014 Skip Lists 15 15 23 10 15 23 36 Skip Lists

More information

Networking = Plumbing. Queueing Analysis: I. Last Lecture. Lecture Outline. Jeremiah Deng. 29 July 2013

Networking = Plumbing. Queueing Analysis: I. Last Lecture. Lecture Outline. Jeremiah Deng. 29 July 2013 Networking = Plumbing TELE302 Lecture 7 Queueing Analysis: I Jeremiah Deng University of Otago 29 July 2013 Jeremiah Deng (University of Otago) TELE302 Lecture 7 29 July 2013 1 / 33 Lecture Outline Jeremiah

More information

CDA6530: Performance Models of Computers and Networks. Chapter 8: Discrete Event Simulation (DES)

CDA6530: Performance Models of Computers and Networks. Chapter 8: Discrete Event Simulation (DES) CDA6530: Performance Models of Computers and Networks Chapter 8: Discrete Event Simulation (DES) Simulation Studies Models with analytical formulas Calculate the numerical solutions Differential equations

More information

Searching, mainly via Hash tables

Searching, mainly via Hash tables Data structures and algorithms Part 11 Searching, mainly via Hash tables Petr Felkel 26.1.2007 Topics Searching Hashing Hash function Resolving collisions Hashing with chaining Open addressing Linear Probing

More information

Exact Simulation of the Stationary Distribution of M/G/c Queues

Exact Simulation of the Stationary Distribution of M/G/c Queues 1/36 Exact Simulation of the Stationary Distribution of M/G/c Queues Professor Karl Sigman Columbia University New York City USA Conference in Honor of Søren Asmussen Monday, August 1, 2011 Sandbjerg Estate

More information

Skip List. CS 561, Lecture 11. Skip List. Skip List

Skip List. CS 561, Lecture 11. Skip List. Skip List Skip List CS 561, Lecture 11 Jared Saia University of New Mexico Technically, not a BST, but they implement all of the same operations Very elegant randomized data structure, simple to code but analysis

More information

Continuous Time Processes

Continuous Time Processes page 102 Chapter 7 Continuous Time Processes 7.1 Introduction In a continuous time stochastic process (with discrete state space), a change of state can occur at any time instant. The associated point

More information

NEW FRONTIERS IN APPLIED PROBABILITY

NEW FRONTIERS IN APPLIED PROBABILITY J. Appl. Prob. Spec. Vol. 48A, 209 213 (2011) Applied Probability Trust 2011 NEW FRONTIERS IN APPLIED PROBABILITY A Festschrift for SØREN ASMUSSEN Edited by P. GLYNN, T. MIKOSCH and T. ROLSKI Part 4. Simulation

More information

Time Reversibility and Burke s Theorem

Time Reversibility and Burke s Theorem Queuing Analysis: Time Reversibility and Burke s Theorem Hongwei Zhang http://www.cs.wayne.edu/~hzhang Acknowledgement: this lecture is partially based on the slides of Dr. Yannis A. Korilis. Outline Time-Reversal

More information

MATH 56A: STOCHASTIC PROCESSES CHAPTER 6

MATH 56A: STOCHASTIC PROCESSES CHAPTER 6 MATH 56A: STOCHASTIC PROCESSES CHAPTER 6 6. Renewal Mathematically, renewal refers to a continuous time stochastic process with states,, 2,. N t {,, 2, 3, } so that you only have jumps from x to x + and

More information

Lecture 20: Reversible Processes and Queues

Lecture 20: Reversible Processes and Queues Lecture 20: Reversible Processes and Queues 1 Examples of reversible processes 11 Birth-death processes We define two non-negative sequences birth and death rates denoted by {λ n : n N 0 } and {µ n : n

More information

Buzen s algorithm. Cyclic network Extension of Jackson networks

Buzen s algorithm. Cyclic network Extension of Jackson networks Outline Buzen s algorithm Mean value analysis for Jackson networks Cyclic network Extension of Jackson networks BCMP network 1 Marginal Distributions based on Buzen s algorithm With Buzen s algorithm,

More information

Slides for Chapter 14: Time and Global States

Slides for Chapter 14: Time and Global States Slides for Chapter 14: Time and Global States From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, Addison-Wesley 2012 Overview of Chapter Introduction Clocks,

More information

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr. Simulation Discrete-Event System Simulation Chapter 0 Output Analysis for a Single Model Purpose Objective: Estimate system performance via simulation If θ is the system performance, the precision of the

More information

5. Sequential Logic x Computation Structures Part 1 Digital Circuits. Copyright 2015 MIT EECS

5. Sequential Logic x Computation Structures Part 1 Digital Circuits. Copyright 2015 MIT EECS 5. Sequential Logic 6.004x Computation Structures Part 1 igital Circuits Copyright 2015 MIT EECS 6.004 Computation Structures L5: Sequential Logic, Slide #1 Something We Can t Build (Yet) What if you were

More information

Chapter 11 Estimation of Absolute Performance

Chapter 11 Estimation of Absolute Performance Chapter 11 Estimation of Absolute Performance Purpose Objective: Estimate system performance via simulation If q is the system performance, the precision of the estimator qˆ can be measured by: The standard

More information

order is number of previous outputs

order is number of previous outputs Markov Models Lecture : Markov and Hidden Markov Models PSfrag Use past replacements as state. Next output depends on previous output(s): y t = f[y t, y t,...] order is number of previous outputs y t y

More information

Generating Random Variates II and Examples

Generating Random Variates II and Examples Generating Random Variates II and Examples Holger Füßler Holger Füßler Universität Mannheim Summer 2004 Side note: TexPoint» TexPoint is a Powerpoint add-in that enables the easy use of Latex symbols and

More information

Chapter 6 Queueing Models. Banks, Carson, Nelson & Nicol Discrete-Event System Simulation

Chapter 6 Queueing Models. Banks, Carson, Nelson & Nicol Discrete-Event System Simulation Chapter 6 Queueing Models Banks, Carson, Nelson & Nicol Discrete-Event System Simulation Purpose Simulation is often used in the analysis of queueing models. A simple but typical queueing model: Queueing

More information

Recap. Probability, stochastic processes, Markov chains. ELEC-C7210 Modeling and analysis of communication networks

Recap. Probability, stochastic processes, Markov chains. ELEC-C7210 Modeling and analysis of communication networks Recap Probability, stochastic processes, Markov chains ELEC-C7210 Modeling and analysis of communication networks 1 Recap: Probability theory important distributions Discrete distributions Geometric distribution

More information

Queueing Theory I Summary! Little s Law! Queueing System Notation! Stationary Analysis of Elementary Queueing Systems " M/M/1 " M/M/m " M/M/1/K "

Queueing Theory I Summary! Little s Law! Queueing System Notation! Stationary Analysis of Elementary Queueing Systems  M/M/1  M/M/m  M/M/1/K Queueing Theory I Summary Little s Law Queueing System Notation Stationary Analysis of Elementary Queueing Systems " M/M/1 " M/M/m " M/M/1/K " Little s Law a(t): the process that counts the number of arrivals

More information

Logic Design II (17.342) Spring Lecture Outline

Logic Design II (17.342) Spring Lecture Outline Logic Design II (17.342) Spring 2012 Lecture Outline Class # 10 April 12, 2012 Dohn Bowden 1 Today s Lecture First half of the class Circuits for Arithmetic Operations Chapter 18 Should finish at least

More information

Chapter 3 Balance equations, birth-death processes, continuous Markov Chains

Chapter 3 Balance equations, birth-death processes, continuous Markov Chains Chapter 3 Balance equations, birth-death processes, continuous Markov Chains Ioannis Glaropoulos November 4, 2012 1 Exercise 3.2 Consider a birth-death process with 3 states, where the transition rate

More information

λ, µ, ρ, A n, W n, L(t), L, L Q, w, w Q etc. These

λ, µ, ρ, A n, W n, L(t), L, L Q, w, w Q etc. These Queuing theory models systems with servers and clients (presumably waiting in queues). Notation: there are many standard symbols like λ, µ, ρ, A n, W n, L(t), L, L Q, w, w Q etc. These represent the actual

More information

CHAPTER 3 STOCHASTIC MODEL OF A GENERAL FEED BACK QUEUE NETWORK

CHAPTER 3 STOCHASTIC MODEL OF A GENERAL FEED BACK QUEUE NETWORK CHAPTER 3 STOCHASTIC MODEL OF A GENERAL FEED BACK QUEUE NETWORK 3. INTRODUCTION: Considerable work has been turned out by Mathematicians and operation researchers in the development of stochastic and simulation

More information

Today s Agenda: 1) Why Do We Need To Measure The Memory Component? 2) Machine Pool Memory / Best Practice Guidelines

Today s Agenda: 1) Why Do We Need To Measure The Memory Component? 2) Machine Pool Memory / Best Practice Guidelines Today s Agenda: 1) Why Do We Need To Measure The Memory Component? 2) Machine Pool Memory / Best Practice Guidelines 3) Techniques To Measure The Memory Component a) Understanding Your Current Environment

More information

5/15/18. Operations Research: An Introduction Hamdy A. Taha. Copyright 2011, 2007 by Pearson Education, Inc. All rights reserved.

5/15/18. Operations Research: An Introduction Hamdy A. Taha. Copyright 2011, 2007 by Pearson Education, Inc. All rights reserved. The objective of queuing analysis is to offer a reasonably satisfactory service to waiting customers. Unlike the other tools of OR, queuing theory is not an optimization technique. Rather, it determines

More information

Section 3.3: Discrete-Event Simulation Examples

Section 3.3: Discrete-Event Simulation Examples Section 33: Discrete-Event Simulation Examples Discrete-Event Simulation: A First Course c 2006 Pearson Ed, Inc 0-13-142917-5 Discrete-Event Simulation: A First Course Section 33: Discrete-Event Simulation

More information

EPoC UPSTREAM SYMBOL MAPPER OVERVIEW. Authors: Mark Laubach, Rich Prodan

EPoC UPSTREAM SYMBOL MAPPER OVERVIEW. Authors: Mark Laubach, Rich Prodan EPoC UPSTREAM SYMBOL MAPPER OVERVIEW Authors: Mark Laubach, Rich Prodan 1 OVERVIEW CNU Transmitter The Symbol Mapper maintains the timing for placement of 1D to 2D data in the upstream Superframe The primary

More information

1 Approximate Quantiles and Summaries

1 Approximate Quantiles and Summaries CS 598CSC: Algorithms for Big Data Lecture date: Sept 25, 2014 Instructor: Chandra Chekuri Scribe: Chandra Chekuri Suppose we have a stream a 1, a 2,..., a n of objects from an ordered universe. For simplicity

More information

WHAT IS A SKIP LIST? S 2 S 1. A skip list for a set S of distinct (key, element) items is a series of lists

WHAT IS A SKIP LIST? S 2 S 1. A skip list for a set S of distinct (key, element) items is a series of lists CH 9.4 : SKIP LISTS 1 ACKNOWLEDGEMENT: THESE SLIDES ARE ADAPTED FROM SLIDES PROVIDED WITH DATA STRUCTURES AND ALGORITHMS IN C++, GOODRICH, TAMASSIA AND MOUNT (WILEY 2004) AND SLIDES FROM JORY DENNY AND

More information

IEOR 6711, HMWK 5, Professor Sigman

IEOR 6711, HMWK 5, Professor Sigman IEOR 6711, HMWK 5, Professor Sigman 1. Semi-Markov processes: Consider an irreducible positive recurrent discrete-time Markov chain {X n } with transition matrix P (P i,j ), i, j S, and finite state space.

More information

UNIT 3: INTEGERS. Mónica Cárceles Alemán. IES Rector don Francisco Sabater García Positive and negative integers

UNIT 3: INTEGERS. Mónica Cárceles Alemán. IES Rector don Francisco Sabater García Positive and negative integers UNIT 3: INTEGERS 3.1. Positive and negative integers There are many situations in which you need to use numbers below zero, one of these is temperature, others are money that you can deposit (positive)

More information

RANDOMIZED ALGORITHMS

RANDOMIZED ALGORITHMS CH 9.4 : SKIP LISTS ACKNOWLEDGEMENT: THESE SLIDES ARE ADAPTED FROM SLIDES PROVIDED WITH DATA STRUCTURES AND ALGORITHMS IN C++, GOODRICH, TAMASSIA AND MOUNT (WILEY 2004) AND SLIDES FROM NANCY M. AMATO AND

More information

1 Poisson processes, and Compound (batch) Poisson processes

1 Poisson processes, and Compound (batch) Poisson processes Copyright c 2007 by Karl Sigman 1 Poisson processes, and Compound (batch) Poisson processes 1.1 Point Processes Definition 1.1 A simple point process ψ = {t n : n 1} is a sequence of strictly increasing

More information

Readings: Finish Section 5.2

Readings: Finish Section 5.2 LECTURE 19 Readings: Finish Section 5.2 Lecture outline Markov Processes I Checkout counter example. Markov process: definition. -step transition probabilities. Classification of states. Example: Checkout

More information

Vehicle Routing and Scheduling. Martin Savelsbergh The Logistics Institute Georgia Institute of Technology

Vehicle Routing and Scheduling. Martin Savelsbergh The Logistics Institute Georgia Institute of Technology Vehicle Routing and Scheduling Martin Savelsbergh The Logistics Institute Georgia Institute of Technology Vehicle Routing and Scheduling Part II: Algorithmic Enhancements Handling Practical Complexities

More information

1 ListElement l e = f i r s t ; / / s t a r t i n g p o i n t 2 while ( l e. next!= n u l l ) 3 { l e = l e. next ; / / next step 4 } Removal

1 ListElement l e = f i r s t ; / / s t a r t i n g p o i n t 2 while ( l e. next!= n u l l ) 3 { l e = l e. next ; / / next step 4 } Removal Präsenzstunden Today In the same room as in the first week Assignment 5 Felix Friedrich, Lars Widmer, Fabian Stutz TA lecture, Informatics II D-BAUG March 18, 2014 HIL E 15.2 15:00-18:00 Timon Gehr (arriving

More information

0utline. 1. Tools from Operations Research. 2. Applications

0utline. 1. Tools from Operations Research. 2. Applications 0utline 1. Tools from Operations Research Little s Law (average values) Unreliable Machine(s) (operation dependent) Buffers (zero buffers & infinite buffers) M/M/1 Queue (effects of variation) 2. Applications

More information

Binary Convolutional Codes

Binary Convolutional Codes Binary Convolutional Codes A convolutional code has memory over a short block length. This memory results in encoded output symbols that depend not only on the present input, but also on past inputs. An

More information

Heaps and Priority Queues

Heaps and Priority Queues Heaps and Priority Queues Motivation Situations where one has to choose the next most important from a collection. Examples: patients in an emergency room, scheduling programs in a multi-tasking OS. Need

More information

Part I Stochastic variables and Markov chains

Part I Stochastic variables and Markov chains Part I Stochastic variables and Markov chains Random variables describe the behaviour of a phenomenon independent of any specific sample space Distribution function (cdf, cumulative distribution function)

More information

A STAFFING ALGORITHM FOR CALL CENTERS WITH SKILL-BASED ROUTING: SUPPLEMENTARY MATERIAL

A STAFFING ALGORITHM FOR CALL CENTERS WITH SKILL-BASED ROUTING: SUPPLEMENTARY MATERIAL A STAFFING ALGORITHM FOR CALL CENTERS WITH SKILL-BASED ROUTING: SUPPLEMENTARY MATERIAL by Rodney B. Wallace IBM and The George Washington University rodney.wallace@us.ibm.com Ward Whitt Columbia University

More information

Year 3. Year 3. Lesson Breakdown & Textbook Mapping Spring. Lesson Breakdown & Textbook Mapping

Year 3. Year 3. Lesson Breakdown & Textbook Mapping Spring. Lesson Breakdown & Textbook Mapping Year Year Breakdown & Textbook Mapping Spring This document is designed to be used in conjunction with the White Rose Schemes of Learning and has been written as a guide to indicate the progression and

More information

COMPUTER PROGRAMMING

COMPUTER PROGRAMMING Prof. Dr. Namık Kemal ÖZTORUN Lecture Notes for Computer Programming Course Page 1 / 36 COMPUTER PROGRAMMING References: WITH FORTRAN Lecture Notes prepared by Prof. Dr. Namık Kemal ÖZTORUN Dr. Faruk TOKDEMİR,

More information

Chapter 11. Output Analysis for a Single Model Prof. Dr. Mesut Güneş Ch. 11 Output Analysis for a Single Model

Chapter 11. Output Analysis for a Single Model Prof. Dr. Mesut Güneş Ch. 11 Output Analysis for a Single Model Chapter Output Analysis for a Single Model. Contents Types of Simulation Stochastic Nature of Output Data Measures of Performance Output Analysis for Terminating Simulations Output Analysis for Steady-state

More information

The exponential distribution and the Poisson process

The exponential distribution and the Poisson process The exponential distribution and the Poisson process 1-1 Exponential Distribution: Basic Facts PDF f(t) = { λe λt, t 0 0, t < 0 CDF Pr{T t) = 0 t λe λu du = 1 e λt (t 0) Mean E[T] = 1 λ Variance Var[T]

More information

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr. Simulation Discrete-Event System Simulation Chapter 9 Verification and Validation of Simulation Models Purpose & Overview The goal of the validation process is: To produce a model that represents true

More information

ECEN 689 Special Topics in Data Science for Communications Networks

ECEN 689 Special Topics in Data Science for Communications Networks ECEN 689 Special Topics in Data Science for Communications Networks Nick Duffield Department of Electrical & Computer Engineering Texas A&M University Lecture 5 Optimizing Fixed Size Samples Sampling as

More information

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010 Exercises Stochastic Performance Modelling Hamilton Institute, Summer Instruction Exercise Let X be a non-negative random variable with E[X ]

More information

Fundamental Algorithms

Fundamental Algorithms Chapter 5: Hash Tables, Winter 2018/19 1 Fundamental Algorithms Chapter 5: Hash Tables Jan Křetínský Winter 2018/19 Chapter 5: Hash Tables, Winter 2018/19 2 Generalised Search Problem Definition (Search

More information

Lecture 13: Sequential Circuits, FSM

Lecture 13: Sequential Circuits, FSM Lecture 13: Sequential Circuits, FSM Today s topics: Sequential circuits Finite state machines Reminder: midterm on Tue 2/28 will cover Chapters 1-3, App A, B if you understand all slides, assignments,

More information

Massachusetts Institute of Technology

Massachusetts Institute of Technology .203J/6.28J/3.665J/5.073J/6.76J/ESD.26J Quiz Solutions (a)(i) Without loss of generality we can pin down X at any fixed point. X 2 is still uniformly distributed over the square. Assuming that the police

More information

Course Outline Introduction to Transportation Highway Users and their Performance Geometric Design Pavement Design

Course Outline Introduction to Transportation Highway Users and their Performance Geometric Design Pavement Design Course Outline Introduction to Transportation Highway Users and their Performance Geometric Design Pavement Design Speed Studies - Project Traffic Queuing Intersections Level of Service in Highways and

More information

Class Notes: Solving Simultaneous Linear Equations by Gaussian Elimination. Consider a set of simultaneous linear equations:

Class Notes: Solving Simultaneous Linear Equations by Gaussian Elimination. Consider a set of simultaneous linear equations: METR/OCN 465: Computer Programming with Applications in Meteorology and Oceanography Dr Dave Dempsey Dept of Geosciences, SFSU Class Notes: Solving Simultaneous Linear Equations by Gaussian Elimination

More information

STA 4273H: Statistical Machine Learning

STA 4273H: Statistical Machine Learning STA 4273H: Statistical Machine Learning Russ Salakhutdinov Department of Statistics! rsalakhu@utstat.toronto.edu! http://www.utstat.utoronto.ca/~rsalakhu/ Sidney Smith Hall, Room 6002 Lecture 11 Project

More information

CS 798: Homework Assignment 3 (Queueing Theory)

CS 798: Homework Assignment 3 (Queueing Theory) 1.0 Little s law Assigned: October 6, 009 Patients arriving to the emergency room at the Grand River Hospital have a mean waiting time of three hours. It has been found that, averaged over the period of

More information

IEOR 4106: Spring Solutions to Homework Assignment 7: Due on Tuesday, March 22.

IEOR 4106: Spring Solutions to Homework Assignment 7: Due on Tuesday, March 22. IEOR 46: Spring Solutions to Homework Assignment 7: Due on Tuesday, March. More of Chapter 5: Read the rest of Section 5.3, skipping Examples 5.7 (Coupon Collecting), 5. (Insurance claims)and Subsection

More information

So in terms of conditional probability densities, we have by differentiating this relationship:

So in terms of conditional probability densities, we have by differentiating this relationship: Modeling with Finite State Markov Chains Tuesday, September 27, 2011 1:54 PM Homework 1 due Friday, September 30 at 2 PM. Office hours on 09/28: Only 11 AM-12 PM (not at 3 PM) Important side remark about

More information