AnyLogic - System Dynamics : how to track stock values correctly?

373 views Asked by At

screenshot of my model

In the basic first order positive feedback model:

(one stock, one flow to it and a parameter gives the flow rate).

There is a stock with initial value of 100, a parameter with the value of 0.1 and the formula of the flow is:

(flow = stock * paremeter)

Model time units are "years" and we want to run the simulation for 100 years.

The value of the stock over the years will be 100, 110, 121, 133.1, 146.41 ...

But the values of the stock over time on the simulation screen (or when I put it into a Time Plot or Data set) are 110.517, 122.139, 134.984, 149.179.


  • Why are the values of the stock over time are different than the expected ones above?

  • How can I track the value of the stock over years correctly?

1

There are 1 answers

1
Felipe On BEST ANSWER

This question is the typical misconception of system dynamics. System Dynamics follow differential equations, and generally uses Euler's method to calculate the new value of Stock after each differential time step. You have the misconception that the value is updated 1 time per year, but it's not. It's updated 1 time every 0.001 time units (approximately with the default value).

I give a more extensive answer to that question here: Systems Dynamics in AnyLogic - Fibonacci sequence