ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 04-28-2008
Guillermo Arce Guillermo Arce is offline
Flexsim User
 
Join Date: Apr 2008
Posts: 1
Downloads: 0
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Guillermo Arce is on a distinguished road
Default Exponential Distribution

An easy one.

Is location and scale in the exponential distribuion referd to Location = Mean and Scale = Std Deviation.

I couldn't find anything about it in the help menu and read something about location and scale family of univariate probability distributions saying the above. I just need to confirm.

Thanks
  #2  
Old 04-28-2008
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

See http://www.itl.nist.gov/div898/handbook/eda/section3/eda364.htm
For the normal distribution, the location and scale parameters correspond to the mean and standard deviation, respectively. However, this is not necessarily true for other distributions. In fact, it is not true for most distributions.

See http://en.wikipedia.org/wiki/Exponential_distribution
For exponential location and scale parameters.
__________________
Best,
Alan

Last edited by AlanZhang; 05-01-2008 at 11:38 PM.
  #3  
Old 04-29-2008
Martijn van Oostenbrugge's Avatar
Martijn van Oostenbrugge Martijn van Oostenbrugge is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Posts: 71
Downloads: 12
Uploads: 0
Thanks: 44
Thanked 44 Times in 24 Posts
Rep Power: 268
Martijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to all
Default

Guillermo, if you want to view distributions you give in Flexsim you can use Expertfit. It is in the menu under Statistics. The parameters you give in Expertfit are exactly the same as you give in Flexsim.

Martijn
  #4  
Old 05-01-2008
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

Also, to give you a better idea of what the location and scale parameters do, generally the location parameter will "translate" the distribution to the left or right, like addition. For example:
exponential(10, 5)
will give you the same distribution as:
exponential(0, 5) + 10.

The scale parameter will generally scale the distribution. For example:
exponential(0, 8)
will give you the same distribution as:
exponential(0, 1) * 8

The shape parameter, if used, is usually a parameter that defines further the shape of the distribution. For example, in a lognormal, I think the shape parameter will let you specify how long or short the right tail of the lognormal should be.

For the exponential distribution, it happens that, if you give a location of 0, then the mean of the distribution is the same as the scale parameter of the exponential, although as Alan said, this does not apply for other distributions.

If you don't have any data on your distributions, but have a general idea of what it probably looks like, and don't want do go through the extra work of doing a time study, then you can use the triangular distribution, where you specify a min, max and most likely, or you can use the lognormalmeanstdev command. With this command you can just pass in the mean and standard deviation that you want, and it will figure out the right location, scale, and shape factors to pass to the lognormal distribution (which is a pretty good distribution for simulating things like processing times). Note that with lognormalmeanstdev, flexsim picks the shape or "skewness" for you, namely a reasonably long right tail, so it's not as flexible.
The Following User Says Thank You to Anthony Johnson For This Useful Post:
Cliff King (05-02-2008)
  #5  
Old 05-02-2008
Cliff King's Avatar
Cliff King Cliff King is offline
Vice President Technical Services
 
Join Date: Jul 2007
Location: Utah
Posts: 272
Downloads: 158
Uploads: 14
Thanks: 102
Thanked 304 Times in 110 Posts
Rep Power: 412
Cliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud of
Default

Hey, the exponential command is actually one of the distributions I had time to document in the last release. I didn't include an image for it like I did for some of the other ones, but I did show what the location and scale are, and the fact that the mean is the sum of the two and the variance is the scale squared. At this point I've only gotten to about half of them, and expect to finish the rest (plus add detail to a lot more commands) before the 4.5 release at the Flexsimposium in October. In the mean time, there is information in the ExpertFit help regarding the distributions and as Martijn pointed out, ExpertFit uses the same parameters as Flexsim. After openiing ExpertFit, click on User's Guide... in the Help menu. It'll open a pdf file, then scroll to the bottom of it to see the distributions.
  #6  
Old 05-06-2008
qin tian qin tian is offline
Flexsim User
 
Join Date: Dec 2007
Location: Shanghai, China
Posts: 137
Downloads: 115
Uploads: 0
Thanks: 59
Thanked 3 Times in 3 Posts
Rep Power: 161
qin tian is on a distinguished road
Default

But how to generate a truncated distribution?
  #7  
Old 05-07-2008
Cliff King's Avatar
Cliff King Cliff King is offline
Vice President Technical Services
 
Join Date: Jul 2007
Location: Utah
Posts: 272
Downloads: 158
Uploads: 14
Thanks: 102
Thanked 304 Times in 110 Posts
Rep Power: 412
Cliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud of
Default Truncating a distribution

To truncate a distribution, you can do something like this:

Code:
double truncated_value = minof(15, maxof(5, exponential(0,10,1)));
or something like this:

Code:
double truncated_value = exponential(0,10,1);
while(truncated_value > 15 || truncated_value < 5)
truncated_value = exponential(0,10,1);

There is a definite difference between these two approaches, so make sure you study them closely...

By the way, some of the distributions are naturally bounded such as the uniform distribution and the beta distribution (see Flexsim Users Manual v4.32 for more information).
  #8  
Old 05-07-2008
qin tian qin tian is offline
Flexsim User
 
