CDA6530: Performance Models of Computers and Networks Chapter 8: Statistical Simulation ---- Discrete Event Simulation (DES) TexPoint fonts used in EMF.

Slides:



Advertisements
Similar presentations
Many useful applications, especially in queueing systems, inventory management, and reliability analysis. A connection between discrete time Markov chains.
Advertisements

Parallel and Distributed Simulation
Modeling & Simulation. System Models and Simulation Framework for Modeling and Simulation The framework defines the entities and their Relationships that.
 1  Outline  performance measures for a single-server station  discrete-event simulation  hand simulation  process-oriented simulation approach.
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.
CS Data Structures I Chapter 7 Queues II. 2 Topics Queue Application Simulation Comparison of List, Stack and Queue.
Simulation Where real stuff starts. ToC 1.What, transience, stationarity 2.How, discrete event, recurrence 3.Accuracy of output 4.Monte Carlo 5.Random.
Queuing Analysis Based on noted from Appendix A of Stallings Operating System text 6/10/20151.
Classification of Simulation Models
#11 QUEUEING THEORY Systems Fall 2000 Instructor: Peter M. Hahn
Components and Organization of Discrete-event Simulation Model
Simulation with ArenaChapter 2 – Fundamental Simulation Concepts Discrete Event “Hand” Simulation of a GI/GI/1 Queue.
Discrete Event Simulation Event-Oriented Simulations By Syed S. Rizvi.
Simulating Single server queuing models. Consider the following sequence of activities that each customer undergoes: 1.Customer arrives 2.Customer waits.
Probability theory 2011 Outline of lecture 7 The Poisson process  Definitions  Restarted Poisson processes  Conditioning in Poisson processes  Thinning.
CPSC 531: DES Overview1 CPSC 531:Discrete-Event Simulation Instructor: Anirban Mahanti Office: ICT Class Location:
Lab 01 Fundamentals SE 405 Discrete Event Simulation
Cmpt-225 Simulation. Application: Simulation Simulation  A technique for modeling the behavior of both natural and human-made systems  Goal Generate.
Graduate Program in Engineering and Technology Management
Simulation II IE 2030 Lecture 18. Outline: Simulation II Advanced simulation demo Review of concepts from Simulation I How to perform a simulation –concepts:
The Poisson Process. A stochastic process { N ( t ), t ≥ 0} is said to be a counting process if N ( t ) represents the total number of “events” that occur.
Designing a Discrete Event Simulation Tool Peter L. Jackson School of Operations Research and Industrial Engineering March 15, 2003 Cornell University.
ETM 607 – Discrete Event Simulation Fundamentals Define Discrete Event Simulation. Define concepts (entities, attributes, event list, etc…) Define “world-view”,
1 QUEUES. 2 Definition A queue is a linear list in which data can only be inserted at one end, called the rear, and deleted from the other end, called.
Data Structures Using C++ 2E Chapter 8 Queues. Data Structures Using C++ 2E2 Objectives Learn about queues Examine various queue operations Learn how.
TexPoint fonts used in EMF.
Computer Science 112 Fundamentals of Programming II Modeling and Simulation.
Chapter 2 – Fundamental Simulation ConceptsSlide 1 of 46 Chapter 2 Fundamental Simulation Concepts.
CDA6530: Performance Models of Computers and Networks Chapter 8: Discrete Event Simulation Example --- Three callers problem in homwork 2 TexPoint fonts.
Data Structures Using Java1 Chapter 7 Queues. Data Structures Using Java2 Chapter Objectives Learn about queues Examine various queue operations Learn.
CDA6530: Performance Models of Computers and Networks Chapter 7: Basic Queuing Networks TexPoint fonts used in EMF. Read the TexPoint manual before you.
Simulation Examples and General Principles
CDA6530: Performance Models of Computers and Networks Chapter 8: Statistical Simulation --- Discrete-Time Simulation TexPoint fonts used in EMF. Read the.
NETW 707 Modeling and Simulation Amr El Mougy Maggie Mashaly.
WOOD 492 MODELLING FOR DECISION SUPPORT Lecture 25 Simulation.
Chapter 2 Fundamental Simulation Concepts
MODELING EXAMPLES Types of model Conceptual Containing components that have not been clearly Identified in terms of theoretic categories such as state,
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
CDA6530: Performance Models of Computers and Networks Mid-Term Review TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
This tutorial will talk you through a very basic workbench queueing simulation. The queueing system modelled is of customers entering an infinite capacity.
Dr. Anis Koubâa CS433 Modeling and Simulation
(C) J. M. Garrido1 Objects in a Simulation Model There are several objects in a simulation model The activate objects are instances of the classes that.
CDA6530: Performance Models of Computers and Networks Chapter 8: Statistical Simulation ---- Discrete Event Simulation (DES) TexPoint fonts used in EMF.
CS433 Modeling and Simulation Lecture 09 – Part 02 Discrete Events Simulation Dr. Anis Koubâa 27 Dec 2008 Al-Imam.
SS r SS r This model characterizes how S(t) is changing.
Collection types CS Chakrabarti Motivation  Thus far the only collection types we have used are vector and matrix  Problem #1: given an input.
 Simulation enables the study of complex system.  Simulation is a good approach when analytic study of a system is not possible or very complex.  Informational,
