Page 189 - ExtendSim User Guide
P. 189

Routing 163
Items going to several paths
• Selectconnector.Thevaluereceivedattheselectconnectordetermineswhichoutputis chosen. The block’s dialog has an option for setting which value chooses the top output; the default is 0. The lower connectors will be numbered sequentially after the top connector. That is, if the top output is chosen by a select value of 1, the second output will be numbered 2, the next lower one would be numbered 3, and so forth. In that case, a value of 3 at select would cause the item to go to the third connector from the top. Since the block will hold the item until there is capacity downstream from connector 3, this option can cause blocking.
☞ See “Item library blocks” on page 313 for some precautions when using this option with a Get block.
• Sequential.Outputsareselectedoneaftertheotherinsequentialorderstartingfromthetop; this is also known as a “round robin” selection. When the option If output is blocked: item will try unblocked outputs is chosen, the block will try the next connectors sequentially. When If output is blocked: item will wait for blocked output is used, the block will select an output and the item will wait until that output is able to accept the item; this can cause blocking.
☞ The Select Item Out block expects integer values for comparison and will truncate non-integer values. For example, if select connector is chosen as the selection condition, the numbers 0.001 and 0.999 received at the SelectIn input would both be truncated to a 0.
Blocking conditions
The Select Item Out block is a decision-type of block; its default is to pull in the item and then determine the path that the item will take. In some situations, the selected output path may be blocked and the selected item will have to wait to leave. Some selection conditions can cause the items behind a selected item to be blocked:
• Property
• Random(whenIfoutputisblocked:itemwillwaitforunblockedoutputischosen)
• Select
• Sequential(whenIfoutputisblocked:itemwillwaitforunblockedoutputischosen)
For the random and sequential selection conditions, the ability to choose what happens if the output is blocked is useful for certain modeling problems. For instance, in the Simple Routing model shown below, if the top Queue block is designated to get the item, but it is blocked, the Select Item Out block will route the item to an unblocked Queue.
Predicting the path of the item before it enters the block
As mentioned above, an item can be pulled into a Select Item Out block but not be able to pro- ceed because the downstream path is blocked. An alternative to this situation is to cause the item to wait in an upstream queue, rather than in the Select Item Out block. This is accom- plished by checking Predict the path of the item before it enters this block. When this is enabled, the Select Item Out block will query upstream to determine the properties of the next item to arrive. It then checks to see if the appropriate downstream path is clear. Only if the item can be sent out the desired output will the item be pulled in. This guarantees that the item will not get “stuck” in the Select Item Out block.
☞ This setting requires that any properties used to make the selection have to be set before the item begins to move into the Select Item Out block. For example, a Queue is necessary between a Set block and a Select Item Out block.
Discrete Event


































































































   187   188   189   190   191