# [SciPy-dev] Scipy and event handling in differential equations

Nils Wagner nwagner at mecha.uni-stuttgart.de
Mon Jan 30 09:36:23 CST 2006

Robert Kern wrote:
>Nils Wagner wrote:
>
>>Hi all,
>>
>>Has scipy.integrate.odeint a framework for event detection and handling ?
>>
>
>What kind of events? How do you want to handle them?
>
>
I have to handle a change of equation set when a certain variable e is
negative or zero.
Afaik this can be done inside a normal integrator. Many of them allow
you to integrate
until a function changes sign.

When e>0 use

\dot{y}_1 = f(y_1,t)

Switch to

\dot{y}_2 = g(y_2,t)

if e <=0

Note that e is a state variable.

Applications are widespread, e.g. unilateral contact problems (bouncing
ball, ...)

Nils