adevs
Public Member Functions
adevs::Hybrid< X > Class Template Reference

#include <adevs_hybrid.h>

Inheritance diagram for adevs::Hybrid< X >:
adevs::Atomic< X > adevs::Devs< X >

List of all members.

Public Member Functions

 Hybrid (ode_system< X > *sys, ode_solver< X > *solver, event_locator< X > *event_finder)
double getState (int k) const
 Get the value of the kth continuous state variable.
const double * getState () const
 Get the array of state variables.
ode_system< X > * getSystem ()
 Get the system that this solver is operating on.
bool eventHappened () const
 Did a discrete event occur at the last state transition?
void delta_int ()
void delta_ext (double e, const Bag< X > &xb)
void delta_conf (const Bag< X > &xb)
double ta ()
 Do not override.
void output_func (Bag< X > &yb)
 Do not override. Invokes the ode_system output function as needed.
void gc_output (Bag< X > &gb)
 Do not override. Invokes the ode_system gc_output method as needed.
virtual ~Hybrid ()
 Destructor deletes everything.

Detailed Description

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

This Atomic model encapsulates an ode_system and numerical solvers for it. Output from the Hybrid model is produced by the output_func method of the ode_system whenever a state event or time event occurs. Internal, external, and confluent events for the Hybrid model are computed with the corresponding methods of the ode_system. The time advance of the Hybrid class ensures that its internal events coincide with state and time events in the ode_system.


Constructor & Destructor Documentation

template<typename X >
adevs::Hybrid< X >::Hybrid ( ode_system< X > *  sys,
ode_solver< X > *  solver,
event_locator< X > *  event_finder 
) [inline]

Create and initialize a simulator for the system. All objects are adopted by the Hybrid object and are deleted when it is.

References adevs::ode_system< X >::init(), adevs::ode_system< X >::numEvents(), and adevs::ode_system< X >::numVars().


Member Function Documentation

template<typename X >
void adevs::Hybrid< X >::delta_conf ( const Bag< X > &  xb) [inline, virtual]

Do not override. This method invokes the ode_system method for confluent events as needed.

Implements adevs::Atomic< X >.

References adevs::Hybrid< X >::ta().

template<typename X >
void adevs::Hybrid< X >::delta_ext ( double  e,
const Bag< X > &  xb 
) [inline, virtual]

Do not override this method. It performs numerical integration and invokes the ode_system for external events as needed.

Implements adevs::Atomic< X >.

template<typename X >
void adevs::Hybrid< X >::delta_int ( ) [inline, virtual]

Do not override this method. It performs numerical integration and invokes the ode_system method for internal events as needed.

Implements adevs::Atomic< X >.

References adevs::Hybrid< X >::ta().


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