What is an Attribute?

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.

Each entity possesses a unique time in the attribute.
When entities arrive at the activity, the TIme field doesn’t see the name a_Time, but rather the value 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 batch forms when the quantity in the input queue is equal to or less than the number in the attribute a_Batch_Qty.

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.

The attribute a_Sample_Qty determines if the lab process 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.

The Attach quantity is controlled by the attribute named a_Sample_Qty, on the parent entity (The entity requesting the Attach).

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.

When the entity enters the activity capacity, its attribute records the current simulation 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.

Time capture from “Commit Load” to the end of “Scan Destination” using an attribute.
Use and attrubte to collect the start of time capture using an attribute.
Record time values in a variable. The same attribute collecting the start time of the entity becomes part of the calculation.

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.

  1. Use the size of the product to change the production time
  2. Track the number of times a product has failed during an inspection
  3. Import historical production times for each entity’s arrival
  4. Import routing information with attributes
  5. 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.

Access the Attributes, Variables, & Scenarios dialog from the standard toolbar.

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.

Using Descriptors

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:

  1. 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_
  2. Don’t start names using numbers.
  3. When descriptors are common to many attributes, define descriptors in the same order.
  4. Make descriptor names one continuous word. For example, change “Long Shot” to “Long_Shot” or “LongShot”.

Examples:

Invalid Descriptors:

  1. CONTENTS
  2. CREATE
  3. CYCLESTART
  4. D2
  5. D3
  6. 14THSTATION
  7. 17THRESOURCE

Note: In the descriptors above, 1 to 5 are reserved words, while 6 and 7 start with a number.

Valid Descriptors:

  1. CONTENTSOF1
  2. CREATEFROM1
  3. CYCLESTARTOF1
  4. D2FROMTO1
  5. D3FROMTO1
  6. STATION14TH
  7. RESOURCE17TH
  8. COLOR_RED
  9. YELLO
  10. YES
  11. NO

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.

  1. a_Test1:
    • RED
    • GREEN
    • BLUE
    • YELLOW
    • BLACK
  2. a_Test2
    • BLUE
    • GREEN
    • RED
    • BLACK
    • YELLOW
  3. v_Test1
    • GREEN
    • RED
    • BLUE
    • YELLOW
  4. v_Test2
    • BLUE
    • RED
    • GREEN
    •  BLACK

Valid Same Descriptors:

To avoid problems with the descriptors, write descriptor lists, using the same names in a common order as shown below.

  1. a_Test1:
    • RED_1
    • GREEN_2
    • BLUE_3
    • YELLOW_4
    • BLACK_5
  2. a_Test2
    • RED_1
    • GREEN_2
    • BLUE_3
    • YELLOW_4
    • BLACK_5
  3. v_Test1
    • RED_1
    • GREEN_2
    • BLUE_3
    • YELLOW_4
    • BLACK_5
  4. v_Test2
    • RED_1
    • GREEN_2
    • BLUE_3
    • YELLOW_4
    • BLACK_5

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.

  1. Unlink your hierarchical model files.
  2. Make your change in each file and save it.
  3. Re-link the hierarchical structure
Was this article helpful?
Go to Top