- All Superinterfaces:
- MultiVarFunction
public interface StateEvent
extends MultiVarFunction
StateEvent defines an event consisting in that a given numeric value
changes sign from positive to negative. This numeric value usually
consists in an expression of the variables of an ODE.
Every valid model state must (in principle) provide a value f(t)>=+tolerance
at every instant of time, where tolerance is a (small positive) number
prescribed by the user.
However, values in the range (-tolerance,+tolerance) are still accepted.
The event really happens when the value at the next instant of time
satisfies f(t+dt)<=-tolerance.
Then, finding the moment when the event takes place corresponds to finding
a root of f(t). More precisely, and because of numerical approximation,
a root is considered to be found when -tolerance=+tolerance) or, if this is not true, at least
the state at the next instant t+dt will not trigger an event
(i.e. f(t+dt)>-tolerance). (If this rule is violated an infinite loop may be
caused.)
- Author:
- Francisco Esquembre (Feb 2004, corrected May 2005)