AnyLogic-Fibonacci序列中的系统动力学 [英] Systems Dynamics in AnyLogic - Fibonacci sequence

查看:366
本文介绍了AnyLogic-Fibonacci序列中的系统动力学的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在AnyLogic中有一个系统动力学模型,在该模型中我试图对斐波那契数列进行建模.但是,由于某些原因,我的结果与预期的结果有所不同:

I have a systems dynamics model in AnyLogic in which I'm trying to model the Fibonacci sequence. Yet, for some reason, my results differ from the expected ones:

代替

1,1,2,3,5,8,13 ...

1,1,2,3,5,8,13...

我知道

1,2.137954153,4.021788196,7.471205823,13.86070806 ...

1, 2.137954153, 4.021788196, 7.471205823, 13.86070806...

我遵循了这些(西班牙语)说明来构建我的简单模型.

I followed these (spanish) instructions to build my simple model.

我想这并不是所有软件都通用的,因为在VenSim中,这个示例似乎可以完美地工作...

I suppose this is not common to all software because in VenSim this example seems to work perfectly...

有人可以向我解释为什么这会在我的AnyLogic程序中发生吗?

Can somebody explain to me why this happens in my AnyLogic program?

推荐答案

发生这种情况的原因是由于每种软件中微分方程的处理方式.

The reason why this happens is because of the way differential equations are handled in each Software.

在vensim中获得斐波那契数列的原因是因为您在时间步骤1中使用了Euler方法(请检查模型设置)

The reason you are getting the fibonacci sequence in vensim is because you are using Euler method with time step 1 (check in model settings)

如果您在Vensim中将集成类型更改为RK45,或者使用euler方法减少了时间步长,则可能会获得与AnyLogic相同的结果... Runge-Kutta方法,即使它以固定步长开始. 1,它随后根据模型动力学的要求更改时间步长.

If you change the integration type to RK45 in Vensim or if you reduce the time step using euler's method, you will probably get the same results as AnyLogic gets... Runge-Kutta method even though it starts with the fixed step of 1, it later changes the time step depending on the requirements of the dynamics of the model.

现在,让我们了解一下,在任何实际应用中使用1的时间步都是荒谬的……但这就是为什么您在vensim中获得了精确值……因为这些精确值对于模型的真正含义真的非常不准确. .我什至会说您链接上的模型是一个不好的模型,永远不要向公众展示.

Now, let's understand that using a time-step of 1 is ridiculous in any practical application... But THAT'S WHy you get exact values in vensim... because those exact values are really extremely inaccurate for what the model really is. I would even say that the model on your link is a bad model and shouldn't be ever shown to the public.

幸运的是,AnyLogic不允许您这样做.您可以在模型属性中将时间步长设置为1,但是它将立即发现不准确之处,并将时间步长更改为更小的值(可能为0.01)...因为它仅允许在混合方程式中使用Euler + Newton选择,但不是欧拉一个人.

Fortunately, AnyLogic doesn't allow you to do that. You can set up a time step of 1 in the model properties, but it will discover the inaccuracies immediately and change the time step to something much smaller (maybe 0.01)... Since it only allows to use Euler+Newton in the mixed equations option, but not Euler alone.

这篇关于AnyLogic-Fibonacci序列中的系统动力学的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