Page 152 - ExtendSim User Guide
P. 152

126
Items, Properties, and Values
Item properties
☞ Flow attributes provide a similar functionality for the flow in Rate library blocks in ExtendSim AT and Suite. For more information, see “Flow attributes” on page 353.
Attribute names and values
Each item attribute is composed of a name and a numeric value:
• Anattribute’snameidentifiessomegeneralcharacteristicoftheitemsuchas“size”, “route”, “CarType” or “tank capacity”. Attribute names are limited to 15 characters.
• Anattribute’svalueindicatesonedimensionofthenamedcharacteristic.Forinstance,an item’ s “size” attribute could have a value of “8” or a value of “12”, while an attribute named “CarType” could have a value of “1” (for Ford), “2” (for Toyota), or “3” (for Volvo). An attribute value is not just a number; it can also be the address of data in a database.
Attributes are meant to be unique; if you attempt to add a new attribute with exactly the same name as an existing one, ExtendSim warns you that the name already exists. While attribute names are not case sensitive (“Type” is equal to “type”), spaces are significant and should be avoided.
Attribute names and values are stored in a pair of dynamic, global arrays, described in “Attri- bute arrays” on page 132.
☞ The Car Wash model for the tutorial on page 115 used string attributes. Models with string attributes use text to represent the corresponding attribute value. However, the underlying architecture is that attribute values are still numbers. For more information, see “Item attribute types”.
Number of item attributes in a model
In a model, each item can contain up to 500 attributes that uniquely describe the item. Every item contains the full set of attributes that have been defined in the model. The Executive block’s Item Attributes tab displays all of the model’s attributes.
Each attribute contains a value that can represent either:
• Anumberthatcanbeusedforrouting,timing,andsoforth.
• The address of data in a database or global array. The data pointed to can contain a single number or an unlimited amount of additional data that describes the item, its route, its prop- erties, and so forth.
☞ If you use attributes efficiently, there is almost no limit to what can be represented. If you do approach the 500 attribute limit, consider using DB address attributes (discussed below) to ref- erence information in the ExtendSim database.
Item attribute types
ExtendSim supports three types of attributes for items:
• Avalueattributeholdsarealnumberasitsattributevalue.
• Thevalueofastringattributeisstillanumber,butitisrepresentedinthemodelbya string. With string attributes you enter a descriptive text label (string) for each potential attri- bute value in a lookup table in the Executive block’s Item Attributes tab. The string can then be used in the model in place of the corresponding number. For example, a string attribute named “CarType” might have three possible values: 1, 2, and 3. Once the lookup table for
Discrete Event


































































































   150   151   152   153   154