Page 238 - ExtendSim User Guide
P. 238

212
Batching and Unbatching
Batching
items into a single item, Match on attribute: Serial Number, and Get batch size from attribute: Components.
Matching Items model
For a similar model that uses the Queue Matching block to match items based on an attribute value, see “Matching items using the Queue Matching block” on page 150.
Batching a variable number of items
Sometimes the number of items required to create a batch changes during the course of the simulation. For instance, outside factors could determine how many items go into each batch, or you may want batches to be made in a time-dependent fashion. As shown in the following two models, the Batch block’s Options tab allows you to manipulate the size of batches through quantity input connectors or through a demand connector.
☞ For additional examples of dynamically setting batch size, see also the “Batch and Unbatch Variable model” on page 218 and the advanced batching models “Equation(I) Controls Batch” and “Queue Eqn Controls Batch” that are located in the folder \Examples\Discrete Event\Batching.
Batching Variable model
This example model uses a Batch block’s quantity input connector to determine the size of a batch. A Random Number block (Value library) sets random batch sizes of two to five items. In the Batch block’s Options tab, Use quantity input connectors is checked to enable the BatchQuantityIn connector and Set batch size: dynamically as batch is created is selected. The output of the Random Number block is connected to the BatchQuantityIn connector on the Batch block. These settings cause batches to be created that require a variable number of items. The information about the size of the batch can be saved on an attribute specified in the block’s Options tab.
Batching Variable model
Discrete Event


































































































   236   237   238   239   240