You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RANDOM UNIFORM(m,x,s) provides a uniform distribution between m and x (exclusive of the endpoints).
RANDOM UNIFORM as of version 0.7.2 is translated to numpy.random.rand which generates as uniform distribution between 0..1 with the parameters defining the shape of the returned values.
RANDOM UNIFORM(m, x, s) should be translated to np.random.uniform(m, x), the s parameter isn't actually used and is just in the VENSIM function to maintain a common interface
The text was updated successfully, but these errors were encountered:
I don't think that's dirty at all. If you want to submit a PR, I'll bring it into master.
Thanks for finding this - the random functions are hard to test for because they don't give a standard output that lets us test the way the rest of the tests are run. We should think about a unit test, perhaps somewhere in here. While it won't help us find other issues with the way the random functions are implemented, it'll make sure we don't make this mistake again...
As this particular case is fixed, I'm closing the issue. However, it points to a need for better testing of randomization functions, so I've opened an issue for that specifically, #107.
From the Vensim documentation:
RANDOM UNIFORM as of version 0.7.2 is translated to numpy.random.rand which generates as uniform distribution between 0..1 with the parameters defining the shape of the returned values.
RANDOM UNIFORM(m, x, s) should be translated to np.random.uniform(m, x), the s parameter isn't actually used and is just in the VENSIM function to maintain a common interface
The text was updated successfully, but these errors were encountered: