Hi,
I noticed, while I was working on a Vensim Model, that levels (even when changing the integrators) calculate and shows the stock variation in a specific day n up till the day n-1.
Let me explain, if a rate pointing towards a level with a certain value x in a specific day n, this value will appear in the level the next day (n+1).
Now I need to change this a little bit. I need the changes (in production for my own model) to appear and be considered in the calculation for the same day.
I have been stuck with this detail fore some time. Can you suggest a solution?
Thank you in advance
Working with Levels in Vensim
-
- Newbie
- Posts: 1
- Joined: Wed Aug 21, 2019 1:43 pm
- Vensim version: DSS
Re: Working with Levels in Vensim
Levels can't literally reflect flows instantaneously - that would be a violation of causality. However, if your model is essentially running in discrete time, and you want end-of-period levels instead of start-of-period, you can use the Diff integration method (instead of Euler) to shift the reporting of results.
Another option is to use a sufficiently small time step (not 1). https://metasd.com/2017/11/discrete-time-stinks/
Another option is to use a sufficiently small time step (not 1). https://metasd.com/2017/11/discrete-time-stinks/
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Working with Levels in Vensim
Another possibility is to create a reporting variable that reflects the stock+current flow.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/