Input Modeling for Simulation Chapter 3 “As far as the laws of mathematics refer to reality, they are not certain, and as far as they are certain, they.

Slides:



Advertisements
Similar presentations
NORMAL OR GAUSSIAN DISTRIBUTION Chapter 5. General Normal Distribution Two parameter distribution with a pdf given by:
Advertisements

Structural reliability analysis with probability- boxes Hao Zhang School of Civil Engineering, University of Sydney, NSW 2006, Australia Michael Beer Institute.
Chapter 5 Statistical Models in Simulation
Modeling Process Quality
CPSC 531:Random-Variate Generation
Chapter 8 Random-Variate Generation
Chapter 8 Random-Variate Generation Banks, Carson, Nelson & Nicol Discrete-Event System Simulation.
Engineering Probability and Statistics - SE-205 -Chap 4 By S. O. Duffuaa.
Random-Variate Generation. Need for Random-Variates We, usually, model uncertainty and unpredictability with statistical distributions Thereby, in order.
Simulation Modeling and Analysis
Simulation Modeling and Analysis
Chapter 6 Continuous Random Variables and Probability Distributions
Agenda Purpose Prerequisite Inverse-transform technique
Random-Variate Generation. 2 Purpose & Overview Develop understanding of generating samples from a specified distribution as input to a simulation model.
A Summary of Random Variable Simulation Ideas for Today and Tomorrow.
Ch. 6 The Normal Distribution
Analysis of Simulation Input.. Simulation Machine n Simulation can be considered as an Engine with input and output as follows: Simulation Engine Input.
28-1 ©2006 Raj Jain Random Variate Generation.
Chapter 5 Continuous Random Variables and Probability Distributions
Chap 6-1 Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chapter 6 Continuous Random Variables and Probability Distributions Statistics.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 4 Continuous Random Variables and Probability Distributions.
Properties of Random Numbers
Lecture II-2: Probability Review
Random-Number Generation. 2 Properties of Random Numbers Random Number, R i, must be independently drawn from a uniform distribution with pdf: Two important.
Chapter 4 Continuous Random Variables and Probability Distributions
SIMULATION MODELING AND ANALYSIS WITH ARENA
Standard Statistical Distributions Most elementary statistical books provide a survey of commonly used statistical distributions. The reason we study these.
Functions of Random Variables. Methods for determining the distribution of functions of Random Variables 1.Distribution function method 2.Moment generating.
CPSC 531: Probability Review1 CPSC 531:Distributions Instructor: Anirban Mahanti Office: ICT Class Location: TRB 101.
Chapter 4 Continuous Random Variables and their Probability Distributions The Theoretical Continuous Distributions starring The Rectangular The Normal.
0 Simulation Modeling and Analysis: Input Analysis K. Salah 8 Generating Random Variates Ref: Law & Kelton, Chapter 8.
Chapter 5 Statistical Models in Simulation
Commonly Used Distributions Andy Wang CIS Computer Systems Performance Analysis.
Traffic Modeling.
CPSC 531:Input Modeling Instructor: Anirban Mahanti Office: ICT 745
CPSC 531: Probability Review1 CPSC 531:Probability & Statistics: Review II Instructor: Anirban Mahanti Office: ICT 745
Use of moment generating functions 1.Using the moment generating functions of X, Y, Z, …determine the moment generating function of W = h(X, Y, Z, …).
Ch5. Probability Densities II Dr. Deshi Ye
More Continuous Distributions
1 Lecture 13: Other Distributions: Weibull, Lognormal, Beta; Probability Plots Devore, Ch. 4.5 – 4.6.
Chapter 5.6 From DeGroot & Schervish. Uniform Distribution.
Selecting Input Probability Distribution. Simulation Machine Simulation can be considered as an Engine with input and output as follows: Simulation Engine.
Chapter 12 Continuous Random Variables and their Probability Distributions.
ETM 607 – Random-Variate Generation
Starting point for generating other distributions.
Random Variable The outcome of an experiment need not be a number, for example, the outcome when a coin is tossed can be 'heads' or 'tails'. However, we.
Learning Simio Chapter 10 Analyzing Input Data
Chapter 8 Random-Variate Generation Banks, Carson, Nelson & Nicol Discrete-Event System Simulation.
Stracener_EMIS 7305/5305_Spr08_ Reliability Data Analysis and Model Selection Dr. Jerrell T. Stracener, SAE Fellow Leadership in Engineering.
Chapter 20 Statistical Considerations Lecture Slides The McGraw-Hill Companies © 2012.
Statistics for Managers Using Microsoft Excel, 5e © 2008 Pearson Prentice-Hall, Inc.Chap 6-1 Statistics for Managers Using Microsoft® Excel 5th Edition.
Selecting Input Probability Distributions. 2 Introduction Part of modeling—what input probability distributions to use as input to simulation for: –Interarrival.
Generating Random Variates
Modeling and Simulation CS 313
MECH 373 Instrumentation and Measurements
Chapter 4 Continuous Random Variables and Probability Distributions
Engineering Probability and Statistics - SE-205 -Chap 4
Modeling and Simulation CS 313
Transforming to Linearity
Random-Variate Generation
Chapter 8 Random-Variate Generation
Statistics for Managers Using Microsoft® Excel 5th Edition
HYDROLOGY Lecture 12 Probability
Random Variate Generation
Further Topics on Random Variables: Derived Distributions
Further Topics on Random Variables: Derived Distributions
Chapter 5 Continuous Random Variables and Probability Distributions
Further Topics on Random Variables: Derived Distributions
Generating Random Variates
Presentation transcript:

