FINAL TIME dependent on a variable?

Use this forum to post Vensim related questions.
Post Reply
Seb
Junior Member
Posts: 2
Joined: Sat Jan 26, 2008 3:23 pm

FINAL TIME dependent on a variable?

Post by Seb »

Hi,

I've got a question regarding the length of my vensim simulation.

I would like to stop the model-simulation at the time when a variable used in the model reaches a specific value.
Is that possible? Is there an equation for a FINAL TIME which depends on a variable used in the model?

In case this doesn't work, would it be possible to type in a similar equation for the end time of the time axis?

Thanks for any answers, I appreciate it!

Cheers,
Seb
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

Just add FINAL TIME to a sketch, connect its input and write the equation.

In Vensim PLE/Plus (Version 5.7a required) select the shadow variable tool then Shift-Click where you want to drop FINAL TIME. In others use the Variable Tool.
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Post by LAUJJL »

If I wanted to have a variable lenthf of simulation, I would prefer to test the possibility of setting a final time sufficient large and simulating up to that final time, and taking into account only the results up to the real length of time wanted that can be named differently. Making the final time vary may have subtle implications, for example if you optimize, or performing sensibility analysis on cumulated pay offs. It is always better to my opinion to choose simpler methods when possible.
SD is sufficiently complicated by itself!
JJ
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

In practice I agree with JJ - just set a reasonable time and look at that. The difference in the amount of time it takes to simulate is almost always trivial and varying lengths can, as JJ points out mess up sensitivity and optimization.

That said, Richardson and Pugh in their classic Introduction the System Dynamics with Dynamo, do use a variable final time, so you would at least be in good company.
Seb
Junior Member
Posts: 2
Joined: Sat Jan 26, 2008 3:23 pm

Post by Seb »

Ok, thanks a lot for the answers. It helped me a lot.
Post Reply