Attributes alone don’t do anything. When combined with other statements, attributes allow you to do everything — to solve the most difficult problems. Learn how to use attributes and become a master modeler.Scott Baird
Entity Attributes store and carries information specific to an entity. Attributes are like the fields on your driver’s license. Every person has a driver’s license, but the information is unique to the person. An Attribute would be “hair color” and another would be “eye color,” etc. An attribute’s value can only be assigned, incremented, decremented, and examined by the entity. For example, when an Entity encounters Action Logic only the attributes for that entity can be read or changed. An entity can’t read or change another entity’s attributes.
Attributes always combine with other statements. Examples below show how attributes provide critical capabilities in your models.
Examples of Entity Attribute Usage
Attributes replace values
If an entity carries a unique time value in an attribute and the attribute replaces the time value in the Activity properties dialog, then every entity uses the time in the attribute.
When an entity enters the input queue (or output queue) the entity attribute becomes the batch quantity when entered into the Batch Size field.
A variable create finds use in healthcare, manufacturing, repair, and support systems. The example below shows a create routing from healthcare. A doctor has an Initial Assessment with a patient. Based on the findings of the visit the doctor may optionally order bloodwork. Some patients need bloodwork and some don’t. The attribute on the entity determines the value of the create. Use an attribute to determine “if” a create occurs. If the attribute value equals one, a Create takes place. On the other hand, if the attribute equals zero, no Create occurs.
An attribute also determines if the doctor needs to wait for the lab process to complete before making a treatment decision. The Attribute on the parent or creating entity determines the requirement to wait for a return. If the attribute is zero then the entity moves forward and the doctor can make a decision. If the attribute is set to one, the lab process causes a delay before the doctor decides on the treatment.
Record when an entity entered a section of a model
Every entity records the time entered into the simulation in the attribute named CycleStart. When I subtract the start time from the end time, I know how long the entity took in the model. The “time recording” and calculation all happen automatically. However, if you want to collect the start time from another location, you need to define and assign an attribute. The model and logic below show the statements needed to collect a new start time.
See What is a Clock( ) statement?
Find a cycle time within an area of the model.
To record the time from one are of the model to another an attribute records the time at the start of the collection and is used again in the calculation of the time collection. The example below shows the collection of time in a immediate delivery service using drones.
See What is a Variable? What is a Clock( ) statement
Attributes become an integral part of many powerful features in ProcessModel. A limited selection of attribute application is shown below.
- Use the size of the product to change the production time
- Track the number of times a product has failed during an inspection
- Import historical production times for each entity’s arrival
- Import routing information with attributes
- Import the assembly requirements with attributes
Entities have the following pre-defined attributes:
• Name – The name of the entity. DO NOT use an assignment statement to assign this attribute, e.g., Name = BadCall will not work. Instead, use the NewName statement or the available fields in the routing properties dialog.
• Cost – The current accumulated cost for an entity. To learn more about costs, see ProcessModel and Activity-based Costing.
• VATime – Cumulative value-added time (in minutes).
• ID – Unique identifying number assigned to each entity (created entities have the same ID as the entity that created them so they can be reunited later if desired).
• CycleStart – Time (in minutes) entity entered system.
The system automatically manipulated pre-defined attributes, so only change these with careful forethought.
Creating User-Defined Attributes
Access the Attributes, Variables, & Scenarios dialog from the Insert menu or use the icon in the tools menu. Notice a suggested prefix of “a_” starts each attribute. Maintaining this prefix helps to avoid naming conflicts, improves readability, and helps with debugging complex models.
Shown here after a new descriptive attribute was created using the New button.
New This button creates a new attribute.
Delete This button deletes the selected attribute. (Note that the pre-defined attributes may not be deleted.)
Name The name of the attribute. Letters, numbers, and the underscore” “” character are allowed in the name. The name must be one continuous word (i.e. a_Priority_Level).
Type The type of attribute. This can be set to Integer, Real, or Descriptive.
If you assign a real value (containing a decimal portion) to an integer parameter (user or system defined), the value will be truncated to 0 decimal places. It will not be rounded. Capacity, input queue, output queue, batch size, and resource quantity fields are all integer fields which will be truncated if you enter a number with a decimal value.
• Integer Any whole number (no digits to the right of the decimal).
• Real Numbers with digits to the right of the decimal. Use Real when capturing time, weight, etc. values.
• Descriptive Defined with a list of adjectives or descriptors potentially assigned to the attribute.
Paste Rule How the Attribute adds to the dialog and into action logic when pasted into a model.
• Duplicate If the Entity Attribute does not exist in the target model, add it to the Attribute dialog. If the Entity Attribute exists in the target model, do not add it to the dialog.
• Clone If the Entity Attribute does not exist in the target model, add it to the Attribute dialog. If the Entity Attribute exists, add it with a suffix (a_Reject_Count will become a_Reject_Count1). In addition, all instances of the a_Reject_Count in the logic change to a_Reject_Count1.
Descriptor list The list of potential adjectives or descriptors assigned to the descriptive attribute. Only available for attributes whose Type is Descriptive.
Attributes and Variables can be defined with a type: Descriptive. The Descriptor is a potential list of adjectives/descriptors assigned to the attribute or variable. Descriptors help make your model easier to read and understand.
For most models, few rules are needed when defining descriptive attributes and variables. However, if a model is developed that transfers the value of descriptive attributes or variables to other descriptive attributes or variables then additional care is needed during definition. When declaring Descriptors for attributes and variables the following rules should be considered:
- Don’t use reserved words. The list of reserved words is extensive. To avoid conflicts a prefix or suffix could be added. CONTENTS could become D_CONTENTS or CONTENTS_
- Don’t start names using numbers.
- When descriptors are common to many attributes, define descriptors in the same order.
- Make descriptor names one continuous word. For example, change “Long Shot” to “Long_Shot” or “LongShot”.
Note: In the descriptors above, 1 to 5 are reserved words, while 6 and 7 start with a number.
Invalid Same Descriptors:
ProcessModel converts descriptor name positions to numbers to increase the speed of the simulation. Several descriptor lists with the same names in different orders produce unpredictable results.
Valid Same Descriptors:
To avoid problems with the descriptors, write descriptor lists, using the same names in a common order as shown below.
Note: The position of a descriptor translates into an integer value for evaluation.
Define an Attribute
1. Open the Attributes, Variables, & Scenarios dialog.
2. Press the New button.
3. Enter the name of the attribute.
4. Select the type: Real, Integer, or Descriptive. If you select Descriptive, you must enter the list of descriptors in the edit box provided. Enter each descriptor on a separate line.
Hierarchical Model – Delete Attributes
Linked hierarchical model files synchronize data when you save each file. When you delete a variable, attribute, or scenario parameter in one model file, it is added back in from the other linked files during synchronization.
- Unlink your hierarchical model files.
- Make your change in each file and save it.
- Re-link the hierarchical structure