Stochastic Simulation of Communication Networks and their Protocols

Similar documents
Stochastic Simulation of Communication i Networks

ISE/OR 762 Stochastic Simulation Techniques

Queueing Theory and Simulation. Introduction

Stochastic Simulation of Communication Networks

Chapter 2 Queueing Theory and Simulation

Stochastic Simulation of

EE 368. Weeks 3 (Notes)

Simulation & Modeling Event-Oriented Simulations

Discrete Event Simulation IN2045

Discrete-event simulations

Network Simulation Chapter 6: Output Data Analysis

Systems Simulation Chapter 6: Queuing Models

The effect of probabilities of departure with time in a bank

Ways to study a system System

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models

Name of the Student:

The University of British Columbia Computer Science 405 Practice Midterm Solutions

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

Introduction to Modelling and Simulation

1 Modelling and Simulation

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

Chapter 1: Revie of Calculus and Probability

PBW 654 Applied Statistics - I Urban Operations Research

Probability and Statistics Concepts

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

VALUES FOR THE CUMULATIVE DISTRIBUTION FUNCTION OF THE STANDARD MULTIVARIATE NORMAL DISTRIBUTION. Carol Lindee

Probability Theory and Random Variables

Continuous Time Processes

Queuing Theory and Stochas St t ochas ic Service Syste y ms Li Xia

QUEUING SYSTEM. Yetunde Folajimi, PhD

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

EP2200 Course Project 2017 Project II - Mobile Computation Offloading

Advanced Computer Networks Lecture 3. Models of Queuing

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

1.225J J (ESD 205) Transportation Flow Systems

Slides 9: Queuing Models

Hand Simulations. Christos Alexopoulos and Dave Goldsman 9/2/14. Georgia Institute of Technology, Atlanta, GA, USA 1 / 26

Preliminary statistics

Introduction and Overview STAT 421, SP Course Instructor

Engineering Mathematics : Probability & Queueing Theory SUBJECT CODE : MA 2262 X find the minimum value of c.

Variance reduction techniques

Review of Statistical Terminology

Glossary availability cellular manufacturing closed queueing network coefficient of variation (CV) conditional probability CONWIP

SINGLE RUN OPTIMIZATION USING THE REVERSE-SIMULATION METHOD

Chapter 4: Monte Carlo Methods. Paisan Nakmahachalasint

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

Math 105 Course Outline

MONTE CARLO SIMULATION STUDY ON M/M/1 AND M/M/2 QUEUEING MODELS IN A MULTI SPECIALITY HOSPITAL

Discrete Random Variables

Queuing Theory. Using the Math. Management Science

Stochastic Models in Computer Science A Tutorial

Stochastic Models of Manufacturing Systems

Making Hard Decision. Probability Basics. ENCE 627 Decision Analysis for Engineering

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

2008 Winton. Review of Statistical Terminology

CS 700: Quantitative Methods & Experimental Design in Computer Science

Discrete-Event System Simulation

Simulation. Where real stuff starts

Overall Plan of Simulation and Modeling I. Chapters

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

Contents LIST OF TABLES... LIST OF FIGURES... xvii. LIST OF LISTINGS... xxi PREFACE. ...xxiii

Network Analysis of Fuzzy Bi-serial and Parallel Servers with a Multistage Flow Shop Model

ISyE 6644 Fall 2016 Test #1 Solutions

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models

A PARAMETRIC DECOMPOSITION BASED APPROACH FOR MULTI-CLASS CLOSED QUEUING NETWORKS WITH SYNCHRONIZATION STATIONS

Modeling Fundamentals: Concepts of Models and Systems Concepts of Modeling Classifications of Models

Simulation. Where real stuff starts

Time-varying failure rate for system reliability analysis in large-scale railway risk assessment simulation

Chapter 2 SIMULATION BASICS. 1. Chapter Overview. 2. Introduction

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

MULTIPLE CHOICE QUESTIONS DECISION SCIENCE

On the Partitioning of Servers in Queueing Systems during Rush Hour

Manufacturing System Flow Analysis

SYSTEM MODELING AND SIMULATION. Sub Code: 10CS82 IA Marks : 25 Hrs/Week: 04 Exam Hours : 03 Total Hrs : 52 Exam Marks : 100 PART A

Answers to selected exercises

