This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Comparing Queuing Strategies

Overview of Example

Have you ever been in a supermarket checkout and wondered why you are in the slowest line? This example shows how queuing systems can be modeled in SimEvents for this type of application. Two parallel versions of a simple model of a four register supermarket counter are presented - one that uses four separate queues and one with a single "serpentine" queue that feeds all registers.


To begin, we model random customers entering the checkout area using entities in SimEvents to represent customers that can be generated at random time intervals following an exponential distribution. During generation we specify a random duration (also exponentially distributed) that a customer will take to be served at a register by assigning a special attribute to the corresponding entity. The average service time is set at 2 mins and the average arrival time is set at 1 min. Each customer is cloned after generation so that the two different line configurations can be exercised identically.

Four Separate Queues

To model the case where four separate queues feed the four cash registers, we use a Switch that routes customers to the shortest of the four Queues. Each Queue then feeds a Server representing a checkout register. This Server holds the customer for the amount of time that was setup during generation.

"Serpentine" Queue

To model the "serpentine" queue, we use a single Queue that feeds the four registers via a Switch that routes customers to a free register when one becomes available.


The configuration with the four queues on average results in longer wait times. This example shows the modeling of queueing systems in SimEvents for evaluating applications such as shortest lines.