Page 1 of 1

How to set extremely low stock to be exactly zero and ensure reasonable co-flow results?

Posted: Sun Dec 03, 2017 2:27 pm
by WayneZhou2009
Hi,

Sometimes a stock reaches extremely low level. For example, it remains positive but is as low as something like 3e-12. This might not be a critical issue when only the stock is of interest. However, when a coflow is involved in the model and the stock level is used as the denominator in the calculation of average attribute, then some extremely high and obviously unreasonably value is returned.

Average attribute = Total attribute / Stock

How could this issue be solved properly? If such low level of stock is set to be zero using IF THEN ELSE and then the average attribute is calculated using ZIDZ, then this may lead to some results that mistakenly make the average attribute become zero. This is because sometimes both the total attribute and the underlying stock are low (but not extremely low) but their ratio still gives the correct result of average attribute. For example, total attribute (0.3) and stock (0.03) gives the correct average attribute (10). But over time, the total attribute becomes 3e-5 and the stock unproportionately becomes something like 5e-9, then the resultant average attribute apparently does not make sense.

Is there a good way to solve such problem? Thank you so much.

Re: How to set extremely low stock to be exactly zero and ensure reasonable co-flow results?

Posted: Wed Dec 06, 2017 3:15 am
by tomfid
I'm not sure there's a good general solution that's problem-independent, other than switching to double precision Vensim DSS.

What's your use case for this?