Queuing Theory. 3. Birth-Death Process. Law of Motion Flow balance equations Steady-state probabilities: , if

Chapter 2 Random Processes

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010

Computer Simulation and Applications in Life Sciences. Dr. Michael Emmerich & Dr. Andre Deutz LIACS

Structural Reliability

CS 1538: Introduction to Simulation Homework 1

Communication Theory II

On the Partitioning of Servers in Queueing Systems during Rush Hour

Homework 2. Spring 2019 (Due Thursday February 7)

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

Probability theory. References:

Discrete Probability Refresher

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

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

Variance reduction techniques

Part I Stochastic variables and Markov chains

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

DIFFERENT APPROACHES TO STATISTICAL INFERENCE: HYPOTHESIS TESTING VERSUS BAYESIAN ANALYSIS

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

Review of Probability. CS1538: Introduction to Simulations

SYSTEM MODELLING AND SIMULATION

ELEG 3143 Probability & Stochastic Process Ch. 2 Discrete Random Variables

The Queue Inference Engine and the Psychology of Queueing. ESD.86 Spring 2007 Richard C. Larson

COMP9334 Capacity Planning for Computer Systems and Networks

Monte Carlo Methods for Computation and Optimization (048715)

Transcription:

Stochastic Simulation of Communication Networks and their Protocols Dr.-Ing Umar Toseef umr@comnets.uni-bremen.de Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-1

Table of Contents 1 General Introduction 2 Random Number Generation 3 Statistical Evaluation 4 ComNets Class Library (CNCL) 5 OPNET 6 Network Simulator (ns) 7 SDL + OpenWNS 8 Simulation Speed-Up Methods Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-2

Overview What is simulation? Why simulations? Classification of simulations Discrete Event Simulation (DES) Event Scheduling Random Number Generation Statistical Evaluation Simulation systems and applications? Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-3

References P. Bratley, B.L. Fox, L.E. Schrage: A Guide to Simulation. Springer 1983, 1987. B.P. Zeigler, H. Praehofer, T.G. Kim: Theory of Modeling and Simulation, Academic Press 1976, 2000. D. Möller: Modellbildung, Simulation und Identifikation dynamischer Systeme. Springer Lehrbuch 1992. R.Y. Rubinstein, B. Melamed: Modern Simulation and Modeling. Wiley Series in Probability and Statistics 1998. P.A.W. Lewis, E.J. Orav: Simulation Methodology for Statisticians, Operation Analysts, and Engineers. Vol. 1. Wadsworth 1989. Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-4

References G.S. Fishman: Principles of Discrete Event Simulation. J. Wiley and Sons. New York, 1978. A.M. Law, W.D. Kelton: Simulation Modeling & Analysis. McGraw-Hill, 1991. Kreutzer, W.: System Simulation - Programming Styles and Languages, Addison Wesley Publishers - Reading (U.S.A.) 1986. L. Devroye: Non-Uniform Random Variate Generation. Springer, New York, 1986. Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-5

Web References www.informs-sim.org... Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-6

Historical Development Pre-computer era, e.g.: Buffon (1777) coin experiments, 4040 trials Pearson (1857-1936) 24000 trials Kendall (approx. 1938): random number generation using the London telephone directory Von Neumann (1944): Monte Carlo Method for the calculation of complex formulas in nuclear physics 1946-1956: traffic machines simulation of telephone systems Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-7

Historical Development Development of special simulation languages GPSS (IBM, 1961, General Purpose Simulation System) SIMULA (class concept, Norwegian Computing Center, 1963, Simula 67) SIMSCRIPT (based on FORTRAN) Development of special multiprocessor simulators network structure (Chandy 1981) function oriented structure (Lehnert 1979, Barel 1983) Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-8

Random Experiments and their Application Areas Stochastic Simulation of Complex Systems Computer Random Experiments Improved Simulation Control by New Evaluation Methods Modeling and Validation of Statistical Concepts Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-9

Communication Network Examples e.g. Stop & Wait Protocol WLAN MAC Protocol Ad hoc networks TCP/IP Protocols HSDPA Protocols LTE Protocols... Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-10

Evaluation Goals Goal of the study of systems or their models is the evaluation of some characteristics of the system Gain insight into system operation on a more conceptual level Compare two systems with respect to particular metrics Tune system behavior for specific situations Judge a priori the effects of reconfiguration/upgrading Reduce costs Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-11

