Batch Block
The Batch Block (or Batching Block) accumulates items of the same type, then groups them together. (If you'd like to accumulate items of different types, learn about the FlexiBatch Block.)
While the Batch Block acts like a queue, holding items until enough are present to build the batch, it cannot process any item that comes to it like the queue does with the Allow All Items setting. Each item type must be added to the block and minimum and maximum batch sizes must be set.
In the image above, you can see the parameters in the Batch Block:
- Minimum Batch Size is the smallest acceptable batch.
- Maximum Batch Size is the largest acceptable batch, and must be the same or larger than the minimum batch size.
- Set Priority To is an optional parameter that allows you to set the priority of each item that is created. Each item's priority is set by default to 5, the highest priority being 1 and the lowest 10. See Item Priorities for more information.
Once items have been combined into a batch, they will remain there unless they are unbatched by a Queue Block. This is accomplished by checking the "Unbatch all" checkbox in the Queue Block.
Nested Batches and Unbatching
For both the regular Batch Block and the FlexiBatch block, you can have batches within batches. An example for the regular batch block might be something like this:
- Put four sandwiches into a bag.
- Put six bags into a box.
When using the Batch Block, you would batch four sandwiches into a batch, but the item in the model would still have the same color animation dot as a single sandwich. Then you could batch six batches of four sandwiches into a box, creating a box that contains a total of 24 sandwiches, which is six bags times four sandwiches per bag. When you're only working with a single item type, sandwiches in this case, the Batch Block is sufficient.
In the image above, the first Batch Block puts four sandwiches into a bag, and the second Batch Block puts six of those batches of four into a box. The first queue, named "Boxes," just counts the number of boxes that have gone through, one in this case. The next queue, named "Un-Box," has the "Unbatch All" option checked, and it unbatches only the top-level batch, in this case, the box. The count shown is the six bags that were in the box. The final queue, named "Un-Bag," also has the "Unbatch All" option checked, and it unbatches the original batch (the bag) and shows that we end up with 24 individual sandwiches, after taking the bag from the box, and the sandwiches from the bags.
If you're looking to batch different types of items, learn about the FlexiBatch block.
Was this helpful?