Python, SimPy: How to generate a value from a triangular probability distribution? -
I want to run a simulation that uses as a parameter, from the triangular probability distribution to the lower limit A, The value generated with mode B and upper limit C. How can I generate this value in Python? Is there anything simply as exposures (lambda) (from random) for this distribution or do I have to code this thing?
If you download the NumPy package, then there is a function in it numpy.random.triangular (left , Mode, right [, shape]) which are really looking for you.
Comments
Post a Comment