Page 1 of 1

Cumulative flow does not match stock

Posted: Tue Mar 26, 2024 12:56 pm
by MKeeken
Dear,

I am modelling investments, but I encounter a problem.
The flow has the same value for every time step. However, the stock does not accumulate correctly... Only with timestep 1 does the stock have the same value as the cumulative flow. The stock does not accumulate correctly with smaller timesteps. It seems like some flow is fading away into mystery and not reaching the stock at all. Please see the attached screenshot of the behaviour in graphs of the stock and flow.

The equation for the stock (name stock: Cumulative investment primary) = incoming investment primary (flow). The initial value for the stock = incoming investment primary (flow).
The equation for the flow (name flow: incoming investment primary) = Investment primary aluminium (variable). This is a variable with some calculations.

How can I fix the model so that the stock has the same value as the cumulative flow with smaller timesteps (1/4 or 1/8)?

Looking forward to receiving the solution. If necessary, I can share some of the investment parts of the model.

Kind regards,
MKeeken

Screenshot 2024-03-26 134859.jpg
Screenshot 2024-03-26 134859.jpg (121.89 KiB) Viewed 2833 times

Re: Cumulative flow does not match stock

Posted: Tue Mar 26, 2024 1:06 pm
by Administrator
1. Does your model pass the units test?

2. Have you selected an appropriate time step? https://www.vensim.com/documentation/ref_time_step.html

It's impossible to comment further without the model.

Re: Cumulative flow does not match stock

Posted: Tue Mar 26, 2024 1:28 pm
by MKeeken
Thank you for the fast reply!

The used timestep is smaller than the smallest time used. I worry mainly about passing the validation tests with changing values if the timestep is reduced.

Is it possible to share the model privately?