Queue

The buffer between components. Input and output.

How it works#

The Queue holds entities that have arrived but cannot be served yet. It models anything with a bounded waiting area: a thread pool's work queue, a connection pool, a message broker's backlog, a line of customers at a counter.

A queue is passive — it never initiates anything, it only answers the components on either side of it. Entities leave in the order they arrived. When a consumer is already waiting the moment an entity arrives, the entity is handed straight over without being stored: an empty queue costs nothing and adds no delay.

When the queue is full, an arriving entity is refused on the spot. The component that pushed it — a generator, a server or a delay — counts it as dropped and carries on. A full queue is where a model loses work, and the capacity is what decides how much.

A queue must have an incoming connection; the simulation will not start while one is missing. Its outgoing side is optional, but nothing drains a queue by itself — a queue with no consumer simply fills to capacity and refuses everything after that.

Settings#

Capacityentities — default 10
The most entities the queue holds. It can be changed mid-run: lowering it turns arrivals away until the queue has drained below the new figure, and keeps everything already in it.
Exit RuleFIFO
The order in which entities leave the queue. First-in-first-out is available today; LIFO is planned.
Overflow PolicyBlocking (Wait)
What happens when an entity arrives at a full queue. Whichever option is shown, the queue today refuses the arriving entity and the producer drops it. Overwrite Oldest, and a producer that waits for space, are planned.

Capacity is the dial you will reach for most, and it can be changed mid-run. Watch what that trade actually buys: a bigger buffer absorbs bursts and cuts the drops, but the entities it holds are waiting, so the time entities spend in the system stretches. Sizing a queue is choosing between dropping work and delaying it.

Statistics#

  • Queue length over time — how many entities the queue held on average over the chart window, plotted as the simulation runs. Good for spotting bursts and how long the queue takes to recover from one. A line that sits at the capacity means the buffer is the bottleneck; one that sits at zero means it is larger than it needs to be.
  • Mean length — after a batch run, the time-average length per run, with a confidence interval.