next up previous
Next: Process update frequency Up: Additional esoteric features Previous: Additional esoteric features

More on runtime simulation control

The actual process by which a simulation step occurs is that one or more output ports are identified as having an interest in updating their value. In order to do this, the port requests its owner (the ProcessElement that contains it) to process. This it does by first asking its inputs to update, then performing its calculation. This request for updating clearly has to ripple upstream until it all inputs relevant to the required outputs are updated. Note that anything not needed to produce the required output will not be processed (and can get out of step if needed at a later time). The situation is illustrated in figure 6.1.

\begin{figure}
\begin{center}
\epsfig{file=../../figs/SimRuntimeStruct.eps,
...
... those in grey are
not updated as not needed for the output shown.}\end{figure}


How does the simulation know which outputs are required? By default, the assumption is that all ProcessWriters that are attached to a file are required to be processed. The user can however tune this behaviour by setting other ProcessBase derived objects to be required, or even switch of outputs that aren't needed. This is done by the Simulation methods registerUpdateInterest and removeUpdateInterest. Care is needed to make sure that if an update interest is registered, then it is also removed before the Simulation object is deleted.


next up previous
Next: Process update frequency Up: Additional esoteric features Previous: Additional esoteric features
M.P.J.Landon 2003-05-15