Working with Levels in Vensim

Use this forum to post Vensim related questions.
Post Reply
Omar ZOUHIR
Newbie
Posts: 1
Joined: Wed Aug 21, 2019 1:43 pm
Vensim version: DSS

Working with Levels in Vensim

Post by Omar ZOUHIR »

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 :)
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Working with Levels in Vensim

Post by tomfid »

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/
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Working with Levels in Vensim

Post by tomfid »

Another possibility is to create a reporting variable that reflects the stock+current flow.
Post Reply