7.2 Entities and Attributes

When modeling a system, there are often many types of entities. For example, consider a retail store. Besides customers, the products might also be considered as entities. The products are received by the store and wait on the shelves until customers select them for purchase. Entities may come in groups and then are processed individually or they might start out as individual units that are formed into groups. For example, a truck arriving to the store may be an entity that consists of many pallets that contain products. The customers select the products from the shelves and during the check out process the products are placed in bags. The customers then carry their bags to their cars. Entities are uniquely identifiable within the system. If there are two customers in the store, they can be distinguished by the values of their attributes. For example, considering a product as an entity, it may have attributes serial number, weight, category, and price. The set of attributes for a type of entity is called its attribute set. While all products might have these attributes, they do not necessarily have the same values for each attribute. For example, consider the following two products:

  • (serial number = 12345, weight = 8 ounces, category = green beans, price = $0.87)

  • (serial number = 98765, weight = 8 ounces, category = corn, price = $1.12)

The products carry or retain these attributes and their values as they move through the system. In other words, attributes are attached to or associated with entities. The values of the attributes might change during the operation of the system. For example, a mark down on the price of green beans might occur after some period of time. Attributes can be thought of as variables that are attached to entities.

Not all information in a system is local to the entities. For example, the number of customers in the store, the number of carts, and the number of check out lanes are all characteristics of the system. These types of data are called system attributes. In simulation models, that take on an object-oriented nature, this information can be modeled within a class that represents the system as a whole. By making these quantities visible at the system level, the information can be shared between the different components of the system.

Figure 7.1 illustrates the difference between global (system) variables and entities with their attributes in the context of a warehouse. In the figure, the trucks are entities with attributes: arrival time, type of product, amount of product, and load tracking number. Notice that both of the trucks have these attributes, but each truck has different values for their attributes. The figure also illustrates examples of system-wide variables, such as, number of trucks loading, number of trucks unloading, number of busy forklifts, etc. This type of information belongs to the whole system.

Variables and Attributes within a System

Figure 7.1: Variables and Attributes within a System

Once a basic understanding of the system is accomplished through by conceptualizing system variables, the entities, and their attributes and various system components, you must start to understand the events that may occur within the system. In order for entities to flow through the system, there needs to be mechanisms for causing events to occur that represent the arrival of objects to the system. The following section describes how the JSL allows for the modeling of a pattern of events.