while the issue (http://www.ventanasystems.co.uk/forum/v ... f=2&t=5807) seems to be trivial and we usually are "taught" to never check for exact values I do wonder about Vensim's double precision a bit. I have checked the issue of the OP using Mathematica for three cases with time steps going from 2^(-1) to 2^(-7) :
- Machine Precision using the original model
- Machine Precision using an approximate equality check for outflow
- Higher Precision using the original model
As one can see the rounding issue never enters the picture when higher precision or an approximate equality check is used (e.g. using Chop(x) which will give 0 if the result is approximately zero ). Using the original formulation and Machine Precision the issue will only appear if the TimeStep is set to be less than 0.25.
Unfortunately this is not the case in Vensim DSS (6.3) where the rounding error appears right from the start and will also appear for TimeStep = 0.5 or TimeStep = 0.25. Why is this the case and why does double precision (which I assumed to be Machine Precision) not help in Vensim?
Best regards,
Guido