| SimEvents® | ![]() |
Attributes
This block outputs signals using data from attributes of entities. For each arriving entity, the block updates the signal at the signal output ports using values of the attributes named in the block dialog box. The block also outputs the entity unchanged.
Each attribute corresponds to a row in the table on the Get Attribute tab in the block's dialog box. Buttons to the left of the table let you manipulate rows in the table:
To add a new row to the table, click the Add button
.
To duplicate a row, select it and click the Copy button
.
To remove a row, select it and click the Delete button
.
Note The dialog box does not ask you to confirm the deletion and does not offer an undo operation. However, if you delete a row by mistake, you can click Cancel to ignore unapplied changes. |
Note Deleting a row and applying the change might affect signal output ports corresponding to other rows of the table. For example, if the block has a signal output port A2 and you delete the row marked A1, then the block renames A2 as A1. Check that any signal that connects to the renamed port is still connected as you expect. |
Within each row, you can specify aspects of the block's behavior that relate to the attribute that corresponds to that row.
You can specify the block's behavior if the arriving entity does not possess an attribute listed in the table of the block dialog box. Use the When Attribute Is Missing parameter in the table row for that attribute, as described below.
| Parameter Value | Block Behavior in Case of Missing Attribute |
|---|---|
| Error | The block issues an error message and halts the simulation. In this case, the Default Value and Treat Vector as 1-D parameters in the table row for that attribute are disabled. |
| Default value | The block outputs a default value that you specify using the Default Value and Treat Vector as 1-D parameters in the table row for that attribute. The simulation proceeds. |
| Warn | The block outputs a default value that you specify using the Default Value and Treat Vector as 1-D parameters in the table row for that attribute. The block also issues a warning in the MATLAB® Command Window. The simulation proceeds. |
Entity Input Ports
| Label | Description |
|---|---|
| IN | Port for arriving entities. |
Entity Output Ports
| Label | Description |
|---|---|
| OUT | Port for departing entities. |
Signal Output Ports
| Label | Description | Time of Update When Statistic Is On | Order of Update |
|---|---|---|---|
| #d | Number of entities that have departed from this block since the start of the simulation. | After entity departure | 2 |
| Ax, where x = 1, 2, 3,... | Value of the attribute specified in the Ax row of the table in the dialog. | After entity departure | 1 |
Output signals having the same number in the Order of Update column in the table above are updated in an arbitrary sequence relative to each other; you should not rely on a specific sequence for your simulation results.
The initial output value, which is in effect from the start of the simulation until the first update by the block, is 0 for all signals.

The name of the attribute to query.
The response of the block when the entity does not possess an attribute named in the table.
The value for the corresponding output signal if the entity does not possess an attribute named in the table. See Attribute Value Support to learn what kind of data you can use as a default value. This field appears only if you set When Attribute Is Missing to Default value or Warn.
This option affects attributes whose When Attribute Is Missing parameter is set to Default value or Warn, and whose Default Value parameter evaluates to an N-element row or column vector. Selecting this option causes the block to consider the default value as a vector of length N. Otherwise, the block considers the default value as a multidimensional array.
These parameters determine whether certain ports produce data throughout the simulation, produce data only when you stop or pause the simulation, or are omitted from the block. For descriptions of the affected ports, see the "Signal Output Ports" table above.

Controls the presence and behavior of the signal output port labeled #d.
Accessing Attributes of Entities
![]() | FIFO Queue | Get Attribute (Obsolete) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |