Page 1 of 1

Why Auxiliary variable could not use itself

Posted: Thu Oct 01, 2015 6:14 pm
by memphis15
this question is related with my previous question about the stock variables could not be assigned a range in Vensim. I haved tried to use Auxiliary type for this, however, it seems Auxiliary variable could not use itself, that is, itself could not be put in the equation.

Re: Why Auxiliary variable could not use itself

Posted: Thu Oct 01, 2015 6:19 pm
by Administrator
No, of course not. How would Vensim calculate the variable if the value needs to be in the equation? It's the same as having "var = var + 12", there is no way of calculating var unless you know what var is.

If you can explain what you are trying to do, we should be able to help.

Re: Why Auxiliary variable could not use itself

Posted: Thu Oct 01, 2015 6:58 pm
by memphis15
sorry, that will be like: A(T)=A(T-1)+something else
i understand Stock may serve this better. however, as you said, there is no way to assign a min/max to stock in vensim

Re: Why Auxiliary variable could not use itself

Posted: Thu Oct 01, 2015 7:18 pm
by Administrator
If you want the value at a previous time step, you will need to use one of the delay functions (DELAY FIXED or DELAY MATERIAL).

Re: Why Auxiliary variable could not use itself

Posted: Fri Oct 02, 2015 1:52 pm
by Monte
I think Aux cannot use itself because it is not an accumulation. It uses information from other variables/parameters, not the material you think it had accumulated but actually it has never done. It doesn't conserve mass, its present value does not depend on its part values. So A(T) = A(T-1) + .... is not a plausible structure, but a very wrong equation.

Re: Why Auxiliary variable could not use itself

Posted: Mon Oct 05, 2015 4:30 pm
by tomfid
An auxiliary using itself implies a(t) = f( a(t) ), which is causally nonsensical. a(t) = f( a(t-delta) ) implies a lag or accumulation, which can be implemented with a DELAY function or more commonly a Level variable.

If a stock (level) is subject to a min or max constraint, as for a bathtub which can't contain <0 water, and overflows at some point, that should be implemented in the logic of the feedback structure. The SINTEG function does implement min and max for levels, but should be avoided if possible, because it creates logic that is not documented on the diagram.