template<class X> class adevs::Simulator

This Simulator class implements the DEVS simulation algorithm.

Public Methods

[more] Simulator(Devs<X>* model)
Create a simulator for the provided model
[more]void addEventListener(EventListener<X>* l)
Add an event listener that will be notified of output events produced by the model
[more]void removeEventListener(EventListener<X>* l)
Remove an event listener
[more]double nextEventTime()
Get the model's next event time
[more]void execNextEvent()
Execute the simulation cycle at time nextEventTime()
[more]void computeNextOutput()
Compute the output values of the imminent models.
[more]void computeNextState(Bag<Event<X> >& input, double t)
Apply the specified inputs at time t and then compute the next model states.
[more] ~Simulator()
Deletes the simulator, but leaves the model intact.


Documentation

This Simulator class implements the DEVS simulation algorithm. Its methods can throw adevs::exception objects if any of the DEVS model constraints are violated (i.e., a negative time advance of a model attempting to set an input directly to itself).
o Simulator(Devs<X>* model)
Create a simulator for the provided model

ovoid addEventListener(EventListener<X>* l)
Add an event listener that will be notified of output events produced by the model

ovoid removeEventListener(EventListener<X>* l)
Remove an event listener

odouble nextEventTime()
Get the model's next event time

ovoid execNextEvent()
Execute the simulation cycle at time nextEventTime()

ovoid computeNextOutput()
Compute the output values of the imminent models. This will notify the EventListener objects as the outputs are found. This, in effect, implements the output function of the resultant model.

ovoid computeNextState(Bag<Event<X> >& input, double t)
Apply the specified inputs at time t and then compute the next model states. Requires that lastEventTime() <= t <= nextEventTime(). This, in effect, implements the state transition function of the resultant model.

o ~Simulator()
Deletes the simulator, but leaves the model intact. The model must exist when the simulator is deleted. Delete the model only after the Simulator is deleted.

obool operator()(const Network<X>* m1, const Network<X>* m2) const


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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