Page 237 - ExtendSim User Guide
P. 237

Batching and Unbatching 211
Simple Batching model
The model shown at right joins one “Open Box” with three “Bottles”; they then travel as one item to be shipped. For this model, the Batch block’s behavior is set to Batch items into a single item. The items are joined by the Batch block according to settings in the table in its dialog. The Batch block will not release the batched item until it has received one item (a box) from the top input and three items (bottles) from the bottom input.
Batching by matching items
Simple Batching model
Selecting the Match items into a single item option in the Batch dialog allows you to specify an attribute the items must match and a different attribute that determines the batch size. With this option, each batch will be composed of items whose matching attribute value is the same; the batch size attribute of the first item in the batch determines how many items are in the batch. With this option, it does not matter which input connector the items arrive at. As items arrive to the Batch block they are segregated based on their matching attribute value until the total number of items in that group equals the batch size attribute. When this occurs a batch is created and the item representing the batch leaves the block.
Matching Items model
The Matching Items model shown below simulates a refurbishment process for police cars. As the cars arrive, they are assigned a consecutive “serial number” by the Information and Set blocks. The Information block counts each car in order and outputs that number to the Set block, which assigns the count number as the value of the Serial Number attribute. For instance, this causes the Serial Number attribute for the second car to be assigned a value of 2.
The engine is then separated from the car by an Unbatch block. (When items are unbatched, you can specify what the block should do with their properties. This is accomplished by selecting an Action for item properties in the Unbatch block’s Properties tab, as shown at right. Actions are discussed in “Properties when items are unbatched” on page 218.)
Properties tab of Unbatch block
These two components (the engine and the car) are
refurbished individually. When both components are finished being refurbished, the engine is reassembled into its original car by matching them together in a Batch block set to Match
Discrete Event

   235   236   237   238   239