Is there a way to access a value of a variable in the previous steptime?

Hello!
I’m trying to access the value of a variable in the previous step time to use it afterward, I’m using discrete_events() for that, but is there a simple way to do it?

It sounds like you might be solving a Delay Differential Equation:

https://docs.sciml.ai/DiffEqDocs/stable/tutorials/dde_example/

Hopefully something there is helpful.

1 Like