Modeling Quantity using Value Types
A Block can have simple properties called Value Properties, which define attributes of a Block that represent a scalar or vector quantity. Values are used to express information about a Block and provide a slot for an actual value to be entered in an instance of a Block. For example, a Tank can have a properties of diameter, height and volume defined. The value types allow an engineer to create a universal way of quantifying a property; for example:
- A centrifuge has a maximum speed specified in revolutions per minute (rpm)
- A train carriage has a weight specified in kilograms (kg)
- A tank has a volume specified in liters (l)
- A light source has a luminous intensity specified in Candela (cd)
- A dialysis machine has a blood flow rate specified in milliliters per minute (ml/min)
This diagram shows a number of different Value Types that can be defined in Enterprise Architect and then applied to any number of attributes defined in Blocks.
The intent of the Value Type is to allow an engineer, team or industry to define standard types that can be reused to characterize the value properties defined for any number of Blocks. For example, the value type of 'Kilogram' could be applied to a value property specifying the weight of a train or the weight of a bus or the seating capacity of either.
These value types, as the name suggests, have a value that describes the quantity of the property; they can be defined using the 'Attribute' tab of the Features window, as shown here.
For example, two Blocks representing a Train and a Bus could have a property of 'Weight' defined that is typed by the value type 'Kilogram'. If an attribute such as 'Seating Capacity' has a simple type such as 'Integer' this can be directly selected in the 'Type' drop down, but if 'Type' is based on a Value Type this can be selected using the 'Select type..' option from the drop-down.
Instances of Blocks that have an attribute (Value Property) defined in Enterprise Architect can have an actual value specified for the attribute. For example, each instance of the Bus and Train with, say, a particular model number could have a different weight defined. Other properties such as 'Seating Capacity' could have a primitive type of 'Integer' defined, and these also could be set for particular instances of 'Carriage'.
Enterprise Architect allows an engineer to set the values for each of the defined attributes by using the 'Set Run State' option from the 'Features' sub-menu for a Block instance.
The attribute values (slots) can be displayed on a diagram, allowing an engineer to create compelling examples or catalogues of Block instances, as shown here.