| Trees | Indices | Help |
|
|---|
|
|
A (quasi) real-time simulation object.
This subclass of Simulation attempts to maintain a correspondence between simulation time and real time, as defined by the timescale parameter. Real time simulation instances still maintain a nominal, discrete simulation time that determines the order of event delivery.
At the beginning of each simulation time epoch, the simulation marks the actual wall clock time. After event delivery for that epoch has ended, the simulation calculates the amount of computation time used for event processing, and executes a real sleep for the remainder of the epoch. If the computation time for the epoch exceeded the real time, a warning is issued and processing proceeds immediately to the next simulation time epoch.
RUN HOOKS
The simulation includes as parameters two lists of functions/callables, run_start_hooks and run_stop_hooks, that will be called immediately before and after event processing during a call to .run(). This allows, for example, starting and stopping of real-time devices that might use resources while the simulation is not running.
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
timescale = param.Number(default= 1.0, bounds= (0, None), doc=
|
|||
run_start_hooks = param.HookList(default= [], doc=
|
|||
run_stop_hooks = param.HookList(default= [], doc=
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
|
Process simulation events for the specified duration or until the specified time. Arguments:
If both duration and until are used, the one that is reached first will apply. Note that duration and until should be specified in a format suitable for conversion (coercion?) into the Simulation's _time_type.
|
|
|
|||
timescale
|
run_start_hooks
|
run_stop_hooks
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Aug 5 14:59:38 2010 | http://epydoc.sourceforge.net |