adevs
Public Member Functions
adevs::Hybrid Class Reference

#include <adevs_hybrid.h>

Inheritance diagram for adevs::Hybrid:
adevs::Atomic< X, T >

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 (T e, const Bag< X > &xb)
void delta_conf (const Bag< X > &xb)
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

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

adevs::Hybrid::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::numVars(), adevs::ode_system::numEvents(), and adevs::ode_system::init().


Member Function Documentation

void adevs::Hybrid::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, T >.

References adevs::ode_system::confluent_event(), adevs::ode_system::external_event(), ta(), and adevs::ode_system::numVars().

void adevs::Hybrid::delta_ext ( 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, T >.

References adevs::ode_solver::advance(), adevs::ode_system::postStep(), adevs::ode_system::external_event(), and adevs::ode_system::numVars().

void adevs::Hybrid::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, T >.

References ta(), adevs::ode_system::internal_event(), and adevs::ode_system::numVars().


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