Page 1 of 1

last time period

Posted: Wed Jul 12, 2006 5:19 pm
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

Posted: Wed Jul 12, 2006 5:24 pm
by Administrator
if then else ( time = FINAL TIME

That should do the trick.

Tony.

Posted: Thu Jul 13, 2006 3:47 pm
by KCL
Thank you. It's perfect.