|Building a Model with Elementary Components|
Each type of queue can behave as a buffer. This means that when the transaction first arrives, the queue will not try to route it to a nonbusy component but will wait for a request for transaction message from a downstream component before sending it on. In addition, you can have the queue behave as a buffer for some downstream components and as a standard queue for others. Those components in the Don't push to listbox in the Queue Control Panel (see Figure 2.5) define components for which the queue acts as a buffer. Those components in the Push to listbox define components for which the queue acts as a standard queue.
The LIFO and FIFO queues order transactions according to their arrival time. The Priority Queue uses the value of the numeric transaction attribute named "priority" to determine placement location in the queue. This default name can be changed. The priority attribute can be assigned to a transaction by the Modifier component, discussed in the section "Logic Components". By default, the smaller the value of the attribute, the higher placement in the queue and the sooner the element will leave the queue. Although this is the default priority order, it can be changed by unselecting the "Ascending Priority Order" check box on the control panel shown in Figure 2.5.
When each transaction leaves the queue, it has an attribute with the time it spent in the queue. The name of this attribute can be specified in the queue control panel. See Figure 2.5 for where to give the attribute name. By default the attribute name for all queues is "queue."
The following documents the logic of the Queue components.
If the queue is off or at capacity, the transaction flows out the Balk node; otherwise, it sends the message are you busy to the nodes on arcs directed away from the queue and listed in the Push to list box. If FALSE is returned, then route the transaction there; otherwise, queue the transaction.
If the queue is not empty (size > 0), then remove the next transaction according to the type of queue and send it out the arc directed to the component that made the request; otherwise, return FALSE.
always returns FALSE.
|capacity||returns the queue's capacity|
|id||returns the queue's unique identifier.|
|releaseType||returns a string naming the way that the last transaction|
|was released from the balk node. Possible values are: "balk," "empty,"|
|"filter," "filterOne," and "releaseOne."|
|size||returns the number of transactions that are in the queue.|
|space||returns TRUE if there is unused capacity in the queue.|
|balk||causes the transaction at the Trigger to leave the queue from the Balk node.|
|empty||empties the queue of all transactions. Note that the transactions|
|do not leave via the Balk node.|
|filter||evaluates a formula for each transaction in the queue. If the|
|formula evaluates to TRUE, the transaction balks; otherwise, it|
|maintains its place in the queue. The formula that is evaluated should|
|be in an attribute named ''formula'' in the triggering transaction.|
|filterOne||evaluates a formula for each transaction in the queue.|
|The first transaction for which the formula evaluates to TRUE balks.|
|The formula that is evaluated should be in an attribute named "formula"|
|in the triggering transaction.|
|insert||inserts the transaction at the Trigger into the queue.|
|releaseOne||releases one transaction from the queue via the the Balk node.|
|reset||destroys all transactions in the queue.|
|start||starts the queue.|
|stop||stops the queue.|
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.