
CAP 4800/5805 Computer Simulation Concepts
Lecture 9
Serial Model Execution
• Two primary approaches to executing a system model on a sequential: time slicing,
event scheduling
• The key attribute of time slicing over the event scheduling method is in the way that
time is incremented: through addition
Time Slicing
• Time slicing involves incrementing time using a global clock by adding a certain
amount to the clock value over time
• A virtual clock is updated in intervals of some arbitrary size which can change
throughout the simulation
• The system is normally defined as a group of functions each of which must be
evaluated at the end of each interval.
• The time-slicing method can be inefficient in circumstances where the values of inputs
and outputs do not change regularly.
• The time-slicing method is appropriate for continuous system with continually varying
inputs, state values, and the outputs.
• Algorithm for time-slice execution
Begin Main
Initialize state variables
Loop through all functions
While not end of simulation
UpdateFunctions
End while
End Main
Procedure UpdateFuncations
For all functions
Switch on function type
Case type 1: apply function type 1 to state and inputs