basic vensim computation issue
Posted: Tue Nov 11, 2014 11:00 pm
Hello all,
In searching I saw some topics that touched on this question, but haven't seen anyone address what I would consider to be the more basic issue: why is it possible, when the inflow to a stock is a (constant) rational number that is a fraction of 1, that the stock value can sometimes never equal 1?
For example-
inflow = 1/100
stock = inflow - outflow
outflow = IF THEN ELSE(stock = 1, stock, 0)
The outflow returns a value of 0 forever. It never pulls the value of "stock". To correct this issue I usually "cheat" and modify the outflow equation to read IF THEN ELSE(stock +.001 >= 1, stock, 0). I can understand why I may have to do this if the inflow were an irrational number... but it seems to me that cumulating 0.01 for 100 timesteps should result in a solid 1.00000000000000 ad inf.
Apologies if this has been discussed elsewhere, I may not have searched on the correct keyword. I am using DSS v6.1c if that info is relevant. Thank you -Buzz
In searching I saw some topics that touched on this question, but haven't seen anyone address what I would consider to be the more basic issue: why is it possible, when the inflow to a stock is a (constant) rational number that is a fraction of 1, that the stock value can sometimes never equal 1?
For example-
inflow = 1/100
stock = inflow - outflow
outflow = IF THEN ELSE(stock = 1, stock, 0)
The outflow returns a value of 0 forever. It never pulls the value of "stock". To correct this issue I usually "cheat" and modify the outflow equation to read IF THEN ELSE(stock +.001 >= 1, stock, 0). I can understand why I may have to do this if the inflow were an irrational number... but it seems to me that cumulating 0.01 for 100 timesteps should result in a solid 1.00000000000000 ad inf.
Apologies if this has been discussed elsewhere, I may not have searched on the correct keyword. I am using DSS v6.1c if that info is relevant. Thank you -Buzz