last time period

Use this forum to post Vensim related questions.
Post Reply
KCL
Junior Member
Posts: 5
Joined: Fri Jul 07, 2006 3:25 pm

last time period

Post by KCL »

one more question...

Suppose I have variables W, X, Y, and Z. W=X-Y for all periods except for the very last period where I want W=X-Z. In the Equation of Variable W, I currently have

if then else (time =100, X-Z, X-Y)

100 is the last time period of the simulation. Is there a way to dynamically indicate the last time period? (Rather than hard coding it as I have done).

Thanks, Ken
Administrator
Super Administrator
Posts: 4609
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

if then else ( time = FINAL TIME

That should do the trick.

Tony.
KCL
Junior Member
Posts: 5
Joined: Fri Jul 07, 2006 3:25 pm

Post by KCL »

Thank you. It's perfect.
Post Reply