Dear all,
I am looking to create an IF ELSE condition which trigers a single pulse only if a stock exceeds a threshold value. I want to define the magnitude of the pulse using a variable generated by the model with a constant preset time duration.
e.g.
if(valueOfStock > threshold){
pulse(heightVariableY, timeDurationConstant)
} else{
0
}
I am sorry for what I'm sure is a trivial question however I have just moved from another environment and I can't seem to get this to work in Vensim. I would greatly appreciate any help offered.
Kind regards,
A
Pulse function
Re: Pulse function
I think the problem with your current formulation is that you're treating the first parameter of PULSE as height. In Vensim, PULSE is a 0-1 switch, so you'd want height*PULSE(timeOfPulse,duration).
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/