next up previous
Next: ProcessBase Up: Class Library Previous: Class Library

Simulation

This class is used to control the step-by-step functioning of a simulation. It is to some extent aware of all the elements included in its simulation, and all components that have to interact must be registered with the same Simulation object. One of the most important hidden functions is to remember which objects actually require to be processed to produce the required output. It is by requesting these objects to update that the simulation is invoked.


The most important methods to the user are operator+= and newEvent. The operator+= method registers a simulation component as a member of this Simulation. All components in a simulation have to be added to the simulation in this way for them to work in cooperation with the other components. The reason for having this association is that two completely seperate simulations can be run be the same program without confusion. If this is not done, not only will the simulation not run, but even trying to connect two component together will fail. The newEvent simply requests that the next event should be processed. This initiates the processing of a single simulation cycle (one tick), and returns the result - OK, end of data, or fail.


next up previous
Next: ProcessBase Up: Class Library Previous: Class Library
M.P.J.Landon 2003-05-15