Page 171 - ExtendSim User Guide
P. 171

Jockey model
In this model customers arrive from the Create block and are routed through the Select Item Out block to the shortest of three possible queues.
Jockey model
As customers wait in the queues it is possible for the lines to move at different speeds. The last customer in each queue has the option to move to another queue if a shorter line opens up.
Sorting items using the Queue Equation block
The Queue Equation block (Item library) is used to release items in an order that is based on a ranking rule. Items enter the queue and are stored in the order of their arrival (FIFO). However, instead of the items leaving in FIFO order, an equation in the block’s dialog determines which item (if any) should leave the queue next. The equation is automatically calculated once for each item in the queue and the results are used to assign a ranking for each item. The item with the best ranking is the one that is allowed to leave next.
How the block works
Importantly, only the equation results from the winning item are used for that particular calcu- lation cycle. For example, if the queue currently holds 10 items, the equation will be calculated 10 times and 10 individual sets of equation results will be collected. But only the equation results from the item with the best ranking will be used; results from the other 9 items are dis- carded.
So that the item leaving next will be properly chosen, by default a new calculation cycle is ini- tiated every time an item enters or leaves the queue or when a value input connector receives a message. To override the default behavior, the factors that initiate calculation cycles can be controlled through check boxes in the block’s Option tab.
The tables below describe a number of equation input and output variables that are unique to the Queue Equation block. Along with the common input and output variables described in “Equation components” on page 696, these variables are designed to help users write equations that will properly select the next leaving item. In particular, the QEQ item rank variable is used to assign a ranking to each item in the queue.
☞ At least one QEQ item rank output variable must be defined for this block to function properly.
Queueing 145
Sorting items using the Queue Equation block
Discrete Event


































































































   169   170   171   172   173