Page 239 - ExtendSim User Guide
P. 239

Batching and Unbatching 213
Batching
☞ The BatchQuantityIn connectors will not be visible on the Batch block’s icon unless Use quantity input connectors has been checked in the block’s Options tab.
Batch on Demand model
You may want batches to be made in a time-dependent fashion, such as based on the time of day or on a periodic basis. The Batch block’s demand connector can be used to control when items are pulled into or sent out of the block. For example, if the model represents filling a truck with boxes, you can signal the demand connector to stop the batching at the end of the day or when another truck arrives at the loading dock. The batched item (the truckload of boxes) is then created and released. In this example model:
• ThetopCreateblocksendsavaluethattriggerstheBatchblock’sdemandconnectorat scheduled times, every 5 seconds.
• The Options tab of the Batch block is set to Use quantity input connectors. Set batch size: by first item at each connector and Start batch when value at demand  0.5.
• TheBatchblock’squantityinput(BatchQuantityIn),isconnectedtotheL(length)outputon the Queue block.
With these settings and connections, the Batch block will create a batch every 5 seconds, the size of the batch is dependent on how many items are available to the Batch block when it cre- ates the batch, and items will be allowed into the block only when demand is triggered.
The information about when items arrive and the size of the batch is recorded by the History block and displayed in its cloned table.
Batch on Demand model
☞ By default the History block clears its information each time the model is saved. A choice on the block’s dialog allows you to Save item history with model, but that option can cause the model to become quite large.
Properties when items are batched
As described in “Item properties” on page 120, items can have properties such as attributes and priorities. When items are combined into a batch, their properties need to be combined as well.
Discrete Event


































































































   237   238   239   240   241