Random tBetween Value in Pulse Train
Posted: Wed Oct 01, 2008 11:34 pm
I have the following statement:
PULSE TRAIN (0,1,INTEGER(RANDOM UNIFORM (2,7,0)),FINAL TIME)
In short I want a pulse train where the tbetween value varies from 2 to 6. I want the pulse to fire off at a given time, say time+4 and then after that pulse fires off I want it to fire off again 6 time steps later and then again 2 time steps after that one... so forth and so on.
Upon examing the output of such a function I am observing gaps between pulses less 2 and greater then 7. In fact I've seen a gap time as high as 11.
I've tried different variations on the above code snippet but to no effect. The closet I've come to staying between the bounds of 2 and 6 was with the following:
PULSE TRAIN (0,1,INTEGER(RANDOM UNIFORM (0,1,0)*7)+1,FINAL TIME)
Which gets me to between 1 and 9.
I realize the manual mentions that using non constants in the pulse train would result in non regular behavoir but I figured it was talking about going from uniform spacing between pulses to a non uniform spacing. I didn't think it meant causing gaps between pulses that were outside of the tbetween variable.
Is this what is meant by the irregular behavoir? An is there a work around for this if that's the case?
Any help would greatly appreciated.
-Chip
PS: I'm using VENSIM DSS 5.8a (Double Precision) and I've attached the test model that I was experimenting on.
PULSE TRAIN (0,1,INTEGER(RANDOM UNIFORM (2,7,0)),FINAL TIME)
In short I want a pulse train where the tbetween value varies from 2 to 6. I want the pulse to fire off at a given time, say time+4 and then after that pulse fires off I want it to fire off again 6 time steps later and then again 2 time steps after that one... so forth and so on.
Upon examing the output of such a function I am observing gaps between pulses less 2 and greater then 7. In fact I've seen a gap time as high as 11.
I've tried different variations on the above code snippet but to no effect. The closet I've come to staying between the bounds of 2 and 6 was with the following:
PULSE TRAIN (0,1,INTEGER(RANDOM UNIFORM (0,1,0)*7)+1,FINAL TIME)
Which gets me to between 1 and 9.
I realize the manual mentions that using non constants in the pulse train would result in non regular behavoir but I figured it was talking about going from uniform spacing between pulses to a non uniform spacing. I didn't think it meant causing gaps between pulses that were outside of the tbetween variable.
Is this what is meant by the irregular behavoir? An is there a work around for this if that's the case?
Any help would greatly appreciated.
-Chip
PS: I'm using VENSIM DSS 5.8a (Double Precision) and I've attached the test model that I was experimenting on.