In this task, you will create a Statistics Collector that records the time required for an operator to pick each item. A pick is the time it takes an operator to travel to an item, load it, and unload it at their station:
This task is based on the same model that was used in the Task 1 of this series. For information on how to open the model, please refer to that task:
In this step you will add events to the statistics collector. To do this:
So far, you have seen that a row value is connected with a row in the table. In addition to the row itself, each row value is connected to a set of labels. These labels are called Row Labels. Row labels allow you to have values associated with each row, but that aren't necessarily visible in the table. Row labels are usually set using the On Row Adding and On Row Updating triggers. They are usually used as part of a column's value.
In this step, you listened to two events. These two events signify the beginning and end of a single pick. Both events use the token that is going through the associated activities as the row value. This means the table will have one row per token. The second event finishes the row.
This statistics collector will use the first event to create a row, and use a row label to record when that row was created. In this way, each row can store the pick start time, without showing it in the table. The statistics collector will use the second event to record the duration between the first and seond events.
In this step, you will add columns to the Statistics Collector. To do this:
Model.time - data.row.PickStartTime
In this step, you added two columns: Type and PickTime. The Type column is straightforward; when a new pick begins, a new row is added to the table, and this column will record the Type of the item being picked. In the next step, you will create a row label called PickStartTime, and set its value when the row is added.
The PickTime column won't be set until the second event fires. At that point, this column will be set to the difference between the current time and the PickStartTime label.
In this step, you will add triggers to the Statistics Collector. To do this:
"PickStartTime". Set the value of the label to
You can right click on the PickTimeByType collector in the Toolbox and select the View Table option. If you reset and run the model, you will see the table record the output by type each hour. You may wish to run the model as fast as possible to see the data populate.
The statistics collector listens to the On Entry of the Travel to Item activity. When that event happens, it yields the token as the row value. The statistics collector adds a row for that token, and records the Type value. In addition, the statistics collector records the current time on a label called PickStartTime. Since each row has its own labels, each row records when it was added in that row's PickStartTime label.
The statistics collector also listens to the On Exit of the Unload Item activity. When that event happens, it yields the token as the row value. Since there is already a row for that token, the statistics collector doesn't need to add a new row. However, the PickTime column is connected to this event, so the statistics collector updates the value of that column. That column value uses the current time and the PickStartTime row label to calculate the pick time. This second event also finishes the row.
Now you will create a chart to show the data in the statistics collector as a box plot. To do this:
If you reset and run the model now, the box chart will show the data in the statistics collector. As before you may have to run the model for some time to see the results.