Running an ODEProblem until given a signal

question
diffeq

#1

Is it possible for the timespan of an ODEProblem to be open-ended, i.e. for the problem to run until given an external signal (possibly via a discrete callback with an appropriate condition)? Intuitively, this would mean giving something like tspan = (0.0, Inf), although I’m not sure if that is allowed and can’t seem to find anything in the documentation. TIA.

Cross-posted in https://stackoverflow.com/questions/48675180/running-an-odeproblem-until-given-a-signal


#2

Yes, Inf is allowed. I’m surprised I didn’t use Inf in the terminating example in the docs, but you can definitely use it as long as you set a terminating event or manually step via the integrator interface.


#3

Thanks for the quick answer. So far, using DifferentialEquations.jl is by far easier and more pleasant than my old hand-written codes, and features like this, together with how generally easy it is with it to port maths into working code, are turning it into by far my favourite [meta-]package.