Page 1 of 1

Accessing value of a variable at a previous time

Posted: Fri Apr 27, 2018 2:14 am
by danraymond53
I am developing a simple tank model.

I am calculating the tank volume based on inflows and outflows. In my case I need to use the tank volume at Time-1 in an equation.

How do I do that?

Re: Accessing value of a variable at a previous time

Posted: Fri Apr 27, 2018 5:24 am
by danraymond53
Solved it thanks

Re: Accessing value of a variable at a previous time

Posted: Fri Apr 27, 2018 11:50 am
by tomfid
DELAY FIXED is one option. SMOOTH or a simple stock works if your TIME STEP is 1 (which I wouldn't always recommend - http://metasd.com/2017/11/discrete-time-stinks/).