How to condition on Time
How to condition on Time
I want to condition on the variable Time in Vensim. For example, if Time<10 then report=25%, else report=75%
Re: How to condition on Time
IF THEN ELSE( Time < X, A, B )
http://vensim.com/documentation/fn_if_then_else.htm
http://vensim.com/documentation/fn_if_then_else.htm
/*
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
*/
Re: How to condition on Time
Thanks. I actually have used that statement before but it did not work. I got this message: "The following inputs were not expected (but are used): Time"
The variable Time is implicit in the model. It's the time scale, I'm wondering if that's not why it's not working
The variable Time is implicit in the model. It's the time scale, I'm wondering if that's not why it's not working
Re: How to condition on Time
That message is just a diagram consistency warning and can be ignored; time will be added to the causes on the diagram. If you're using PLE, it's a little stricter. Just add Time to the diagram, using the Shadow Variable tool, and connect it to your variable containing the IF statement.
/*
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
*/
Re: How to condition on Time
Thanks so much.