# Circulation Movement Using Queues

Created with software version 2021-3

## 1. Overview

This tutorial is intended for event planners and other professionals interested in non-evacuation movement models in Pathfinder. It demonstrates how to create non-evacuation movement using the Queues feature introduced in Pathfinder 2021.2. Users will see examples of complex Queues, create complex circulation Behaviors, and couple Queues and Behaviors to create circulation movement in a model.

## 2. Before Starting

Before beginning this tutorial:

• Read the Simple Queues tutorial to learn the basics of Queues in Pathtfinder.
• Read through the Queues section in the User Manual.

## 3. The Model

The model provided above is a cafeteria modeled in Pathfinder using Queues. The pre-created Queues model several Queues that would be commonplace inside of a cafeteria, including food lines, beverage/condiment areas, and cafeteria table seating. 146 Occupants enter the model over 500s via an Occupant Source on the right-hand side of the model. There are 4 potential exits, including the door through which the occupants enter. By the end of this tutorial, Occupants will enter the model via the Occupant Source, circulate through the food serving area, checkout at the cashier, sit to eat their food, then leave the model through one of the exits.

## 4. Complex Queue Examples

This section will briefly cover some slightly more complex Queue examples than those covered in the Simple Queues tutorial. For simpler examples, check out that tutorial.

### 4.1. Tables

The Tables Queue is made up of a single Path with multiple Service Points. The Path is set up with the Force Follow Path and Visible parameters disabled. This hides the Path and allows Occupants to move just to the end of the Queue before moving to a Service Point. This allows for a more realistic movement where Occupants do not line up to get a seat. Instead, the Occupants appear to move directly to a Service Point and sit at a table.

Shown in Figure 1, there are Service Points representing seating at large cafeteria table, as well as some 2-person tables and cafe style wall seating.

The Salads Queue is a Queue Group made of 2 Queues, each with 1 Path and 2 Service Points. This Queue is similar to the Queue Group created in the Simple Queues tutorial, however this provides more Service Points for Occupant interaction to simulate Occupants serving themselves a salad at a salad bar.

### 4.3. Trash

The Trash Queue is a Queue Group made of 3 Queues, each with 1 Path and 1 Service Point. This Queue showcases that just because Queues are in the same Queue Group does not mean that they need to be close to each other geometrically. When Occupants are sent to the Trash Queue Group, they will move to one of the 3 Queues near exits to simulate Occupants throwing away their trash prior to leaving the cafeteria.

## 5. Complex Circulation Behaviors

If the provided Cafeteria Model simulation is run as is, the Occupants will enter the model and then immediately exit through the nearest exit door. This is because the Occupants only have the one GoTo Exits Behavior to follow. They will need more Behaviors in order to simulate circulation movement. This section will cover creation and implementation of Behaviors designed to create complex circulation movement in the provided model.

### 5.1. Restaurant Behaviors

The main reason for Occupants entering this cafeteria would be to visit one of the 5 main restaurants present, highlighted in Figure 4.

To create Behaviors for each of the restaurants:

1. Right-click the Behaviors root node in the Navigation View.
3. Name the new Behavior Sandwiches, then click Ok.
4. Repeats steps 1-3 to create 9 more Behaviors with the names Pizza, Entree, Grill, Salad, Beverages, Beverages Refill, Condiments, Checkout, and Tables.

The model should now have all the behaviors shown in Figure 5. Many of these Behaviors will be set up in later sections. This section will focus on the 5 main "restaurant" Behaviors - Sandwiches, Pizza, Entree, Grill, and Salad.

For each of the 5 "restaurant" Behaviors:

1. Select the Behavior in the Navigation View.
2. Click the arrow in the dropdown next to Add Action.
3. Select the GoTo Queues Action.
4. Click the hyperlink next to Queue.
5. In the searchbar, search for the Queue Group with the same name as the Behavior.
6. Select the Queue Group from the list, then click Create.
1. Delete the GoTo Exits Action from the Behavior.
2. Select the Behavior in the Navigation View.
3. Click the arrow in the dropdown next to Add Action.
4. Select the Change Behavior Action.
5. In the Target Behaviors dialog, click Clear, then Clear all rows.
6. Deselect Display only non-zero rows.
7. Enter the Distribution shown in Figure 7, then click Create. Note that this distribution should not be applied to the Salad Behavior. That Behavior should have a 60% Beverages, 40% Checkout distribution to avoid a circular Salad Behavior loop.
8. If needed, re-order the Actions in the Behavior so that the GoTo Queues Action is the top Action.

