This simulator class is meant to be used as a component
within another simulation environment (for example, HLA or DIS).
Public Methods
-
xdevssim(devs* model)
-
Construct a simulator for the supplied model.
-
virtual void initialize(ADEVS_TIME_TYPE t0 = ADEVS_ZERO, ADEVS_TIME_TYPE t_granule = ADEVS_EPSILON)
-
Initialize the simulator prior to simulation start.
-
virtual void finalize()
-
Finalize the simulator at the end of a run.
-
void inject(const PortValue& x)
-
Inject an input to be applied at then next deltFunc(t) call
The input is either a single PortValue pair or a bag of PortValue
pairs.
-
void inject(const adevs_bag<PortValue>& x)
-
Same as inject, but injects an entire bag of events.
-
ADEVS_TIME_TYPE nextTN() const
- Get the time of next event (tL + ta())
-
const adevs_bag<PortValue> & computeInputOutput()
-
Compute the top-level model output at time nextTN().
-
void deltFunc(ADEVS_TIME_TYPE t)
-
Advance the simulation clock and compute the model state at time t <= nextTN()
If t > nextTN(), then the simulator will throw an adevs_exception
-
const devs* getModel() const
- Get the model attached to this simulator
-
virtual ~xdevssim()
- Destructor.
Documentation
This simulator class is meant to be used as a component
within another simulation environment (for example, HLA or DIS).
It implements a reduced version of the coreSimulatorInterface
from the scalable DEVS interface. The simplification
made here involves removing timestamps from all calls
except deltFunc(t). It is assumed that injected inputs
and I/O computations occur at the next deltFunc() and
nextTN() respectively.
xdevssim(devs* model)
-
Construct a simulator for the supplied model.
virtual void initialize(ADEVS_TIME_TYPE t0 = ADEVS_ZERO, ADEVS_TIME_TYPE t_granule = ADEVS_EPSILON)
-
Initialize the simulator prior to simulation start. This will
cause the init() method of every component model to be executed.
The value t0 is the initial simulation time. The time granule
is the difference between event time stamps that is treated as
being effectively equal to zero.
virtual void finalize()
-
Finalize the simulator at the end of a run. The simulation engine
will call no other methods after finalize has been called.
void inject(const PortValue& x)
-
Inject an input to be applied at then next deltFunc(t) call
The input is either a single PortValue pair or a bag of PortValue
pairs. The input value is owned by the caller and can be freed after
the next call to deltFunc().
void inject(const adevs_bag<PortValue>& x)
-
Same as inject, but injects an entire bag of events. The event values
are owned by the caller and can be freed after the next call to
deltFunc().
ADEVS_TIME_TYPE nextTN() const
- Get the time of next event (tL + ta())
const adevs_bag<PortValue> & computeInputOutput()
-
Compute the top-level model output at time nextTN().
void deltFunc(ADEVS_TIME_TYPE t)
-
Advance the simulation clock and compute the model state at time t <= nextTN()
If t > nextTN(), then the simulator will throw an adevs_exception
const devs* getModel() const
- Get the model attached to this simulator
virtual ~xdevssim()
- Destructor. Does not destroy the model.
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.