Skip to main content
Engineering LibreTexts

5.3: Time Advance and Event Lists

  • Page ID
    30977
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    This section discusses how the simulation proceeds through time by scheduling event occurrences and processing each of them in turn. In general, a model is simulated as a time ordered sequence of the occurrences of the events. Event occurrences are processed one at a time. Each event occurrence changes the value of one or more state variables and may schedule other events. This simulation approach is illustrated by one possible simulation of the two workstations in sequence model.

    The event list is the time ordered list of all event occurrences scheduled at the current time and in the future. The simulation proceeds by removing the first event occurrence on the list and processing it. This processing may result in one or more event occurrences being added to the list to be processed at the current time or in the future. Note that only one event occurrence at a time is removed from the list. All others remain on the list. After the processing of the event occurrence, the list will consist of the event occurrences already on the list when the first event occurrence was removed plus those added by processing this event occurrence.

    For the two workstation model, the simulation engine must deal with six events that change the values of the state variables. Each of these events must be scheduled in time and processed. These events are the arrival of an entity (part) to each station as well as the start and end of processing.

    At any point in time, the event list could contain the following event occurrences at future points in time:

    • Entity arrives to workstation A event.
    • Entity ends service at workstation A event.
    • Entity ends service at workstation B event.

    Other events can occur only at the same point in time as another event.

    • The start of service at workstation A event that can occur either when a entity arrives to workstation A (arrives to workstation A event) or when a entity completes processing at workstation A (ends service at workstation A event).
    • The entity arrives to workstation B event that occurs every time an entity ends service at workstation A event occurs. (Recall there is no time delay for moving between workstations.)
    • The start of service at workstation B event that can occur either when a entity arrives to workstation B (arrives to workstation B event) or when an entity completes processing at workstation B (ends service at workstation B event).

    To illustrate, consider one possibility for the event list at the start of the simulation.

    Current Simulation Time: 0

    Next Simulation Time = Time of first event occurrence in list = 0.0

    \[
    \begin{array}{l|ll}
    \text { Event } & \text { Time of Occurrence } & \text { Entity ID } \\
    \hline \text { Entity Arrives to A } & 0.0 & 1
    \end{array}
    \nonumber\]

    The simulation will begin with the arrival of the first entity at time 0.

    Thus, the first task of the simulation engine is to process the Entity Arrives to A event at time 0. This task involves removing the Entity Arrives to A event from the list and performing the actions associated with the event: scheduling the next Entity Arrives to A event and scheduling the Entity Start Service event, if workstation A is idle (which it is initially). After the entity arrives to A event is processed the event list is as follows, assuming the next arrival to workstation A is at time 5.0:

    Current Simulation Time: 0
    Next Simulation Time = Time of first event occurrence in list = 0.0

    \[
    \begin{array}{l|ll}
    \text { Event } & \text { Time of Occurrence } & \text { Entity ID } \\
    \hline \text { Start Service at A } & 0.0 & 1 \\
    \text { Entity Arrives to A } & 5.0 & 2
    \end{array}
    \nonumber\]

    The entity with ID number 2 will arrive at time 5.0 and the End of Service at workstation A for the entity with ID number 1 will occur at time 8.0.

    The simulation engine advances time to the next event occurrence at time 5.0 and processes the Entity Arrives to A event for the entity with ID 2. This means that the Entity Arrives to A event will be removed from the list and End Service at A event will remain on the list.

    At time 5.0, the workstation A resource is in the busy state. Thus, the entity with ID 2 enters the queue for the workstation A resource. No entry for this entity is placed on the event list. In addition, processing this event causes the Entity Arrives to A event to be scheduled at time 32.5 for the entity with ID 5. This means that the next occurrence of the Entity Arrives to A event is placed on the event calendar at time 32.5.

    Thus, after processing the Entity Arrives at A event occurrence at time 5.0, the event list consists of the End Service at A event which was previously on the list plus the next Entity Arrives to A event that was newly placed on the list as shown in the following.

    Current Simulation Time: 5.0
    Next Simulation Time = Time of first event occurrence in list = 8.0

    \[
    \begin{array}{l|cl}
    \text { Event } & \text { Time of Occurrence } & \text { Entity ID } \\
    \hline \text { End Service at A} & 8.0 & 1 \\
    \text { Entity Arrives to A} & 32.5 & 3
    \end{array}
    \nonumber\]

    Next, the simulation engine advances time to the 8.0 to process the end of service at A event for entity 1. The entity with ID number 1 will arrive at workstation B at time 8.0 since there is no movement delay. The entity with ID number 2 will leave the queue of the workstation A resource and start processing using the workstation A resource that has just become idle. Thus, the workstation A resource becomes busy.

    Thus after processing the End Service at A event, the Entity Arrives to A event remains on the list and the Entity Arrives to B event as well as the Start Service at A event are added.

    Current Simulation Time: 8.0
    Next Simulation Time = Time of first event occurrence in list = 8.0

    \[
    \begin{array}{l|cl}
    \text { Event } & \text { Time of Occurrence } & \text { Entity ID } \\
    \hline \text { Entity Arrives to B } & 8.0 & 1 \\
    \text { Start Service at A } & 8.0 & 2 \\
    \text { Entity Arrives to A } & 32.5 & 3
    \end{array}
    \nonumber\]

    Simulation engines typically use the strategy that all possible processing of one entity at the current simulation time will be done before any processing of any other entity. Another way of saying this is that the entity will proceed as far as possible until obstructed by a time delay or by waiting for a currently unavailable resource. This implies that new events at the current simulation time for this entity are placed first on the event list. Thus in the above list, the entity arrives to B event for the entity with ID 1 at time 8.0 precedes the start service at A event for the entity with ID number 2.

    The remainder of the simulation is processed in a similar fashion.


    This page titled 5.3: Time Advance and Event Lists is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Charles R. Standridge.

    • Was this article helpful?