Ways to study a system System Experiment with the actual system Experiment with a system model Physical Model Mathematical Model Analytical Solution Simulation Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-12

What is simulation? simulation is imitation has been used for many years to train, explain, evaluate and entertain the facility or process of interest is usually called a system the assumptions, which usually take the form of mathematical or logical relationships, constitute a model simulations and their models are abstractions of reality Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-13

Why Simulations? Extensively used to verify the correctness of designs Realistic models are often too complex to evaluate analytically The simulation approach gives more flexibility and convenience Accelerates and replaces effectively the "wait and see" anxieties Safely plays out the "what-if" scenario from the artificial world Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-14

Real System Planned System Modeling Model Measurement Simulation Analytic Calculation Result Result Result Realize planned system Validation Performance Evaluation Cycle Modify Planned System Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-15

Simulation Classification dynamic static discrete continuous hybrid stochastic deterministic event driven transaction driven activity oriented Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-16

Classification of Simulations 1. Static vs. Dynamic Simulation models Static model: representation of a system at a particular time, or a system in which time simply plays no role. Example: Monte Carlo model Dynamic model: represents a system as it evolves over time. Example: a WLAN network Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-17

Classification of Simulations 2. Deterministic vs. Stochastic Simulation Models Deterministic model: If a simulation model does not contain any probabilistic (i.e., random) components, it is called deterministic. Example: a system of differential equations describing a chemical reaction might be such a model. Stochastic model: Many systems, however, must be modeled as having at least some random input components, and these give rise to stochastic simulation models. Example: Most queueing and inventory systems are modeled stochastically. Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-18

Classification of Simulations 3. Continuous vs. discrete time Simulation models Defined analogous to the way discrete and continuous systems are defined, i.e., a discrete system is one in which the state variables change instantaneously at separated points in time, and in a continuous system the state variables change continuously with respect to time. It is important to mention that a discrete model is not always used to model a discrete system, and vice-versa. Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-19

Application Areas Determining hardware requirements or protocols for communication networks Determining hardware and software requirements for a computer system Designing and analyzing logistic systems (manufacturing and transport) Designing and operating transportation systems such as airports, freeways, ports and sub-ways Evaluating designs for service organizations such as call centers, fast-food restaurants, hospitals, post offices, gas stations, Re-engineering of business processes Evaluating military systems or their logistic requirements... Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-20

Drawbacks No exact answers, only approximations Get random output from stochastic simulations, careful output analysis necessary as standard statistical methods might not work Development of the model takes a lot of time Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-21

Discrete-Event Simulation State variables change instantaneously at separate points in time State transitions are triggered by events Thus, simulation models considered here are discrete-event, dynamic and stochastic Example: CNCL (Communication Network Class Library)- a portable C++ library providing a base for all C++ applications, OPNET Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-22

G/G/1 Model Arrival (λ a ) Server (λ b ) b 1 b FIFO- Queue Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-23

Discrete Event Simulations Example: A simple queuing system # of customers in system Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-24

System Terminology State: A variable characterizing an attribute in the system, e.g., number of jobs waiting for processing or level of stock in inventory systems Event: An occurrence at a point in time which may change the state of the system, e.g., arrival of a customer or start of work on a job Entity: An object that passes through the system, e.g., jobs in the queue or orders in a factory. Often an event (e.g., arrival) is associated with an entity (e.g., customer). Queue: A queue is not only a physical queue of people, but any place where entities are waiting to be processed Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-25

System Terminology Creating: Creating is causing an arrival of a new entity to the system at some point in time Scheduling: Scheduling is the act of assigning a new future event to an existing entity Random Variable: A random variable is a quantity that is uncertain Interarrival time between two incoming jobs (e.g. message, flights, number of defective parts in a shipment) Random Variate: A random variate is an artificially generated random variable Distribution: A distribution is the mathematical law which governs the probabilistic features of a random variable E.g. negative exponential or normal distribution Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-26

Steps of a Simulation Problem Formulation Identify controllable and uncontrollable inputs Identify constraints on the decision variables Define measure of system performance and an objective function Develop a preliminary model structure to interrelate the inputs and the measure of performance Controllable Input System Output Uncontrollable Input (from the outside world) Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-27

