Ricky <rakkitha...@gmail.com> writes: > I am doing a project on traffic simulation. I want to introduce > exponential arrival distribution to precede this task. Therefore I > want write a code in python for exponential arrival distribution.
I've never heard of an "exponential arrival distribution" and googling fails. Do you mean an exponential distribution, that describes the expected arrival times in a Poisson process? Python's "random" module has the random.expovariate function for that: http://docs.python.org/3/library/random.html If you want an actual (discrete) Poisson distribution, see: http://en.wikipedia.org/wiki/Poisson_distribution#Generating_Poisson-distributed_random_variables -- http://mail.python.org/mailman/listinfo/python-list