Using the Observation Source Block to Set Entity Attributes

This simple queueing example contains two models to demonstrate features of the Observation Source block and how it can be used to quickly set multiple entity attributes in a Modifier block.

In model0 in Figure E.31, you create entities and send them to a Modifier block where you set five attributes.

Figure E.31: Observation Source Block Example


Each attribute is read from a separate column in a SAS data set using Numeric Source and Text Source blocks. After the attributes are set, the value of attrib2 is extracted and sent to a String Holder block. The entity then waits in a queue for the Server to become available. The service time for each entity is the value of the attribute attrib5. The value of attrib5 is extracted using an Extractor block, which is connected to the InServiceTime port of the Server block. When an Extractor block is used in this way, it does not require connections to its InEntity and OutEntity ports. After being serviced, the entity leaves the system.

model1 in Figure E.31 is the same model as model0 except that an Observation Source block is used to read in the attribute values from the same data set as is used in model0. In the Modifier block in model1, you select An Observation Value Input for the Assigned from option and you select Full Assignment, as shown in Figure E.32. This means that as each entity enters the Modifier block, an entire row from the SAS data set is read in and each column is assigned as an attribute on the entity (using the column names in the data set for the attribute names). This eliminates the need to use five separate Numeric Source and Text Source blocks to read in the attribute values.

Figure E.32: Modifier Block Dialog Box