Browse Prior Art Database

Time Efficient Detection of Simulation Events

IP.com Disclosure Number: IPCOM000112928D
Original Publication Date: 1994-Jun-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 4 page(s) / 87K

Publishing Venue

IBM

Related People

Steffens, GW: AUTHOR

Abstract

An algorithm is described that provides for the time efficient detection of events during the execution of a software simulation.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Time Efficient Detection of Simulation Events

      An algorithm is described that provides for the time efficient
detection of events during the execution of a software simulation.

Simulator events are conceptually one of the following:

o   "Simple" events such as a simulator object being in a certain
    state

o   "Complex" events that are the "and-ing" or "or-ing" of other
    simulator events

      This algorithm represents a simulator event as a tree data
structure in which the leaf nodes represent simple events and the
interior nodes represent complex events as the "and-ing" or "or-ing"
of its child nodes.  Refer to the Figure for an example of such a
tree.

Leaf nodes contain two values:  Event_Active and Event_Expr.

o   Event_Expr - an expression that represents the simulator event

o   Event_Active - a boolean that will be "true" if the simulator
    event expressed in Event_Expr is currently active

Interior nodes contain two values: Event_Relationship and
Event_Active:

o   Event_Relationship - describes the relationship among the node's
    child nodes.  If it is "OR", then only one of the child nodes
    needs to have its Event_Active  = "true" for the interior node's
    Event_Active to be set to "true".  If it is "AND", then all of
    the child nodes need to have their Event_Active = "true".

o   Event_Active - a boolean that will be "true" depending on the
    Event_Relationship value, and the Event_Active values of the
    child nodes.  This represents whether the complex event is
    active.

The time efficiency of this algorithm is achieved in two ways:

o   Perform the evaluation of whether a simulator event is active
    when one of the leaf node events is known to be active

o   Remember which leaf node events are active so only a portion of
    the tree need to be evaluated.

      The algorithm will now be described in terms of 4 pseudo-coded
procedures.  The functions "Event_Active" and "Event_not_Active" are
invoked by the simulator mechanisms that detect when simple events
occur.

     Procedure Event_Active(event_node)
         set event_node.Event_Active = True.
         if Has_Parent_Event(event_node)
            then Tell_Parent_Event_is_Active(Get_Parent(event_node))
            else Report_active_Event(event_node).

     Procedure Event_not_Active(event_node)
         set event_node.Event_Active = False.
         if Has_Parent_Event(event_node)
            then
 Tell_Parent_Event_is_Not_Active(Get_Parent(event_node)).

...