This Simulator class implements the DEVS simulation algorithm.
Public Methods
-
Simulator(Devs<X>* model)
- Create a simulator for the provided model.
-
void addEventListener(EventListener<X>* l)
- Add an event listener that will be notified of output events produced by the model
-
void removeEventListener(EventListener<X>* l)
- Remove an event listener
-
double nextEventTime()
- Get the model's next event time
-
void execNextEvent()
- Execute the simulation cycle at time nextEventTime()
-
void computeNextOutput()
- Compute the output values of the imminent models.
-
void computeNextState(Bag<Event<X> >& input, double t)
- Apply the specified inputs at time t and then compute the next model states.
-
~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).
Simulator(Devs<X>* model)
-
Create a simulator for the provided model. The simulator
constructor will fail and throw an adevs::exception if the
time advance of any component atomic model is less than zero.
void addEventListener(EventListener<X>* l)
-
Add an event listener that will be notified of output events
produced by the model
void removeEventListener(EventListener<X>* l)
- Remove an event listener
double nextEventTime()
- Get the model's next event time
void execNextEvent()
- Execute the simulation cycle at time nextEventTime()
void 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.
void 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.
~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.
bool 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++.