After doing this to all 5 "restaurant" Behaviors, the model should have the following Behaviors:

### 5.2. Secondary Item Behaviors

After Occupants have gone through a Queue and received their meal, they should proceed to a number of secondary Behaviors. These secondary Behaviors are represented by the Beverages, Beverages Refill, Condiments, and Checkout Behaviors. These Behaviors are created similarly to the "restaurant" Behaviors, however their distributions are different. To create these Behaviors:

1. Like in Steps 5-10 of Section 5.1, add a GoTo Queue Action for the appropriate Queue Group for each Behavior.
2. Delete the Exit Action from each Behavior.
3. Add a Change Behavior Action to the Behavior based on the following distributions:
1. The Beverages Behavior should change Behavior 100% to Checkout.
2. The Beverages Refill and Checkout Behaviors should change 100% to Tables.
3. The Condiments Behavior should change to the distribution shown in Figure 9.

After creating the secondary item Behaviors, the model should have the following Behaviors:

### 5.3. Terminal Behavior

The last Behavior to create is, of course, the Terminal Behavior. This is the Behavior that all Occupants will encounter that will eventually trigger their terminal Action in the model which, in most cases including this one, will be an Exit Action.

The Terminal Behavior in this model will be the Tables Behavior. After getting and paying for their food, Occupants should proceed to a seat at a table to eat, optionally get a refill of their beverage, then throw away their trash and leave the model. To create this Behavior:

1. Select the Tables Behavior.
2. Like in Steps 5-10 of Section 5.1, add a GoTo Queue Action for the Tables Queue Group.
3. Delete the Exit Action from each Behavior.
4. Add a Change Behavior Action with a 15% change to the Beverages Refill Behavior and 85% to No Change.
5. Add another GoTo Queue Action for the Trash Queue Group.
6. Add a final Exit Action targeting all exits.

After this, the Behavior should look like Figure 11.

With this Behavior created, all Behaviors are now configured and ready for use.

## 6. Complex Circulation Movement

With all Behaviors created, the only thing left to do is to assign Occupants an initial Behavior and allow them to naturally move through the model.

### 6.1. Initial Distribution

To set the initial Behavior distribution:

1. Select the Entry Source Occupant Source in the Navigation View.
2. Click the hyperlink next to Behavior in the Properties Panel.
3. Enter the distribution shown in Figure 12.

This distribution simulates that most Occupants entering the model will head to one of the 5 "restaurants", but a few of them may enter solely to grab a beverage or something from the condiments counter. These Behaviors will be applied as soon as Occupants enter the model.

## 7. Results

The cafeteria model is now configured. Click the Run Simulation icon to run the simulation. In the Results window, click the play button to view how Occupants move through the model.

As can be seen in Figure 13, Occupants enter the model, collect their food, beverages, and condiments, move through the checkout Queue, sit down to eat, then throw away their trash and leave the model. The specific percentage of Occupants moving through each Queue can be controlled by altering the distributions that feed the Queue.

The Accumulated Usage contour is currently the best way to visualize which Queues Occupants use the most. Figure 14 shows the Accumulated Usage contour for this model. It shows that the Condiments Queue is the most lightly used Queue while the 2 central tables in the Tables Queue are the most heavily used. It also shows that while the tables are heavily used, the bar style seating in the corner of the model are rarely used by Occupants.

As always, these results are only as good as the engineering assumptions put in to the simulation set-up. Circulation models have a lot of variables associated with them, each of which compounds error. In this tutorial, the primary variables introduced that affect circulation movement are the percentage distributions in the Change Behavior Actions and the wait times at Queue Service Points. Changes to these variables will have the largest effects on movement through Queues in the model. Keep this in mind for future models using this method.

## 8. Conclusion

Users should now have an understanding of how to create Circulation Movement models in Pathfinder using the new Queues feature. Users should also be more familiar with some more complex configurations of Queues and with the more complex interactions of Behaviors possible with Pathfinder.