class xdevssim

This simulator class is meant to be used as a component within another simulation environment (eg.


Public Methods

[more] xdevssim(devs* model)
[more]virtual void initialize(TIME_TYPE t0 = ZERO)
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.
[more]void inject(const adevs_bag<PortValue>& x)
[more]double nextTN() const
Get the time of next event (tL + ta())
[more]const adevs_bag<PortValue> & computeInputOutput()
Compute output at time nextTN().
[more]void deltFunc(double t)
Advance the simulation clock and compute state at time t
[more]const devs* getModel() const
Get the model attached to this simulator
[more]devs* attachModel(devs* model)
Attach a model to this simulator.
[more]virtual ~xdevssim()
Destructor


Documentation

This simulator class is meant to be used as a component within another simulation environment (eg. the HLA). 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 assumes that injected inputs and I/O computations occur at the next deltFunc() and nextTN() respectively.

o xdevssim(devs* model)

ovirtual void initialize(TIME_TYPE t0 = ZERO)
Initialize the simulator prior to simulation start. The value t0 is the initial simulation time.

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.

ovoid inject(const adevs_bag<PortValue>& x)

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

oconst adevs_bag<PortValue> & computeInputOutput()
Compute output at time nextTN().

ovoid deltFunc(double t)
Advance the simulation clock and compute state at time t

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

odevs* attachModel(devs* model)
Attach a model to this simulator. The new model type must match the original model type. The old model is returned to the caller. The simulator is assumed to be properly initialized and ready to go. This method is meant to support optimistic computing, in which an invalid model may need to be replaced with a valid checkpoint.

ovirtual ~xdevssim()
Destructor


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.