Search code examples
anylogicdifferential-equationssystemdynamics

How the calculation works on anylogic?


i’m currently working on project using anylogic. I’m making a system dynamic to modelling a SIR model. and I make a manual calculation of each stock in excel (using euler method) , but the results in excel are different from the result in anylogic. I’m curious about how anylogic calculate the model that I build on it. anyone know how the calculation works on anylogic?


Solution

  • if your SD model is mixed with discrete-events or agent-based, the time step that you set up in the configuration for your model is not considered anymore and a different time step is used for which you have no access, unless you run the simulation in virtual mode (at least it's more likely to behave as you expect that way)

    I have extensively tested this, and as long as your model is 100% system dynamics, your euler equations should work as expected, in which case the reason is that your excel is incorrect.

    On the other hand if you use RK4 approximation in anylogic, it doesn't really work properly, so I don't even know why they still have it as an option.

    I suggest you Vensim and make some tests to see the difference in results and be sure you are calculating correctly in Excel..

    In my course i talk in detail about this topic: noorjax.teachable.com