question

chao.g avatar image
2 Likes"
chao.g asked Phil BoBo edited

Distribution Generation Mechanism

Attached is a simple model I am trying to track the quality of downtime distribution I used for Processor 1.(MTTRMTBF1), objective is to make sure the number generated from the distribution would be good quality numbers.

What is the mechanism that Flexsim used to generate certain type of distributions, like when I select exponential(0,1000,0), how can I be sure that the number generated from FlexSim will be good enough to represent the distribution. That is the reason why I am setting different tracked variable to see the actual number generated. It seems good, but I would like to know the mechanism that's behind this.

Thanks,

FlexSim 16.2.0
random streamgeneral
test.fsm (17.7 KiB)
· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Sam Stubbs avatar image Sam Stubbs ♦ commented ·

It sounds like the tool you're looking for is ExpertFit. I myself don't have a lot of experience with using it, so I'll let others with more experience direct you, but essentially ExpertFit is designed for entering values of data that you've collected, and it will return the distribution that will best represent the distribution of those values.

Is that the kind of thing you're looking for?

0 Likes 0 ·
chao.g avatar image chao.g Sam Stubbs ♦ commented ·

Sam,

That's not what I am looking for, I am trying to know if I selected a distribution for a processor's cycle time say normal(100,20), what's the background control to make sure the number generated from FlexSim will follow normal(100,20) distribution.

Please suggest.

-1 Like -1 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

Looking at the code for the normal() distribution it looks like we're using the Box-Muller Transformation.

You can see some example code in this stack overflow answer.

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Matthew Gillespie ♦♦ commented ·

Also check out this wikipedia article.

0 Likes 0 ·

1 Answer

·
Phil BoBo avatar image
4 Likes"
Phil BoBo answered Phil BoBo edited

Our random number generators are explained this thread: http://www.flexsim.com/community/forum/showthread.php?t=171&p=4318

Also, you can use a variety of stochastic distributions, such as bernoulli, beta, binomial, empirical, erlang, exponential, gamma, geometric, inversegaussian, johnson, loglogistic, loglaplace, lognormal, negbinomial, normal, pearsont, poisson, qstudentt, triangular, uniform, and weibull.

These stochastic functions are coded based on recommendations in the book Simulation Modeling and Analysis by Averill M. Law and W. David Kelton.

If you want to "make sure the number generated from FlexSim will follow normal(100,20) distribution," then write a script loop that samples from that distribution many, many times and output the results. Then input those results into one or more curve-fitting software packages, such as ExpertFit, Stat::Fit, or MATLAB, and then see if the actual sampled values fit back to the input distribution and parameters that generated them.

· 8
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

chao.g avatar image chao.g commented ·

Thanks for this information, it's really helpful.

Essentially I just want to make sure the quality of number generated by selecting different distributions will be good enough when comparing with other DES software. So for stochastic functions the book you referenced, is that a standard where other DES software also referenced to code their stochastic functions?

Also, about the random number stream link in the old forum, if I have two station, their Mean time between failure both follow exponential distribution with mean of 40 minutes , am I supposed to use a different random stream for them or it's okay to use same random stream.

I used same random stream in current model for different MTTRMTBF, it doesn't seem like that will cause Mean Time between failure number generated for different processors be the same(that way, they are go down the same time).

Thanks!

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ chao.g commented ·

Averil Law and ExpertFit have a relationship with almost all of the DES software packages on the market. If you click the Versions tab on the ExpertFit DES webpage, you can see the list of software packages that ExpertFit supports.

FlexSim is using code provided by Averill M. Law & Associates to sample the random distributions that ExpertFit supports. FlexSim also uses code provided by Stat::Fit for some additional random distributions that are available in Stat::Fit but not in ExpertFit.

This post has an explanation of why you should use different random streams for each object in your model.

Using the same random stream for different MTBF/MTTR objects won't cause Mean Time between Failure number generated for different processors to be the same. But it will make it so that if the timing of one of those MTBF/MTTR changes, it will also change the values returned for the other MTBF/MTTR object. This could lead to undesired results where part of your model is dependent on another part of the model simply because they use the same random number stream.

0 Likes 0 ·
chao.g avatar image chao.g Phil BoBo ♦♦ commented ·

Clicked on this, I don't have access to this post.

0 Likes 0 ·
Show more comments
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.