#include <adevs_dess.h>
Public Member Functions | |
DESS () | |
Constructor. Time is assumed to start at 0.0. | |
virtual void | evolve_func (double h)=0 |
virtual double | next_event_func (bool &is_event)=0 |
virtual void | discrete_action_func (const Bag< X > &xb)=0 |
virtual void | discrete_output_func (Bag< X > &yb)=0 |
virtual void | state_changed ()=0 |
void | delta_int () |
The internal transition function should not be overridden. | |
void | delta_ext (double e, const Bag< X > &xb) |
The external transition function should not be overridden. | |
void | delta_conf (const Bag< X > &xb) |
The confluent transition function should not be overridden. | |
void | output_func (Bag< X > &yb) |
The output function should not be overridden. | |
double | ta () |
The time advance function should not be overridden. | |
virtual | ~DESS () |
Destructor. |
This class has been deprecated and will be deleted in a later release. Use the Hybrid class instead.
This is the base class for building ODE and DAE solvers that can be used inside of a discrete event simulation. A description of the integration technique can be found in ????. The template argument specifies the model input and output type. The DEVS state transition functions and output function should not be overridden by derived classes. The DEVS dynamic structure and output garbage collection functions can be used by derived classes.
virtual void adevs::DESS< X >::discrete_action_func | ( | const Bag< X > & | xb | ) | [pure virtual] |
This is the discrete action function. The input bag contains the discrete events that are available at this time (if any).
Implemented in adevs::rk4< X >, adevs::rk45< X >, and adevs::rk45_improved< X >.
Referenced by adevs::DESS< X >::delta_conf(), adevs::DESS< X >::delta_ext(), and adevs::DESS< X >::delta_int().
virtual void adevs::DESS< X >::discrete_output_func | ( | Bag< X > & | yb | ) | [pure virtual] |
This is the output function. The output function is evaluated when the next_event_func() elapses. The bag should be filled with output events.
Implemented in adevs::rk4< X >, adevs::rk45< X >, and adevs::rk45_improved< X >.
Referenced by adevs::DESS< X >::delta_conf(), and adevs::DESS< X >::delta_int().
virtual void adevs::DESS< X >::evolve_func | ( | double | h | ) | [pure virtual] |
This virtual function is the continuous evolution function. Its purpose is to advance the continuous state variables for h units of time. A derived class should implement its integration scheme in this function.
Implemented in adevs::rk4< X >, adevs::rk45< X >, and adevs::rk45_improved< X >.
Referenced by adevs::DESS< X >::delta_conf(), adevs::DESS< X >::delta_ext(), and adevs::DESS< X >::delta_int().
virtual double adevs::DESS< X >::next_event_func | ( | bool & | is_event | ) | [pure virtual] |
This function should return the time until the next state or time event in the continuous system. This method can also return the time until the next integration step, in which case the variable is_event should be set to false. If the is_event flag is true, then next state change will be treated as an internal event of the DEVS model.
Implemented in adevs::rk4< X >, adevs::rk45< X >, and adevs::rk45_improved< X >.
Referenced by adevs::DESS< X >::delta_ext(), and adevs::DESS< X >::delta_int().
virtual void adevs::DESS< X >::state_changed | ( | ) | [pure virtual] |
This method is executed initially (i.e., at simulation start or just following creation if added dynamically), after every evaluation of the evolution function, and after every evaluation of the discrete_action_func method. This method is intended to facilitate writing the continuous system trajectory to an output file. The overridden method should call some integrator specific method that the user can implement for that purpose.
Implemented in adevs::rk4< X >, adevs::rk45< X >, and adevs::rk45_improved< X >.
Referenced by adevs::DESS< X >::delta_conf(), adevs::DESS< X >::delta_ext(), and adevs::DESS< X >::delta_int().