Input Modeling for Simulation Chapter 3 “As far as the laws of mathematics refer to reality, they are not certain, and as far as they are certain, they do not refer to reality.” − Albert Einstein Last revision July 14, 2013 For more information on this book and materials, visit the official website,

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 1. Introduction (1/1) If actual data collected are available, there are three ways of input modeling: 1.Trace-driven simulation: the collected data values are directly used 2.Empirical input modeling: random variables for simulation are generated directly from the collected data; 3.Theoretical input modeling: the parameters of a theoretical distribution function are estimated from the actual data and random variables are generated from the fitted distribution function. Table of Contents 1. Introduction 2. Empirical Input Modeling 3. Overview of Theoretical Distribution Fitting 4. Theoretical Modeling of Arrival Processes 5. Theoretical Modeling of Service Times 6. Input Modeling for Special Applications No.2

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 2. Empirical Input Modeling (0/3) Table of Contents 2-1. Non-parametric Modeling 2-2. Empirical Modeling of Individual Data 2-3. Empirical Modeling of Grouped Data No.3

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 2. Empirical Input Modeling (1/3) 2-1. Non-parametric Modeling The value of the random variable x is repeatedly sampled from collected data {X k : k= 1~n} with probability 1/n. (1) Generate a uniform random number U ~ U(0,1); (2) Set P = n*U and k = [P] + 1; // [P] is the integer part of P. (3) Return x = X k ; Example 3.1: Generate a service time using the non-parametric method from the service time data {X k } given in Table 3.1. Let the value of the generated uniform random number U ~ Uni (0, 1) be , then the index ‘ k ’ in the non-parametric modeling method is computed as k = |10 * | + 1 = = 4. Thus, is ‘sampled’ as an empirical service-time to be used in a simulation. No.4

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 2. Empirical Input Modeling (2/3) 2-2. Empirical Modeling of Individual Data Sort the individual data in an increasing order {X (k) : k=1~n}, and the random variable x is sampled from a piecewise linear function with F(X (k) )= (k–1)/ (n–1).. (1) Generate a uniform random number U ~ U(0,1); (2) Set P = (n – 1)*U and J = [P] + 1; // [P] is the integer part of P. (3) Return x = X (J) + (P – J + 1)*(X (J+1) – X (J) ); Example 3.2: Table 3.2 shows the ordered service-time data {X (k) } that were obtained by rearranging the collected data in Table 3.1 in an ascending order. If the value of U is as before, we have P = 9 * = and J = |P| + 1 = 4. Then, an empirical service time is generated as: No.5

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 2. Empirical Input Modeling (3/3) (1) Generate U ~ U(0,1). (2) Find integer J such that G(a J )≤U < G(a J+1 ). (3) Return x = a J + (U – G(a J ))*(a J+1 – a J ) / (G(a J+1 ) – G(a J )) No.6

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 3. Overview of Theoretical Distribution Fitting (1/1) 3-1. Data Independence Checking A simple method of assessing data independence is a scatter diagram plotting. For the data X 1, X 2 … X n listed in time-order of collection, pairs (X i, X i+1 ) for i=1 ~ n–1 are plotted on an x, y-coordinate system (X i as x-value and X i+1 as y-value). If the plotted points are randomly scattered, one may conclude that the data are independent Distribution Function Selection For example, Erlang distribution is commonly selected for inter-arrival times, while Weibull distribution is the choice for an inter-failure time distribution. Service time distributions that are widely used are Beta distribution and lognormal distribution Parameter Estimation MLE is used for exponential, normal, and lognormal distributions; the method of moment for Erlang and Beta distributions; the rank regression method for Weibull distribution. No.7

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 4. Theoretical Modeling of Arrival Processes (0/3) Table of Contents 4-1. Generation of Inter-arrival Times for Constant Arrival Rate (λ) 4-2. Generation of Inter-arrival Times for Varying Arrival Rates λ(t) 4-3. Generation of Inter-arrival Times from Historical Data {xi} No.8

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 4. Theoretical Modeling of Arrival Processes (1/3) (1) Generate independent u ~ U(0,1). (2) Return x = –(θ)*ln(u) 4-1. Generation of Inter-arrival Times for Constant Arrival Rate (λ) When the arrival process is stationary with a constant arrival rate λ, the inter-arrival time X follows Exp(θ) with mean θ=1/λ. - X ~ Exp(θ)  F(x) = 1 – e –x/θ. Exponential variate x with mean θ is generated by the inverse-transform method. - U = F(x) = 1 – e –x/θ  e –x/θ = (1– U)  x = –θ*ln(1– U) ≡ –θ*ln(U) No.9

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 4. Theoretical Modeling of Arrival Processes (2/3) (1) Set: t = t i–1 ; // the previous arrive-time (2) Generate: U 1 ~ U(0.1) and U 2 ~ U(0.1); (3) D = –(1/λ * ) ln(U 1 ); //exponential random variable with θ= 1/λ * (4) t = t + D (5) If U 2 ≤ λ(t)/λ *, then return t i = t, else go back to Step (2) 4-2. Generation of Inter-arrival Times for Varying Arrival Rates λ(t) A widely used method, called thinning, for generating non-stationary inter-arrival times is as shown below. No.10

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 4. Theoretical Modeling of Arrival Processes (3/3) 4-3. Generation of Inter-arrival Times from Historical Data {xi} 1)Erlang(k,θ): mean = k*θ; variance = k*θ 2 2)Compute sample moments m 1 and m 2 : 3)Estimate parameters of Erlang(k,θ): 4)Generate Erlang(k,θ) variate via convolution of Exponential variates (k=integer). (1) Generate independent u i ~ U(0.1) for i=1~k. (2) Return x= No.11

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 5. Theoretical Modeling of Service Times (0/3) Table of Contents 5-1. Uniform random variate 5-2. Triangular random variate 5-3. House distribution random variate 5-4. Beta distribution random variate No.12

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 5. Theoretical Modeling of Service Times (1/3) 1) Uniform random variate: X~ Uniform (a, b) When only the range data [a, b] is given, a simple but useful method is to generate the service time X from the uniform distribution U(a, b). Namely, let U~ U(0,1) then the uniform random variate X~ U(a, b) is generated by: X = a + (b– a)*U 2) Triangular random variate: X~ Triangular (a, b, c) If the mode c is also given in addition to the range data [a, b], service times may be sampled from a triangular distribution. Service-time random variate X following the triangular distribution Triangular (a, b, c) may be generated by using a composition method given below: No.13

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 5. Theoretical Modeling of Service Times (2/3) 3) House distribution random variate: X~ House (a, b, c, h) When the height (h) the house is also specified (in addition to a, b, and c), service time may be sampled from the house distribution. A composition method is employed to generate house- distribution random variates X. a 2/(c–a) cb a cb a cb 2/(b–c) 1/(b–a) Y = a + (c – a) * (U) 1/2 Y = c + (b – c) * [1 – (1 – U 2 ) 1/2 ] Y = a + (b – a) * U 2 No.14

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 5. Theoretical Modeling of Service Times (3/3) As the direct methods (i.e., inverse-transform and convolution methods) are not applicable to Beta distribution, the acceptance-rejection method is used in generating a Beta random variate. 4) Beta distribution random variate: Beta(α, β) The beta distribution is defined by the shape parameter α and scale parameter β and is widely used in modeling service times, especially, in the field of project management mainly due to its flexibility. No.15

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 6. Inter-failure Time Modeling with Weibull Distribution (0/2) Table of Contents 6-1. Generation of Weibull Random Variate 6-2. Estimation of Weibull Distribution Parameters No.16

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 6. Inter-failure Time Modeling with Weibull Distribution (1/2) Weibull(α,β) random variate X is obtained from a uniform random variate U as follows: X = β*(– ln U) 1/α 1) Generation of Weibull Random Variate: Weibull(α, β) Inter-failure time is modeled by the Weibull distribution mainly due to its flexibility. If the failure rate decreases over time, then use α 1. U = F(t) =  (Inverse transform)  x = F –1 (U) = β*(– ln (1– U)) 1/α = β*(– ln U) 1/α No.17

Modeling and Simulation of Discrete-Event SystemsChapter 3- Input Modeling for Simulation 6. Inter-failure Time Modeling with Weibull Distribution (2/2) 2) Estimation of Weibull Distribution Parameters: Weibull(α, β) Weibull parameters α, β can be estimated from the collected inter-failure time data {X i } by using a rank regression method. In order to estimate the parameters, 1) the collected data {X i } are rearranged in an increasing order to obtain a set of ordered sample data {X (i) : i = 1 ~ n} and the median rank R i of the i-th sample data X (i) is computed using the following equation: R i = (i – 0.3) / (N + 0.4). Then, the sequence of ordered rank data pairs {X (i), R i } are fitted to the Weibull distribution as follows X (1) X (2) X (3) X (4) X (5) 1.00 x 0 R1R1 R2R2 R3R3 R4R4 R5R5 F(x)= No.18