adevs
Public Member Functions | List of all members
adevs::Hybrid< X, T > Class Template Reference

#include <adevs_hybrid.h>

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

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.
 
- Public Member Functions inherited from adevs::Atomic< X, T >
 Atomic ()
 The constructor should place the model into its initial state.
 
virtual void beginLookahead ()
 
virtual void endLookahead ()
 
virtual ~Atomic ()
 Destructor.
 
Atomic< X, T > * typeIsAtomic ()
 Returns a pointer to this model.
 
- Public Member Functions inherited from adevs::Devs< X, T >
 Devs ()
 Default constructor.
 
virtual ~Devs ()
 Destructor.
 
virtual Network< X, T > * typeIsNetwork ()
 
const Network< X, T > * getParent () const
 
Network< X, T > * getParent ()
 
void setParent (Network< X, T > *parent)
 
virtual bool model_transition ()
 
virtual T lookahead ()
 
void setProc (int proc)
 
int getProc ()
 

Additional Inherited Members

- Protected Member Functions inherited from adevs::Atomic< X, T >
getLastEventTime () const
 

Detailed Description

template<typename X, class T = double>
class adevs::Hybrid< X, T >

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 , class T = double>
adevs::Hybrid< X, T >::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 , class T = double>
void adevs::Hybrid< X, T >::delta_conf ( const Bag< X > &  xb)
inlinevirtual

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

Implements adevs::Atomic< X, T >.

References adevs::Bag< T >::clear(), adevs::Bag< T >::empty(), and adevs::Hybrid< X, T >::ta().

template<typename X , class T = double>
void adevs::Hybrid< X, T >::delta_ext ( e,
const Bag< X > &  xb 
)
inlinevirtual

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::Hybrid< X, T >::output_func().

template<typename X , class T = double>
void adevs::Hybrid< X, T >::delta_int ( )
inlinevirtual

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 adevs::Bag< T >::clear(), adevs::Bag< T >::empty(), and adevs::Hybrid< X, T >::ta().


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