adevs
Public Member Functions | Protected Attributes | List of all members
adevs::event_locator< X > Class Template Referenceabstract

#include <adevs_hybrid.h>

Inheritance diagram for adevs::event_locator< X >:
adevs::event_locator_impl< X > adevs::bisection_event_locator< X > adevs::linear_event_locator< X >

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
 

Detailed Description

template<typename X>
class adevs::event_locator< X >

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.

Constructor & Destructor Documentation

template<typename X>
adevs::event_locator< X >::event_locator ( ode_system< X > *  sys)
inline

The locator will use the der_func and state_event_func of the supplied ode_system object.

Member Function Documentation

template<typename X>
virtual bool adevs::event_locator< X >::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. 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 >.


The documentation for this class was generated from the following file: