Arets Paeglis
Arets Paeglis

Reputation: 4006

Running an ODEProblem until given a signal

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.

Upvotes: 1

Views: 67

Answers (1)

Chris Rackauckas
Chris Rackauckas

Reputation: 19152

Yes, you can use tspan = (0.0, Inf). Of course, if you do this, you'll want to make sure you setup a terminating event like in this example so that it doesn't run forever, or you can use the integrator interface to control the steps and stop whenever you want.

Upvotes: 3

Related Questions