adevs
|
#include <adevs_hybrid.h>
Public Member Functions | |
event_locator (ode_system< X > *sys) | |
virtual bool | find_events (bool *events, const double *qstart, double *qend, ode_solver< X > *solver, double &h)=0 |
virtual | ~event_locator () |
Destructor. | |
Protected Attributes | |
ode_system< X > * | sys |
This is the interface for algorithms that detect state events in the trajectory of an ode_system. The ode_solver provided to this class is used to compute intermediate states during the detection process.
|
inline |
The locator will use the der_func and state_event_func of the supplied ode_system object.
|
pure virtual |
Find the first state event in the interval [0,h] starting from state qstart. The method returns true if an event is found, setting the events flags to true if the corresponding z entry in the state_event_func above triggered the event. The value of h is overwritten with the event time, and the state of the model at that time is copied to qend. The event finding method should select an instant of time when the zero crossing function is zero or has changed sign to trigger an event.
Implemented in adevs::event_locator_impl< X >.