DDE using boost odeint

孤者浪人 提交于 2020-02-28 08:30:52

问题


Is it possible to solve a time delay differential equations using C++ Boost - odeint library ? For an instance below equation:

x'(t) = r*x(t)*(1 - x(t-tau)), 

where tau is a constant value for time delay.


回答1:


Yes, you can. But odeint is not explicitly designed for DDEs. There are two possibilities to solve DDEs with odeint:

  1. You consider x and its discretized history as dependend variables and use directly the steppers.
  2. You consider only x as dependent variable and pass the history with the system function (your r.h.s.). But in this case you should only use steppers which evaluate the state at multiplies of you timesteps, like Euler or RK2.

If I have time I will write a more concrete answer, maybe with some code snippets.



来源:https://stackoverflow.com/questions/21572694/dde-using-boost-odeint

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!