PDA

View Full Version : First Interval Distributions


Jason Lightfoot
08-01-2010, 07:07 PM
Often you'll have time between failure samples or other inter-arrival times, but are left wondering at the start of the simulation what the time to the first of these should be. This user command generates another set of samples that you can fit (using eg. Expertfit) and then enter as the 'First Interval' distribution that you see on the MTBF dialog or use elsewhere as appropriate. It takes about 10 seconds to create a sample of 100,000 from a population of 1 million. Load the library to auto install the command:


generateFirstIntervalSamples(str expression,num samplesize, num populationsize,obj targetnode)

Description: For time-based distributions of arrival or failure intervals, this creates a set of values for subsequent fitting that reflect the initial times to the first arrival or failure. This is useful if the distribution is not exponential (or special cases of gamma/erlang and weibull where the shape value makes them exponential) , and you want to start the model with valid first intervals. Exponential distributions do no need this as they are memoryless (try it and you'll see the first interval samples fit the same distribution you entered).

Write your distribution as a string expression and specify how many samples you would like and the population size it should use (to create a base timeline in which to sample). Pass in a node where the function will create a table and place the sample.

Export the values to ExpertFit and fit the sample to determine a good estimate of the FirstInterval field for MTBF and other interval base time fields.


Example: generateFirstIntervalSamples("gamma(20,3000,1.8)",10000,1000000,reftable("Sample"));

...places the first interval samples of the gamma(20,3000,1.8) distribution in a column in the global table called "Sample".