Page 1 of 1

Random Pulse

Posted: Tue Dec 05, 2006 9:12 am
by Nurul
Hi all,

I'm new in using Vensim, and I have a problem with the pulse.
If I want to set one randomly demand every 24 hours, how should I do?

Posted: Tue Dec 05, 2006 11:29 am
by bob@vensim.com
If you want a random demand quantity every 24 hours use

IF THEN ELSE(MODULO(Time,Time Units Per Day) < Time Step/2,random demand quantity,0)

If you want a random demand with an average time between demands of 24 hours use

demand = RANDOM POISSON(0,1e9,mean demand rate,0,1,0)
mean demand rate=1/24 ~ Part/Hour

this assumes the model is in hours - note RANDOM POISSON only makes sense for difference equations.