After update to 5.10 c error msg for random function

Use this forum to post Vensim related questions.
Post Reply
Mattes_01
Member
Posts: 42
Joined: Mon Jul 05, 2010 6:05 am

After update to 5.10 c error msg for random function

Post by Mattes_01 »

Hi there,

for now I stopped researching about subscripts and devoted the basic modeling of my model.

FOr this purpose I advised out IT team to update my Vensim Version to the newest one, but now I am recieving error messages from one random function, maybe one of you knows the reason:

"Range or Parameters to random function inconsistent computing"

I am using a random normal function over there (the only random...function in my model so far) which is:
random normal(0,2*x_bar,x_bar,stdev,0)
where "x_bar" is the mean value and "stdev" is the standard deviation.

Does anybody know the reason for this error message?

Best regards from germany.
Mattes
Administrator
Super Administrator
Posts: 4844
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

What values do you have for x_bar and stdev?
Mattes_01
Member
Posts: 42
Joined: Mon Jul 05, 2010 6:05 am

Post by Mattes_01 »

Hello!

x_bar = 275 + step(80,100)

Stdev = 275

Could it be, that the random function gets values (e.g. -10 or 1000), which are out of the bounds of the lower and upper limits?
This sounds logical for me.

Then the solution yould be to either decrease/increase the bounds or adjust the standard deviation.

Or is there another possibility?
I mean if the function just takes the bounds in cases where the random value is out of the range, it could be possible that the mean value, which was set, is not the mean value of the data set given by the random function
(e.g. imagine random normal(0,10,8,5,0) In this case the mean of "8" couldn't be reached if the function just takes the bounds in cases the random function calculates for example values of 11,12 and so on).
tomfid
Administrator
Posts: 3999
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

There were some changes to RANDOM functions in the recent releases - see the release notes. The issue may be that your truncation of the distribution is significant enough to make it unlikely that a draw from the untruncated distribution lies in the truncated range, though on the surface that doesn't appear like it would be a problem.
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

Actually there is no way the values you give should be causing problems - look for a typo in the random equation, or perhaps the equation for x bar. For example if x bar is 0 then you will get this message since 0 is most likely never drawn on a normal variable and Vensim gives up after 2000 tries.
Mattes_01
Member
Posts: 42
Joined: Mon Jul 05, 2010 6:05 am

Post by Mattes_01 »

Yes you are right, Bob.
There have been times in which x_bar was zero.
This caused the problem.

Thank you for that.

Issue fixed :)

Have a nice weekend over there!
Post Reply