Skip to Main Content Skip to Search
Product Documentation

Execution of Blocks Having Event-Based Input Signals

Response to Event-Based Input Signals

When a computational block or sink block has event-based input signals, the simulation process is slightly different from the process in Simulating Dynamic Systems in the Simulink documentation. The loop iteration process does not necessarily invoke Outputs methods and Update methods at each time step for a block that has event-based input signals. Instead, such a block executes only when an event-based input signal executes the block. The following table describes the circumstances under which an event-based input signal executes the block.

Event-Based Input SignalWhen Signal Executes Block
Function-call signalUpon each function call.
Signal that connects Event Filter block to Atomic Subsystem block, where the Event Filter block has the Execute downstream blocks upon signal-based events option selected

The atomic subsystem executes upon each event that meets your criteria in the Type of signal-based event and other parameters of the Event Filter block.

Events that do not meet your criteria do not execute the atomic subsystem. However, the values of the signal are visible if another input signal executes the subsystem.

Signal that connects Event Filter block to Atomic Subsystem block, where the Event Filter block has the Execute downstream blocks upon signal-based events option deselected

The signal never causes the atomic subsystem to execute.

Values of the signal are visible to the subsystem if another input signal executes the subsystem.

All other event-based signalsUpon each event.

Example: Execution of a Computational Block

In the following model from Example: Resetting an Average Periodically, the Atomic Subsystem block performs a computation on event-based input signals.

During the loop iteration process of the simulation, when an input signal executes the Atomic Subsystem block, the subsystem performs its computation and updates its output signals. For example, each time a customer leaves the queuing system, the #d signal of the Read Timer block has a sample time hit. This signal executes the Atomic Subsystem block, whose computation uses the latest values of all the input signals.

Input signals can potentially execute the Atomic Subsystem block multiple times at the same value of the simulation clock. In that case, the subsystem performs its computation multiple times. For example:

  


Free Discrete Event Simulation Technical Kit

Model electronic system architectures, process flows, and logistics as queuing systems or agent-based systems.

Get free kit

Trials Available

Try the latest version of discrete-event simulation products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS