Page 156 - ExtendSim User Guide
P. 156

130
Items, Properties, and Values
Item properties
ota, and Volvo. If Toyota is selected, the corresponding value that gets stored on the item for the CarType attribute will be the number 2.
Connecting a Random Number block (Value library) that uses an Empirical table to a Set block that accesses a string attribute will cause the strings for that attribute to appear as a popup list in the empirical table’s Value column. This is shown in “Checking the attribute” on page 116.
DB address attribute
Each Set block only points to one ExtendSim database, which becomes one element of the DB address. To set a DB address attribute in a Set dialog:
Choose a database from the popup menu.
In the Property Name column of the Set block’s table, select a DB address attribute from the popup menu or create a new one; existing attributes are listed below the New DB Address Attribute divider.
Once the DB address attribute has been selected, the Set dialog’s table enlarges to display the other elements of the address (Table, Field, and Record). The value for the DB address attri- bute is defined by clicking the appropriate popup menus in the table, selecting whether that element’s information should be selected from a list, entered as an index, or accessed from a connector. The screenshot below is an example of the ProcessTime DB address attribute, which gets its value from a record in the Times field of the Processing Time table in the Pro- cess database.
☞ You don’t need to select every element for a DB address attribute. For example, you may only want to specify the database, table and field indexes and ignore the record index.
For a DB address attribute, the Value column displays the database address, as determined by the indexes of the settings in the Table, Field, and Record columns. In the screenshot above, the Value notation is 2:1:1:2, where 2 is the index of the Process database, 1 is the table index for Processing Time, 1 is the field index for Times, and 2 is the index for the selected record, which has a value of 5.04.
Once the attribute has been set, the attribute information indicated in the Set block’s dialog will be assigned to each item as it arrives to the block. Attribute values may also be defined dynam- ically using the Set block’s value input connectors to override values set in the dialog.
Every model has an internal list of all the attribute names that have been created for use by items in that model. However, not all items in the model will make use of every attribute name. For an item to use an attribute name, the value of the attribute must be explicitly set using an attribute modifying block (such as a Set block).
Getting attribute values and reporting changes
In order to manipulate an item based on the attribute, usually to route it or process it, you need to get the item's attribute value. The most common method for getting attributes is to select the
Discrete Event


































































































   154   155   156   157   158