Non-Evacuation Movement in a Cafeteria

Reading Time: 5 minutes
Created with software version: 2023.3

To follow along with this tutorial, download the cafeteria.pth model here.

1. Introduction

Pathfinder was originally created as a tool for evacuation-based pedestrian simulation. Throughout its lifecycle, users have realized its capabilities to also create non-evacuation scenarios. Examples include customers shopping at a mall, passengers finding a gate at an airport, and health professionals tending to patients at a hospital. These ambitious circulation-based simulations can be approximated through some advanced techniques in Pathfinder. This article will illustrate these techniques through a comparatively simple example of patrons grabbing a meal at the cafeteria shown in Figure 1.

path scrn cafeteria overview
Figure 1. The cafeteria model discussed in this article has multiple food and drink stations, cashier stands, and a table room. Download the .pth file at the bottom of this page

2. Entry

For a non-evacuation scenario, we need to consider the manner in which Occupants path ui icon occupant single are brought into the simulation environment since they would otherwise be placed in position during the alarm. Additionally, it is important that their entry be distributed over time to better approximate the interspersed arrival times of patrons.

This model uses a starting room, shown in Figure 2, for the Occupants to enter the area they will circulate through. There are 250 Occupants created in the "Waiting Room" outside of the cafeteria, in a part of the model that has no significance on the behavior of this scenario. This Occupant Group path ui icon occupant group is made up of multiple Behaviors path ui icon behaviors which each have a modified Initial Delay. A uniform distribution between 0 and 300 seconds across all Behaviors ensures that it will take 5 minutes for the entire Occupant Group to enter the cafeteria.

path scrn cafeteria entry
Figure 2. Occupants enter from the Waiting Room

3. Ticketing

There are various forms of queuing which involve Occupants waiting to either obtain or exchange objects or information. These Occupants must wait in the appropriate food line to grab their plate, add a beverage, and then wait in a cashier line to pay for the meal. These examples of exchange-based queuing can be referred to as ticketing. In some ticketing scenarios Occupants will have a preferred destination (such as a pre-determined meal they want) while others require checkpoint optimization (choosing the fastest line to pay for their meal).

3.1. Preferred Destinations

To send Occupants to the appropriate food line, Behaviors are used to pre-determine which line they will go to. These Behaviors specify which room they should enter to obtain their desired meal. In this model, the Occupant Group is set to evenly distribute the Behaviors among the Occupants. Each Behavior has a unique first property which dictates which line they enter before following a common set of steps. The unique "Goto" step assigns them to a particular food station.

Food stations are drawn as separate rooms to ensure proper queuing. The width of the rooms is kept narrow, and doors are placed at the entry and exit points of the queue. With these limitations, two Occupants cannot stand shoulder to shoulder. The room uses a Speed Modifier of 0.5 to simulate the Occupant moving at half speed while collecting their utensils and tray from the station. At the end of the room is a Waypoint path ui icon waypoint that the Behavior directs Occupants towards after entering the room. This keeps the Occupant moving forward until a Wait Period path ui icon wait period where the Occupant receives their meal from the kitchen staff. Contour Plots can quickly show the areas where Occupants are waiting once the simulation has been compiled, as seen in Figure 3.

path scrn cafeteria ticketing
Figure 3. The Occupants are waiting in the food, beverage, and cashier queues. A Usage [Accumulate] Contour Plot visualizes the amount of traffic built up over time

3.2. Checkpoint Optimization

Once the Occupant has their food and beverage, they will need to pay for their meal. The Occupant does not have a preference for a particular cashier and instead prioritizes their choice on perceived wait time. Therefore, the "Go to Cashier" step has all 4 cashier rooms listed as possible destinations, and the Occupant will use the Locally Quickest algorithm to make their decision. Once in front of the cashier, the Occupant must spend time during the payment transaction. This must be done by modifying the Flowrate of the "Entry" door to each of the "Cashier" rooms

There are Thin Walls path ui icon thin walls drawn around the cashier stations. This is to help keep the Occupants in a single file line, much like the rooms did in the food stations. Here, we do not want to create separate rooms because there is no need to move slower than usual while queuing.

You may have noticed that the salad station and beverage stations were similarly modeled, since they also have multiple paths for the same objective.

4. Exit

At this point, the Occupants can now enter the "Tables" room and wait for 10 minutes as they eat their food. This is the final step in each of the Behaviors. With no more specified instructions, Occupants are now free to use any of the Exits path ui icon exits.

5. Additional Notes

  • By controlling the cashier transaction through an artificial flow rate, we introduce a scenario where some occupants are able to walk past the cashier without any delay. This occurs when occupants approach the entry without anyone immediately in front of them. For instance, the first person to reach the cashier walks through immediately. This is due to the natural behavior of the flow rate parameter.
  • The limited Flowrate must be applied to the "Entry" doors and not the "Exit" doors in the checkpoint optimization scenarios. If it were applied to the "Exit" doors, Occupants would not be aware of the increased wait time and would have incorrect prioritization on closer queues.
  • Waypoints cannot be used in checkpoint optimization scenarios because Occupants currently cannot choose a Waypoint from a grouping.

To download the most recent version of Pathfinder, please visit the Pathfinder Support page and click the link for the current release. If you have any questions, please contact

Related Tutorials