This example demonstrates how you can use the Observation Source and Dataset Holder blocks to read in and store a SAS data set or JMP table that is used repeatedly by all entities. In Figure 1, five different types of parts arrive at a machining center for processing at four different stations: milling (station 1), turning (station 2), drilling (station 3), and chamfering (station 4).
Each of the four stations can work on one part at a time and a queue in front of each station holds waiting parts. At each station, part-processing times are exponentially distributed with a mean of 1 minute (for milling), 1.5 minutes (for turning), 1.6 minutes (for drilling), and 1.8 minutes (for chamfering).
The entities in this model are the parts. You define an entity type called Parts, which includes Row and Column attributes. After each Parts entity is generated, it is sent to a Modifier block where the value of the Row attribute is randomly assigned from the discrete uniform distribution on 0 to 4. This determines the part type (because the row attribute is used to access a specific row in a data set, the values must be between 0 and 4, rather than between 1 and 5). The initial value of the Column attribute is set to 1 in the Entity Types dialog box.
An Observation Source block reads in the entire machining sequence data set, and the data model that represents that data set is passed from the OutData port of the Observation Source block to the InData port of the Dataset Holder block where it is held until needed. You can display the machining sequence data set in the top left of Figure 1 by connecting the OutData port of the Dataset Holder block to the InData port of a Table block. Each row in the data set represents the machining sequence for a particular part type. The end of the machining sequence is indicated with a missing value "." in the sequence data set. In the Dataset Holder block, one query output called NextStation is created. The value to be returned by this query (Target Type) is of type Number. Because the default values for the Row Index and Column Index fields are blank, the row and column values are entity-dependent and are pulled from the InRow and InColumn ports of the Dataset Holder block.
When a Parts entity flows into the Switch block, it is routed either to one of the four stations for processing or to the Parts Depart compound block (signaling that it has completed its machining sequence). The InSwitchValue port of the Switch block is connected to an output port of the DataSetHolder block called NextStation. When machining at any station is complete, the Parts entity attribute Column is incremented by 1 (see the Formula block labeled IncrementColumn). The Extractor block uses this updated value to determine the next station in the sequence by passing the Row and updated Column attribute values as inputs to the InRow and InColumn ports of the Dataset Holder block.
The value NextStation is then passed to the Switch block to route the entity to the correct station. When machining is complete, the value extracted from the DataSet Holder block is ".". When "." is passed to the Switch block, the entity is forced to be routed out the OutDefault port of the Switch block because the value "." does not match any of the defined case values. The completed parts are routed to the Parts Depart compound block, which computes the total number of parts processed.
In this example, the Dataset Holder block is used to hold a data set that is used repeatedly by all entities. An alternative is to store the information in the machining sequence data set as attributes on the entities, but that would result in the same data being stored multiple times.