neurophysik / jitcdde

Just-in-time compilation for delay differential equations
Other
57 stars 14 forks source link

Solving delay differential equation with variable delay using Jitcdde #48

Closed alvarojh123 closed 1 year ago

alvarojh123 commented 2 years ago

HI, I saw many tutorials to learn how to use Jitcdde, but many of them use constant delays. I want to know if is possible to solve variable delay using Jitcdde. Something like this

$$ dy/ dt = y(t) \times ( G(t + \tau) - G(t)) $$

$$ d\tau/ dt = F(t) / F(t + d\tau) $$

Where G and F are functions. For exemplification both could be a $sin$

Please @Wrzlprmft could you give an example of how to implement this type of delay equations using JITCDDE.

Wrzlprmft commented 2 years ago

Brief answer: Yes, this is possible and the implementation is mostly straightforward. You just write something like G(t+y(1)), where y(1) is the dynamical variable representing τ. Here is a brief documentation and also a link to an example.

Note that I am not exactly sure what represents in your equations, so I cannot comment on that.