Ways to study a system System

Similar documents
λ λ λ In-class problems

EE 368. Weeks 3 (Notes)

Discrete-event simulations

Generation of Discrete Random variables

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

Queuing Theory. The present section focuses on the standard vocabulary of Waiting Line Models.

2905 Queueing Theory and Simulation PART IV: SIMULATION

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

Design of discrete-event simulations

Queueing Theory II. Summary. ! M/M/1 Output process. ! Networks of Queue! Method of Stages. ! General Distributions

QUEUING MODELS AND MARKOV PROCESSES

Control of Fork-Join Networks in Heavy-Traffic

CDA5530: Performance Models of Computers and Networks. Chapter 4: Elementary Queuing Theory

ISE/OR 762 Stochastic Simulation Techniques

Discrete Event Simulation

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

Queueing Theory. VK Room: M Last updated: October 17, 2013.

Simulation & Modeling Event-Oriented Simulations

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

Markov Chains. X(t) is a Markov Process if, for arbitrary times t 1 < t 2 <... < t k < t k+1. If X(t) is discrete-valued. If X(t) is continuous-valued

Computer Networks More general queuing systems

Queuing Analysis. Chapter Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

Performance Evaluation of Queuing Systems

Name of the Student:

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

Introduction to queuing theory

Review of Queuing Models

CSM: Operational Analysis

Session-Based Queueing Systems

Statistics 150: Spring 2007

Readings: Finish Section 5.2

Stochastic Simulation Discrete simulation/event-by-event

Exercises Solutions. Automation IEA, LTH. Chapter 2 Manufacturing and process systems. Chapter 5 Discrete manufacturing problems

Quiz Queue II. III. ( ) ( ) =1.3333

Sandwich shop : a queuing net work with finite disposable resources queue and infinite resources queue

Answers to the problems from problem solving classes

Queuing Theory. Richard Lockhart. Simon Fraser University. STAT 870 Summer 2011

IEOR 6711, HMWK 5, Professor Sigman

An Analysis of the Preemptive Repeat Queueing Discipline

Operations Research II, IEOR161 University of California, Berkeley Spring 2007 Final Exam. Name: Student ID:

The effect of probabilities of departure with time in a bank

Queuing Theory. Using the Math. Management Science

CSE 4201, Ch. 6. Storage Systems. Hennessy and Patterson

Queueing Theory and Simulation. Introduction

MULTIPLE CHOICE QUESTIONS DECISION SCIENCE

Non Markovian Queues (contd.)

Minimizing response times and queue lengths in systems of parallel queues

Solutions to Homework Discrete Stochastic Processes MIT, Spring 2011

6 Solving Queueing Models

CS 798: Homework Assignment 3 (Queueing Theory)

Introduction to queuing theory

BIRTH DEATH PROCESSES AND QUEUEING SYSTEMS

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

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 "

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

Time Reversibility and Burke s Theorem

Analyzing a queueing network

Queueing systems. Renato Lo Cigno. Simulation and Performance Evaluation Queueing systems - Renato Lo Cigno 1

Dynamic Control of Parallel-Server Systems

QUEUING SYSTEM. Yetunde Folajimi, PhD

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

Modelling Complex Queuing Situations with Markov Processes

NATCOR: Stochastic Modelling

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

COMP9334 Capacity Planning for Computer Systems and Networks

Simulation. Where real stuff starts

Multiserver Queueing Model subject to Single Exponential Vacation

Probability and Statistics Concepts

Introduction to Modelling and Simulation

Análise e Modelagem de Desempenho de Sistemas de Computação

Stochastic Optimization for Undergraduate Computer Science Students

Multiaccess Communication

Introduction to Markov Chains, Queuing Theory, and Network Performance

NICTA Short Course. Network Analysis. Vijay Sivaraman. Day 1 Queueing Systems and Markov Chains. Network Analysis, 2008s2 1-1

A Semiconductor Wafer

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

Uniform random numbers generators

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

Simulation. Where real stuff starts

