| Contents | Index |
| On this page… |
|---|
Signal input ports of SimEvents blocks fall into these categories:
Notifying ports, which notify the preceding block when a certain event has occurred
Monitoring ports, which help you observe signal values
Reactive ports, which listen for updates or changes in the input signal and cause an appropriate reaction in the block possessing the port
The distinctions are relevant when you use the Event-Based Random Number or Event-Based Sequence block. For details, see these topics:
Event-Based Random Number reference page
Event-Based Sequence reference page
Notifying ports, listed in the table below, notify the preceding block when a certain event has occurred. When the preceding block is the Event-Based Random Number or Event-Based Sequence block, it responds to the notification by generating a new output value. Other blocks ignore the notification.
List of Notifying Ports
| Signal Input Port | Block | Generate New Output Value Upon |
|---|---|---|
| Attribute name (e.g. Attribute1, Attribute2) | Set Attribute | Entity arrival |
| in | Signal Latch | Write event |
| e1, e2 | Entity Departure Function-Call Generator | Entity arrival |
| Signal-Based Function-Call Generator | Relevant signal-based event, depending on configuration of block | |
| t | Signal-Based Function-Call Generator | Relevant signal-based event, depending on configuration of block |
| t | Infinite Server | Entity arrival |
| N-Server | Entity arrival | |
| Single Server | Entity arrival | |
| t | Time-Based Entity Generator | Simulation start and subsequent entity departures |
| ti | Schedule Timeout | Entity arrival |
| x | X-Y Signal Scope | Sample time hit at in signal input port |
Monitoring ports, listed in the table below, help you observe signal values. Optionally, you can use a branch line to connect the Event-Based Random Number or Event-Based Sequence block to one or more monitoring ports. These connections do not cause the block to generate a new output, but merely enable you to observe the signal.
List of Monitoring Ports
| Signal Input Port | Block |
|---|---|
| Unlabeled | Discrete Event Signal to Workspace |
| in | Signal Scope |
| X-Y Signal Scope | |
| ts, tr, vc | Instantaneous Event Counting Scope |
| Unlabeled | Event to Timed Signal |
Reactive ports, listed in the table below, listen for relevant updates in the input signal and cause an appropriate reaction in the block possessing the port. For example, the p port on a switch listens for changes in the input signal; the block reacts by selecting a new switch port.
List of Reactive Ports
| Signal Input Port | Block | Relevant Update | |||
|---|---|---|---|---|---|
| en | Enabled Gate | Value change from nonpositive to positive, and vice versa | |||
| p | Input Switch | Value change | |||
| Output Switch | |||||
| Path Combiner | |||||
| ts, tr, vc | Entity Departure Counter |
| |||
| Event-Based Entity Generator | |||||
| Release Gate | |||||
| Signal-Based Function-Call Generator | |||||
| Signal-Based Function-Call Event Generator | |||||
| wts, wtr, wvc, rts, rtr, rvc | Signal Latch |
| |||
| Unlabeled input port | Event Filter | Depends on block parameter values. Choices are:
| |||
| Unlabeled input port | Initial Value | Sample time hit |
For triggers and value changes, "appropriate" refers to the direction you specify in a Type of change in signal value or Trigger type parameter in the block's dialog box.
To connect an event-based signal generator to a reactive port, you must use a workaround because you cannot connect the Event-Based Random Number block directly to a reactive input port of a SimEvents block or indirectly, via a single-input-single-output (SISO) block that supports event-based input signals.
The following model shows an invalid connection of the Event-Based Random Number block.

In this model, the Event-Based Random Number block is directly connected to the p input port of an Output Switch block. The p input port of the Output Switch block is a reactive port. This connection is invalid because the Event-Based Random Number block cannot infer from the p input port of the Output Switch block when to generate a new random number. The Output Switch block is designed to listen for changes in its p input signal and respond when a change occurs. The Output Switch cannot cause changes in the input signal value or inform the random number generator when to generate a new random number.
The following model shows a workaround to this invalid connection.

In this workaround, the Event-Based Random Number block is not directly connected to the p input port of the Output Switch block. Instead, a Signal Latch block stores each value that the Event-Based Random Number block generates.
When an entity departs the Output Switch block, the #d output signal of that block increments by a value of 1 and triggers a write-to-memory event in the Signal Latch block. In this model, the value of the Read from memory upon parameter of the Signal Latch block is set to Write to memory event. This setting means that each time the Event-Based Random Number block writes a new value to the Signal Latch block, the Signal Latch block outputs its current stored value to the p input port of the Output Switch block.
![]() | Notifications and Queries Among Blocks | Interleaving of Block Operations | ![]() |

Model electronic system architectures, process flows, and logistics as queuing systems or agent-based systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |