adevs
|
#include <adevs_hybrid.h>
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) |
T | 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. | |
![]() | |
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. | |
![]() | |
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 | |
![]() | |
T | getLastEventTime () const |
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.
|
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().
|
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().
|
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().
|
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().