Join Date: Dec 2007
Location: Shanghai, China
Posts: 137
Downloads: 115
Uploads: 0
Thanks: 59
Thanked 3 Times in 3 Posts
Rep Power: 161
qin tian is on a distinguished road
Default

Yes, I think the second method is better
  #9  
Old 12-13-2010
Congshi Wang Congshi Wang is offline
Student
 
Join Date: May 2010
Location: Germany
Posts: 58
Downloads: 2
Uploads: 0
Thanks: 48
Thanked 0 Times in 0 Posts
Rep Power: 124
Congshi Wang is on a distinguished road
Default

Hi,

I'm used to parametrize a lognormal distribution with the mean and standart deviation values of a normal distribution. Can anyone give me a hint how to translate thes two parameters into the flexsim parameters location, scale and shape. And what does stream mean? Thanks!

Congshi
  #10  
Old 12-13-2010
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

Hi,

stream is simple the random stream of numbers executed in the distribution. Maybe you take a look at the manual or look for other posts in the community forum.

Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Congshi Wang (12-13-2010)
  #11  
Old 12-13-2010
Congshi Wang Congshi Wang is offline
Student
 
Join Date: May 2010
Location: Germany
Posts: 58
Downloads: 2
Uploads: 0
Thanks: 48
Thanked 0 Times in 0 Posts
Rep Power: 124
Congshi Wang is on a distinguished road
Default

Thanks, but I've nowhere seen a manual or guide that explains how to exactly do this.
  #12  
Old 12-13-2010
Jörg Vogel's Avatar
Jörg Vogel Jörg Vogel is offline
Flexsim User
 
Join Date: Sep 2007
Location: Hannover, Germany
Posts: 643
Downloads: 35
Uploads: 0
Thanks: 802
Thanked 665 Times in 410 Posts
Rep Power: 642
Jörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond reputeJörg Vogel has a reputation beyond repute
Default

If you examine a plot of a distribution, the scale value affects the vertikal size. The shape value affects the horizontal size. The location value moves the hole form simply to the left or the right. There is no effect to the form. It is constant.

This is the result we discovered so far, maybe it is right?.

Jörg
The Following User Says Thank You to Jörg Vogel For This Useful Post:
Congshi Wang (12-16-2010)
  #13  
Old 12-13-2010
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Somerset, UK
Posts: 719
Downloads: 20
Uploads: 0
Thanks: 123
Thanked 953 Times in 446 Posts
Rep Power: 773
Jason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond reputeJason Lightfoot has a reputation beyond repute
Default

Have you looked at the function lognormalmeanstdev() ?

If you're using lognormal2, then the scale should be exp(normalmean) and the shape should just be the normal standard deviation (normal parameters found by looking at the log of the samples)

This gives the same distribution as lognormal with scale as the normalmean and shape as the standard deviation.

Last edited by Jason Lightfoot; 12-13-2010 at 01:43 PM.
The Following User Says Thank You to Jason Lightfoot For This Useful Post:
Congshi Wang (12-16-2010)
  #14  
Old 12-13-2010
Vincent Bechard Vincent Bechard is offline
Consulting in Simulation
 
Join Date: Oct 2008
Location: Montréal (Canada)
Posts: 28
Downloads: 0
Uploads: 0
Thanks: 4
Thanked 41 Times in 13 Posts
Rep Power: 165
Vincent Bechard will become famous soon enoughVincent Bechard will become famous soon enough
Default

Hi,

I vote that, in the next Flexsim release, there will be a command for lognormal distribution with location, mean and stdev as input parameters!
__________________
Vincent Béchard, Eng., MASc.
Discrete Event Simulation Designer
SNC-Lavalin, Industrial Division
ca.linkedin.com/in/vincentbechard/
The Following User Says Thank You to Vincent Bechard For This Useful Post:
Congshi Wang (12-16-2010)
  #15  
Old 12-20-2010
michaelsmith michaelsmith is offline
TMN Simulation -Australia
 
Join Date: Aug 2007
Location: Hobart Tasmania
Posts: 62
Downloads: 7
Uploads: 0
Thanks: 31
Thanked 19 Times in 12 Posts
Rep Power: 170
michaelsmith will become famous soon enough
Default

This is something that I encountered on a recent project, the statistical terminology used in expertfit does not match up with that used by a large number of Stats people. These are the same sort of people who get very suspicious when asked to just believe the output of a software package they have not used or heard of.
Giving the Mean/Mode/SD parameters would be good
  #16  
Old 12-21-2010
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

There is already a command that takes location, mean, and stdev as parameters. It's lognormal(). Unfortunately the documentation's parameters are not named intuitively. For the next release we'll change the documentation so that it's:

lognormal(num location, num normalmean, num normalstdev)

I think that the terms normalmean and normalstdev should be used instead of just mean and stdev so that non-experts will know that these parameters do not represent the mean and standard deviation of the lognormal distribution. Rather they represent the mean and standard deviation of the normal curve that the lognormal curve is based on.

Yes, I agree that expertfit is a little weird there. In its latest version, it decided that the scale parameter should be redefined so that the distribution scales linearly with the scale parameter. That's why we had to add the lognormal2() command, to be compatible with expertfit's parameter definitions. Flexsim's command help is pretty clear on this, though (although the characters are all weird. Is that a Windows 7 thing?).



All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.