Introduction The objective of simulation – Analysis the system (Model) Analytically the model – a description of some system intended to predict the behavior.
Simulation Examples And General Principles Part 2
Simulation. Types of simulation Discrete-event simulation – Used for modeling of a system as it evolves over time by a representation in which the state.
Discrete-Event System Simulation in Java. Discrete Event Systems New dynamic systems New dynamic systems Computer and communication networks Computer.
Chapter 1 What is Simulation?. Fall 2001 IMSE643 Industrial Simulation What’s Simulation? Simulation – A broad collection of methods and applications.
CDA6530: Performance Models of Computers and Networks Mid-Term Review TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.:
Introduction to Simulation What is a simulation? A system that represents or emulates the behavior of another system over time; a computer simulation is.
Models of Traffic Flow 1.
ADVANTAGES OF SIMULATION
Discrete Event Simulation
COMPUTER 2430 Object Oriented Programming and Data Structures I
TexPoint fonts used in EMF.
CDA6530: Performance Models of Computers and Networks Project 3 Q&A
TexPoint fonts used in EMF.
TexPoint fonts used in EMF.
Parallel and Distributed Simulation
More Explanation of an example in chapter4
TexPoint fonts used in EMF.
Discrete Event “Hand” Simulation of a GI/GI/1 Queue
CDA6530: Performance Models of Computers and Networks Project 3 Q&A
Discrete Event Simulation
MECH 3550 : Simulation & Visualization
Discrete Mathematics CS 2610
Presentation transcript:

CDA6530: Performance Models of Computers and Networks Chapter 8: Statistical Simulation ---- Discrete Event Simulation (DES) TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAAAAAAA

2 Time Concept  physical time: time in the physical system  Noon, Oct. 14, 2008 to noon Nov. 1, 2008  simulation time: representation of physical time within the simulation  floating point values in interval [0.0, 17.0]  Example: 1.5 represents one and half hour after physical system begins simulation  wallclock time: time during the execution of the simulation, usually output from a hardware clock  8:00 to 10:23 AM on Oct. 14, 2008

3 Discrete Event Simulation Computation  Unprocessed events are stored in a pending event list  Events are processed in time stamp order example: air traffic at an airport events: aircraft arrival, landing, departure arrival 8:00 departure 9:15 landed 8:05 arrival 9:30 schedules simulation time processed event current event unprocessed event schedules From:

4 DES: No Time Loop  Discrete event simulation has no time loop  There are events that are scheduled.  At each run step, the next scheduled event with the lowest time schedule gets processed.  The current time is then that time, the time when that event is supposed to occur.  Accurate simulation compared to discrete- time simulation  Key: We have to keep the list of scheduled events sorted (in order)

5 Variables  Time variable t  Simulation time  Add time unit, can represent physical time  Counter variables  Keep a count of times certain events have occurred by time t  System state (SS) variables  We focus on queuing systems in introducing DES

6 Interlude: Simulating non-homogeneous Poisson process for first T time  Nonhomogeneous Poisson process:  Arrival rate is a variable ¸(t)  Bounded: ¸(t) < ¸ for all t<T  Thinning Method: 1. t=0, I=0 2. Generate a random number U 3. t=t-ln(U)/¸. If t>T, stop. 4. Generate a random number U 5. If U· ¸(t)/¸, set I=I+1, S(I)=t 6. Go to step 2  Final I is the no. of events in time T  S(1), , S(I) are the event times  Remove step 4 and condition in step 5 for homogeneous Poisson

7 Subroutine for Generating T s  Nonhomogeneous Poisson arrival  T s : the time of the first arrival after time s. 1. Let t =s 2. Generate U 3. Let t=t-ln(U)/¸ 4. Generate U 5. If U· ¸(t)/¸, set T s =t and stop 6. Go to step 2

8 Subroutine for Generating T s  Homogeneous Poisson arrival  T s : the time of the first arrival after time s. 1. Let t =s 2. Generate U 3. Let t=t-ln(U)/¸ 4. Set T s =t and stop

9 M/G/1 Queue  Variables:  Time: t  Counters:  N A : no. of arrivals by time t  N D : no. of departures by time t  System state: n – no. of customers in system at t  eventNum: counter of # of events happened so far  Events:  Arrival, departure (cause state change)  Event list: EL = t A, t D  t A : the time of the next arrival after time t  T D : departure time of the customer presently being served

 Output:  A(i): arrival time of customer i  D(i): departure time of customer I  SystemState, SystemStateTime vector:  SystemStateTime(i): i-th event happening time  SystemState(i): the system state, # of customers in system, right after the i-th event. 10

11  Initialize:  Set t=N A =N D =0  Set SS n=0  Generate T 0, and set t A =T 0, t D =1  Service time is denoted as r.v. Y  t D = Y + T 0

12  If (t A · t D ) (Arrival happens next)  t=t A (we move along to time t A )  N A = N A +1 (one more arrival)  n= n + 1 (one more customer in system)  Generate T t, reset t A = T t (time of next arrival)  If (n=1) generate Y and reset t D =t+Y (system had been empty before without t D determined, so we need to generate the service time of the new customer)

 Collect output data:  A(N A )=t (customer N A arrived at time t)  eventNum = eventNum + 1;  SystemState(eventNum) = n;  SystemStateTime(eventNum) = t; 13

14  If (t D <t A ) (Departure happens next)  t = t D  n = n-1 (one customer leaves)  N D = N D +1 ( departure number increases 1)  If (n=0) t D =1; (empty system, no next departure time) else, generate Y and t D =t+Y (why?)

 Collect output data:  D(N D )=t  eventNum = eventNum + 1;  SystemState(eventNum) = n;  SystemStateTime(eventNum) = t; 15

16 Summary  Analyzing physical system description  Represent system states  What events?  Define variables, outputs  Manage event list  Deal with each top event one by one