Skip to content

Queue

A Queue is a waiting area where entities sit between steps with nothing being done to them. Use one whenever you need a named buffer with a set size and a chosen release order: a line at a counter, a stack of work waiting for the next station, or parts waiting to be assembled.

An activity already carries its own small input and output queues, but those hold only a capacity number and release first in, first out. Reach for a Queue node when you want to choose the order entities leave in, charge for the time they wait, or send a reorder signal when the queue runs low.

The Queue node

Capacity is the most entities that can wait in the queue at once. The default of 999 is effectively unlimited for most models; lower it when the real waiting area has a fixed size and you want entities to back up upstream once it is full.

The Queue Discipline decides which waiting entity leaves next:

DisciplineWho leaves next
First In, First OutThe one that has waited longest (the default)
Last In, First OutThe one that arrived most recently
By AttributeThe highest or lowest value of an attribute you choose
Earliest Due DateThe one whose due-date attribute is soonest
Oldest in SystemThe entity that has been in the whole model longest
RandomA waiting entity picked at random
Weighted RandomRandom, but weighted by an attribute value

For By Attribute you also pick the attribute and whether the highest or lowest value goes first, so a priority queue is simply By Attribute on a priority attribute. Weighted Random takes an attribute and a table of weights.

On the Cost tab you can set a cost per unit of time. Every entity adds to the model’s cost for as long as it waits, counted as non-value-added time in Impact Analysis.

  • Logic runs action logic on entities as they pass through the queue.
  • Triggers broadcast a signal when the queue’s contents drop below a level you set, which is how you set off a resupply (see Ordered Arrival).

Starting a run with entities already waiting

Section titled “Starting a run with entities already waiting”

The Queue node has no “start with entities already in it” field. To begin a run with a stocked buffer, send an arrival straight into the queue so it fills at the start of the run, or place the entities with action logic.

Turn on bucket diagnostics on the Queue node’s Advanced tab and ProcessModel tracks how full the queue is over time. After a run, the Output Report’s Queue Diagnostics view shows a heatmap of the busy periods across the week, so you can see when and where entities pile up.

The Queue Diagnostics heatmap

Contents('Queue') reads how many entities are waiting in a queue at any moment, so logic can branch or report on its length.

LegacyHow this worked in the previous version

Storages are waiting areas, stock places, etc. where entities can wait for further processing. Storages are useful when controlling the order in which entities are allowed to move on through the model. Since an activity provides the option to have a built-in input and output queue, a storage is for visual purposes or to model special queuing conditions such as multiple activities sharing a common input queue.

What is a Storage?

What is a Storage?

**Name **The name of the storage (e.g. StockRoom ).

**Capacity **The maximum number of entities that can occupy this storage (1 - 999,999). Scenario Parameters may also be used in this field.

Queuing order The order in which entities are queued to leave the storage: none, first-in first-out, last-in first-out.

  • **None **- Entities that have completed their Action Logic are free to process any routing logic independent from other entities that have finished their Action Logic. Will process FIFO if no other routing requirements are enforced (i.e. Conditional Routes, Get with a priority, etc.).
  • First In, First Out (FIFO) - The first entity completing its Action Logic must be routed first.
  • Last In, First Out (LIFO) - The last entity completing its Action Logic must be routed first.

Object Type Allows the type of object to be changed from Storage to something else.

**Action **Develop customized behavior for entities at an storage. Logic can be developed to report statistics, control processing, collect information and a host of other items. Variables, entity attributes, systems information and if-then statements allow expansive capabilities to be accessed from the action tab. For additional information see Action Logic.

What is a Storage?

Having an initial quantity or inventory of entities at a storage area or queue when the simulation begins.

How do I Initialize Storage & Queue Contents?

  • Connect the desired entity to the activity or storage and select Periodic as the arrival type.
  • In the Periodic arrival’s properties dialog, enter zero (0) in the Repeat every field and the First time field. Enter the quantity to arrive in the Quantity per arrival field.

Example: At the beginning of a process, a pre-inspection storage is initialized with 1000 units of inventory.

TO DO: Create the Periodic arrival connection and enter the Quantity per arrival. Enter zero (0) in the Repeat every and First time fields.

Pull entities out of a queue based on a priority by using a real or contrived resource as the enabler to move down the routing. This could be based on dollar value, how much time they have spent in the system or even the time of day.

How do I Pull Highest Priority Entities First from a Queue?

  • Place a priority on entities before they arrive at the queue.
  • Pull the highest priority items from the queue by using a resource to capture by priority.
  • Free the resource so that it can capture the next entity

Example: Two types of orders are placed in a storage container. High priority items represent orders for greater than $1,000 and should be processes first.

TO DO: Create a attribute named a_Priority (this may be any name). Assign the priority to the entity on the arrival route before it arrives in the storage. From the storage, GET a resource as the enabler and use the priority of the entity as the priority to GET the resource.

To learn more about Resource Priorities, see Resource Assignments.

The last entity to enter the storage is the first to exit or leave. Thus entities entering 1, 2, 3 exit in the order 3, 2, 1. Useful when it is important to model entities that are processed last in, first out.

How do I pull Last In/First Out (LIFO) from a Queue?

  • Select the storage where you want to use the LIFO method.
  • Click on the Queuing order list box on the General tab of the properties sheet and select LIFO as shown below.

Example: Orders arriving in a basket (the storage) are processed last in, first out. The last order to be placed is pulled from the top of the stack to be processed.

TO DO: Select the storage and on the General tab of the properties sheet, select LIFO from the Queuing order list box.