Presentation is loading. Please wait.

Presentation is loading. Please wait.

 1  Outline  stages and topics in simulation  generation of random variates.

Similar presentations


Presentation on theme: " 1  Outline  stages and topics in simulation  generation of random variates."— Presentation transcript:

1  1  Outline  stages and topics in simulation  generation of random variates

2  2  Stages of Simulation Model Experimentation and OptimizationImplementation of Simulation Result Problem Formulation Data Collection and Analysis Model Development Model Verification and Validation # of servers in a counter

3  3  Topics in Simulation  knowledge in distributions and statistics  random variate generation  input analysis  output analysis  verification and validation  optimization  variance reduction

4  4  Model Formulation model conceptual model analytical or computer model

5  5  Problem Formulation  conceptual and analytical models: identify & define variables X, objective functions f, & constraints  through observing the system  never forcing for a standard model This is an M/M/1 queue This is a GI/G/1 queue   … … … 

6  6  Data Collection and Analysis – Actual Tasks  How to conduct data collection?  How much time, effort, and money to deploy to get data?  What kind of sampling techniques should be used?  How to ensure that the objects under observation behave normally?  How to deal with outliners in the data?  Is the set of data enough (representative)?  What distribution do the collected data values of X i appear to follow?  What are the parameter values of the distribution of data of X i ?  How good is the fit of data to selected distributions and parameter values?  Do the random quantities X i and X j appear to be independent?  Do the data values of a variable X i appear to follow some pattern?

7  7  Input Analysis  statistical tests to analyze data collected and to build model  standard distributions and statistical tests  estimation of parameters  enough data collected?  independent random variables?  any pattern of data?  distribution of random variables?  factors of an entity being independent from each other?  data from sources of the same statistical property?

8  8  Random Variate Generation  the generation of samples from a given distribution  different methods, eventually tracing back to the generation of random variates from uniform(0, 1)  various tests  correct distribution?  best parameter values?  independent of random variables?  ….

9  9  Output Analysis  to draw meaningful inferences by statistical methods  What is a good point estimate?  What is an interval estimate?  How large is the variance of the point estimate?  How many simulation runs is needed to get a pre- specified confidence interval?  Does the variance estimating method correct? ……

10  10  Output Analysis – Terminating System  output analysis: statistical tests for the results  n replications   =  1  n   = (  1, ,  n ), where  i is outcome of the ith replication  sampled values: X 1 (  1 ), …, X n (  n )  estimate by  estimate  by= g(X 1 (  1 ), …, X n (  n ))

11  11   unbiased estimator of  ?  variance of estimator  efficient estimator of  ?  confidence on the range estimator  # of simulation runs (replications) required? Output Analysis – Terminating System  statistical tests associated with

12  12  Output Analysis – Non-Terminating System  similar questions in the terminating system  possibly with dependent random variables

13  13  Validation and Verification conceptual model system analytical or computer model solution validation: are we solving the right model, i.e., can our model really solve the problem? verification: are we solving the model right, i.e, have we made any mistake in these tasks? model

14  14  Verification and Validation  Verification: Is the simulation model right?  Does the simulation match with the conceptual model?  debugging simulation programs  Validation: Is it a right model to simulate?  Is the simulation model  or even the conceptual model  a meaningful and accurate representation of the real system?  checking the consistency of the model with reality and its value as a model to simulate

15  15  Model Experimentation and Optimization  X: characterized by a parameter , denoted as X(  )   : can be a vector  examples:  carousel system:  = given order or item picking policy  8-hour workshop:  = (  1, ,  k ) being the production rates of k workers  GI/G/1 service station:  = (arrival rate of customers, service rate of the server)  look for the best 

16  16  Model Experimentation and Optimization  the determination of  opt  questions to answer  What are the best values for the parameters?  How to search for such best values?  What is the most convenient way to get such values?

17  17  Variance Reduction Methods  How to get an unbiased estimator with smaller variances?  different g’s to estimate   some g’s has less variance than others  e.g., one versus two replications  speeding up simulation by choosing specific g’s  estimate by  estimate  by= g(X 1 (  1 ), …, X n (  n ))

18  18  The Generation of Random Variates  generators met before  Excel rand(), Random Number Generator  Assignments: die and random movement, exponential, discrete distribution, random location, Binomial distributiondie and random movement exponentialdiscrete distributionrandom locationBinomial distribution

19  19  Methods to Generate Random Variates  inverse transform  convolution  composition  acceptance / rejection

20  20  Generation of Random Variates  random variable: a mapping from the sample space to the set of real number  random variate: an outcome (i.e., sample point) of a random variable  key: uniform (0, 1) random variates {u n }  getting random variates from any distributions, including those from multi-variate distributions of any arbitrary joint distributions

21  21  Inverse Transform  to simulate the flips of a fair coin  head if 0 < u < 0.5, tail if 0.5 < u < 1  to simulate X = 1 w.p. 0.5, X = 0 w.p. 0.5  x = 1 if 0 < u < 0.5, x = 0 if 0.5 < u < 1  general form: looking for a function h such that h(U) (or h(U 1, …, U k )) ~ X  x = h(u) (or x = h(u 1, …, u k ))

22  22  Inverse Transform  what is function h for the case:  to simulate X = 1 w.p. 0.5, X = 0 w.p. 0.5  x = 0 if 0 < u < 0.5, x = 1 if 0.5 < u < 1  the form of function h:  h(u) = 0 if 0 < u < 0.5  h(u) = 1 if 0.5 < u < 1  h being the inverse function of F, the distribution function of X

23  23  Distribution Function F and its Inverse Function 0 F(x)F(x) x 1 0.5 1 h(u)h(u) u 1 1

24  24  Inverse Transform  same idea of h = F -1 to any discrete random variables  same idea to any continuous random variables (as long as F -1 is known)  clever ways to check the inverse transform Algorithm 2.3.2.1 for Exponential

25  25  Convolution  X = b 1 Y 1 +... + b n Y n  generate variates of Y 1 to Y n  weighted sum Y variates as the expression Example 2.6.2 for Binomial Example 2.5.3 for Triangular Example 2.6.3 for Erlang (k,  )

26  26  Composition equivalent form in distribution F(x) = p 1 F 1 (x ) +... + p 1 F k (x ) use a zero-one uniform variate to determine the “type” and then generate the corresponding Y variate

27  27  Acceptance / Rejection  generate a variate from the uniform distribution on a disc of unit radius  1 o generate a variate of (X, Y) such that X, Y X, Y ~ i.i.d. uniform [-1, 1]  2 o accept (x, y) to be the desirable variate if x 2 + y 2  1; else go to 1 o  result: uniform in {(x, y)| x 2 + y 2  1}

28  28  Acceptance / Rejection – Discrete Distribution  X ~ {p i }; Y ~ {q i } such that p i /q i  c for all i  1 o Generate y from Y ~ {q i }.  2 o Generate u from U.  3 o If cq y u < p y, set x = y and stop; else go to 1 o. similar procedure applicable to continuous distribution with {p i }, {q i } replaced by the corresponding density functions primarily for continuous distributions whose F -1 is hard to find


Download ppt " 1  Outline  stages and topics in simulation  generation of random variates."

Similar presentations


Ads by Google