reversed chain is ergodic and has the same equilibrium probabilities (check that π j =

Introduction to Queuing Networks Solutions to Problem Sheet 3

Chapter 2 Queueing Theory and Simulation

PBW 654 Applied Statistics - I Urban Operations Research

ECE-517: Reinforcement Learning in Artificial Intelligence. Lecture 4: Discrete-Time Markov Chains

Scheduling I. Today Introduction to scheduling Classical algorithms. Next Time Advanced topics on scheduling

THE INTERCHANGEABILITY OF./M/1 QUEUES IN SERIES. 1. Introduction

Chapter 10. Queuing Systems. D (Queuing Theory) Queuing theory is the branch of operations research concerned with waiting lines.

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

Scheduling I. Today. Next Time. ! Introduction to scheduling! Classical algorithms. ! Advanced topics on scheduling

Link Models for Circuit Switching

Computer Systems Modelling

1 Markov decision processes

MARKOV PROCESSES. Valerio Di Valerio

Power Laws in ALOHA Systems

THE HEAVY-TRAFFIC BOTTLENECK PHENOMENON IN OPEN QUEUEING NETWORKS. S. Suresh and W. Whitt AT&T Bell Laboratories Murray Hill, New Jersey 07974

Random matrices, phase transitions & queuing theory. Raj Rao Nadakuditi

Discrete-Event System Simulation

Queuing Networks. - Outline of queuing networks. - Mean Value Analisys (MVA) for open and closed queuing networks

Terror Queue: Help, we are being served!

4.7 Finite Population Source Model

Transcription:

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 system System Experiment with the actual system Experiment with a model of the system Experiment with a physical model A conceptual model Analytical solution Simulation

Why not experiment with the system itself? It might be dangerous (control system in a nuclear power plant) The system does not exist yet It is expensive to experiment with the system It is impossible to experiment with a system

Different kinds of systems Continuous systems Examples: temperature in an engine, air pressure around an aeroplane etc Are usually modelled by differential equations Discrete systems Examples: systems described by queues Hybrid systems Both continuous and discrete

Application areas Communication systems Computer systems performance Transportation Manufacturing and material handling Health systems Public services Military systems,,,,,

Advantages of simulation Makes it possible to predict impact of changes Makes it possible to look at detailed behaviour Can give a good understanding of a system Can visualize a system Find bottlenecks in a system Gives a possibility to train a team

Disadvantages of simulation Model building requires special training Time consuming and expensive Limitations of accuracy (rare events)

Modelling concepts A model is an abstract representation of a system A discrete model has State variables Events that change the state Rules that describes what shall happen at an event

Two approaches to simulation Event-scheduling method Process-interaction method

Event-scheduling method The following is needed: A description of the state The events that can occur Rules describing what will happen if an event occurs

The event list Keeps track of when events shall happen T1 T2 T3 T4 E1 E2 E3 E4 A1 A2 A3 A4 T i = time when event E i will take place A i = attributes to event I The list is sorted: T 1 < T 2 < T 3 < T 4

How a simulation is performed 1. Extract the first element in the event list 2. Set Time = the time of the extracted event 3. Update the state of the system and insert new events if needed 4. If not finished, Go to 1

An example: a queuing system Arrivals Queue Server Departures Blocked It might be of interest to find the probability of rejection mean time spent in the system mean number of customers in the system

The state description Assume that we want to find the mean number of customers in the queue. N = number of customers in the system The appropriate state description depends on the results we desire

Events that may take place Arrival (new customer come) Departure (when service is ready) Measurement (does not change the state)

What we also need to know Assume the following: The mean time between arrivals is exponentially distributed (exp(a)) The service time is exponentially distributed (exp(s)) The number of slots in the queue is infinite

Rule at arrival N := N + 1; If N = 1 then add departure to event list; Add a new arrival to event list; When we add an arrival event we have to draw a random number (exponentially distributed)

Rule at departure N := N - 1; If N > 0 then add departure to event list;

Rule at measurement Write(N); Add a new measurement to event list;

When the simulation is initiated Time and state: Time = 0 N = 0 Event list (time, event): 3 Arrival 5 Measurement (One arrival event and one measurement event has to be put into the list to initiate the simulation.)

Step 1 Time and state: Time = 3 N = 1 Event list: 4 Arrival 5 Measurement 9 Departure

Step 2 Time and state: Time = 4 N = 2 Event list: 5 Measurement 9 Departure 10 Arrival

Step 3 Time and state: Time = 5 N = 2 Event list: 9 Departure 10 Arrival 14 Measurement

Step 4 Time and state: Time = 9 N = 1 Event list: 10 Arrival 12 Departure 14 Measurement

begin simulationlength := 1000; No_in_queue := 0; time := 0; insert_event(measurement, Random(m)); insert_event(arrival, Exp(a)); while time < simulationlength do begin dummy := FirstInQueue(eventlist); time := dummy.eventtime; case dummy.eventkind of arrival: arrive; departure: depart; measurement: measure; end; end; end. Detta är pseudokod

procedure arrive; begin if No_in_queue = 0 then insert_event(departure, Exp(s)); No_in_queue := No_in_queue + 1; insert_event(arrival, Exp(a)); end; procedure depart; begin No_in_queue := No_in_queue - 1; if No_in_queue > 0 then insert_event(departure, Exp(s)); end; procedure measure; begin write(utfil, No_in_queue); insert_event(measurement, Random(m)); end;