| Contents | Index |
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.
In the block dialog box, on the Get Attribute tab, each attribute corresponds to a row in the table. The block can get up to 32 attributes. Use the buttons to the left of the table to manipulate rows in the table:
To add a new row to the table, click the Add button
. By default, the attribute
name in the new row is unique within the table.
To duplicate a row, select it and click the Copy button
.
To remove a row, select it and click the Delete button
. When you click the Delete button,
there is no message asking you to confirm the deletion or offering
an undo operation. However, if you delete a row by mistake, but have
not clicked the Apply button or the OK button
to apply the change, then click the Cancel button.
The dialog box closes and deletion of the row is canceled.
Note If you delete a row and apply the change, it 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 relabels A2 as A1. Verify that any signal that connects to the relabeled port is still connected as you expect. |
Within each row, you can specify aspects of the block behavior that relate to the attribute that corresponds to that row.
You can specify the block 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.
| 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 |
| Attribute name | Value of the attribute specified in the Ax row of the table in the dialog box. x = 1, 2, 3, etc. The default value of the Name that corresponds to row Ax, is Attribute x. x = 1, 2, 3, etc. To change the name of an attribute specified in the table from the default, place the cursor in the Name field and type a new name. | After entity departure | 1 |
Output signals having the same number in the Order of Update column in the preceding table are updated in an arbitrary sequence relative to each other. Do 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. To learn what kind of data you can use as a default value, see Attribute Value Support. You see this field 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 the block produces data at signal output ports or omits those ports. For descriptions of the data and ports, see the preceding table, "Signal Output Ports".

Accessing Attributes of Entities

Learn how you can use SimEvents discrete-event simulation capabilities through these technical resources.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |