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.
adevs::event_locator::event_locator | ( | ode_system< X > * | sys | ) | [inline] |
The locator will use the der_func and state_event_func of the supplied ode_system object.
virtual bool adevs::event_locator::find_events | ( | bool * | events, |
const double * | qstart, | ||
double * | qend, | ||
ode_solver< X > * | solver, | ||
double & | h | ||
) | [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.
Implemented in adevs::bisection_event_locator, and adevs::linear_event_locator.