class xdevssim

This simulator class is meant to be used as a component within another simulation environment (for example, HLA or DIS).

Public Methods

[more] xdevssim(devs* model)
Construct a simulator for the supplied model.
[more]virtual void initialize(ADEVS_TIME_TYPE t0 = ADEVS_ZERO, ADEVS_TIME_TYPE t_granule = ADEVS_EPSILON)
Initialize the simulator prior to simulation start.
[more]virtual void finalize()
Finalize the simulator at the end of a run.
[more]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.
[more]void inject(const adevs_bag<PortValue>& x)
Same as inject, but injects an entire bag of events.
[more]ADEVS_TIME_TYPE nextTN() const
Get the time of next event (tL + ta())
[more]const adevs_bag<PortValue> & computeInputOutput()
Compute the top-level model output at time nextTN().
[more]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
[more]const devs* getModel() const
Get the model attached to this simulator
[more]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.
o xdevssim(devs* model)
Construct a simulator for the supplied model.

ovirtual 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.

ovirtual void finalize()
Finalize the simulator at the end of a run. The simulation engine will call no other methods after finalize has been called.

ovoid 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().

ovoid 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().

oADEVS_TIME_TYPE nextTN() const
Get the time of next event (tL + ta())

oconst adevs_bag<PortValue> & computeInputOutput()
Compute the top-level model output at time nextTN().

ovoid 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

oconst devs* getModel() const
Get the model attached to this simulator

ovirtual ~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++.