Steps of the Simulation Descriptive Analysis Data Collection and Analysis of Input Variables Computer Simulation Model Development Validation and finally Performance Evaluation Pre-scriptive Analysis: Optimization or Goal Seeking Post-prescriptive Analysis: Sensitivity and What-If Analysis Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-28

Steps in a Simulation Study Problem formulation Set objectives and plans Conceptual model Validation Collect data Create simulation model Documentation and report Production runs and analysis Experimental design Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-29

Structure of a Simulation System (adapted from Kreutzer 1986) Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-30

Event List The event list controls the simulation It contains all the future events (FEL) that are scheduled It is ordered by increasing time of event scheduler Events can be categorized as primary and conditional events E.g.: CNEventHandler, CNEventScheduler, etc. in CNCL Simulation at Mensa t 1 arrival t 2 service completion at cashier 2 t 3 Some state variables People in line 1 People at meal line 1&2 People at cashier 1&2 People eating at tables service completion at meal 1 t4 finish eating t5 finish eating Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-32

(Future) Event List also called SQS (sequencing set) in Simula t 1 t 2 t n t 1 t 2 t n E 1 E 2 E n time t Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-33

Discrete Event Simulation: Model Time and Processing Time List of Events t 1, E 1 t 2, E 2 t 3, E 3 t 1 : E 1 t 2 : E 2 t 3 : E 3 model time = simulation time e.g., h, ms, μs T s T E 1 T s T E 2 T s T E 3 t i : event / (process) planning time E i : event routine resp. process T s : administration time T E i : processing time event E i e.g., ms, μs processing time = CPU time Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-34

Example: Simulation Introduction Assume the example of a gas station (or super market, doctor s office, ) Why do we simulate? What does the model of the gas station look like? Make a diagram of the model identifying the system components. Name the parameters needed to characterize the system. Which results could be obtained by the simulation? How can you best model a queue on a computer and why? What would an implementation look like? What is the difference between a queue and a list? Which functions are needed for a queue (list)? Is the model of the gas station a good mapping of the real system? What potential improvements are possible? Describe a traffic model for the gas station model? Which additional parameters are needed? Why are event-oriented systems usually preferred to other systems (e.g. periodic)? What are the advantages? Name the events in the simulation of the gas station. Describe the idealized usage of simulation for the introduction of a new (mobile) communication network. Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-35

Exercise 1: Probability and Correlation 1. The cumulative distribution function (cdf) (Verteilungsfunktion) F X (x) of a random variable (RV) X resp. the probability density function (pdf) f X (x) is defined as: resp. w F ( w) P{ X w} f ( x) dx X f X X dfx ( x) ( x) dx A random variable is defined: X = 10i where i stands for all possible realizations of a random experiment tossing a fair die. Draw the cdf and the pdf of this experiment! Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-36

Exercise 1.2 (cont.) Distributions can be characterized by their moments. The most prominent moments are expectation (Erwartungswert) (mean, Mittelwert) and variance (Varianz), that are a measure for the distribution of the samples (Stichprobenwerte) around the mean value. The expectation E{X} resp. μ X and the variance б X of a random variable X are defined as: E{ X} 2 X X E{( X ) 2 xf ( x) dx } ( x ) f ( x) dx where б X is called standard deviation (Standardabweichung) (б X 0). In a simulation experiment only a finite sample of values is available from the possible result set. This leads to the usage of estimators (Schätzer), that will approach the exact value for mean value and variance as more values are added to the sample. The following estimators are used as expectation and variance: N ~ 1 E{ X} X xi N 2 X ~ 2 X 1 N 1 N i 1 1 ( x i ) X Which problems are to be expected when using these estimators in a simulation program? Can the estimator of the variance be rearranged in such a way that it is better suited for implementation? Which disadvantages can this rearranged estimator have? 2 2 Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-37

Exercise 1.3 (cont.) An important aspect in simulation experiments is the dependency of values between each other, called correlation (Korrelation). A measure for the correlation of two random variables is the (global) correlation coefficient (Korrelationskoeffizient) : ρ. First the covariance (Kovarianz) C of two random variables X and Y is defined as follows: C E{( X )( Y )} E{ XY} E{ X} E{ Y} X Y Using the definition of the global correlation coefficient shows the following: C X Y and C X Y and thus ρ 1. What is the value of C and ρ in the uncorrelated case? Prof. Dr. C. Görg www.comnets.uni-bremen.de VSIM 1-38