Introduction
This is an update to the previous tutorial about using Pathfinder to simulate movement in a subway station, with trains arriving and departing from the station.
In this tutorial, we first update the subway model to use queues, and then we demonstrate how triggers can be used to simulate an event and subsequent emergency evacuation.
Triggers make new capabilities in Pathfinder available to model complex sequences of behavior, including shopping and evacuation. With such features, Pathfinder is applicable to a much broader range of pedestrian movement problems.

The subway station is illustrated in Figure 1, which shows passengers on the upper platform. Our model will simulate the continuous entry of passengers into the station to board specific trains and the exit of passengers from trains that have arrived at the station.
As before:
"Our model will simulate the continuous entry of passengers into the station to board specific trains and the exit of passengers from trains that have arrived at the station. The model includes 10 trains: 6 on the upper platform and 4 on the lower platform. We assume that each train arrives and departs at a 10-minute interval. The arrival times are staggered, so that one train arrives each minute. Each train unloads and then loads 200 passengers, giving a total flow exiting the station of
200 persons/minute
or12000 persons/hour
(the same number also arrive at the station). The train loading was chosen to be consistent both with the size and number of cars in each train and with the flow capacity of the stairs and escalators." The station .dwg does not represent a real-world location.
Before Starting
- Review the previous Subway Station Circulation Model Tutorial.
- Download the Subway Circulation with Triggers zip file.
Conceptual Model
Queuing
Before describing the subway model, it is useful to demonstrate the approach using a small conceptual model. In the simple model, there are two train doors through which passengers exit and board. Passengers waiting to board form four queues, one on each side of a door, as in Figure 2.

More details of the geometry are shown in Figure 3. Passengers boarding the train first enter the queues. Since the Wait doors are initially closed, the passengers cannot leave the queue and form a line to wait in the queue path. Passengers exiting the train are modeled using a source on the Train exit/entry door. They move to the Arrive room and then to the exits. The Wait doors then open and the passengers boarding the train move to the Depart room and then the Train exit/entry door. The cycle then repeats.

Figure 4 shows the train schedule.
The train departs at 3-minute
intervals, with 10 seconds
of unloading, a pause of 2 seconds
, and then and 48 seconds
for loading.
They exit each door at a rate of 2 pers/s
.
People continuously arrive to board the train at a rate of 15 pers/min
.

Below is a video showing the simple subway queuing example.
Why Queues?
Queues can efficiently and precisely position occupants to wait for Services like each train. In non-evacuation models, it is often useful to simulate movement through lines.
Subway Model with Queuing
Geometry
The subway model is shown in Figure 5 and has five main floors:
- Floor 0 m - This is the lower platform floor. Four trains connect to this floor. Stairs connect Floor 0 m to Floor 3 m. The stairs are divided into descent (left side) and ascent (right side).
- Floor 3 m - Passengers descend and ascend from Floor 18 m to Floor 3 m using escalators. As for the stairs, the escalators are divided into descent (left side) and ascent (right side).
- Floor 15 m - This is the upper platform floor. Six trains connect to this floor. Stairs connect Floor 15 m to Floor 18 m. The stairs are divided into descent (left side) and ascent (right side).
- Floor 18 m - This floor gathers and distributes all flow from and to Floor 3 m and Floor 15 m. Both stairs and escalators connect Floor 18 m to Floor 30 m. The stairs and escalators are divided into descent (left side) and ascent (right side).
- Floor 30 m - This is the main floor level. All passengers enter and leave the station from this level.

The stairs and elevators are specified either for flow up or flow down. Figure 6 shows a detail of the flow descending from Floor 18 m, through Floor 3 m, and then down to the lower platform, Floor 0 m. The red arrows show the direction of flow. The general pattern is that the right side is ascent. At the other end of Floor 3 m, the flow is up to Floor 18 m. Floor 18 m connects to the main floor by stairs and escalators.

Queues to Board Trains
As illustrated in the simple model, queues, rooms, open/close doors, and one-way doors are used to control the flow of passengers entering and exiting trains. Figure 7 shows a combined CAD and navigation mesh view of the upper boarding platform (Floor 15.0 m).

Train Schedules
The subway schedule for the first 15 minutes is shown in Figure 8. Each train arrives every 10 minutes and delivers 200 passengers. The passengers exit the train in 10 seconds, after waiting 2 seconds for the exiting passengers to clear, the queued passengers enter the train over an interval of 78 seconds, and the train departs. Just to be clear, Pathfinder does not actually animate the train arrival and departure, the arrival and departure is simulated by opening and closing doors for the train and wait rooms.

Profiles and Behaviors
The behavior of passengers is determined by their profiles (physical characteristics) and behaviors (specified movement goals). In addition, sources are used to define the entry flow of passengers into the station and the flow of passengers exiting the trains. The profiles, behaviors, and sources used in the model are listed in Figure 9.
The profiles shown in Figure 9 assign walking speed and other physical characteristics. All passengers are assigned a speed of 1.19 m/s. See the Model Comments section for some background. The simplest approach would be to use only one profile to define the walking speed, but multiple profiles are used to assign different colors to passengers, depending on the train they are to board or if they are to exit the station. Alternately, the Pathfinder framework supports defining detailed profiles for each passenger type, for example, a "child" profile could use the child avatar and have a speed range appropriate for children, while a "young male" profile could use an avatar of a young man and have a different appropriate speed range. The approach taken in this model is a compromise between the simple and complex approaches.
The behaviors shown in Figure 9 define how the passengers will move. Passengers exiting the trains are randomly assigned to go to one of the two station exits. Passengers who are entering the station to board trains are randomly assigned to go to one of the trains, so they first proceed to any of the wait rooms associated with queuing for that train and then board the train when the wait queue exit door opens.
Each occupant source can be assigned a distribution of different profiles and different behaviors. When an occupant is created by the source, the occupant is randomly assigned a profile and behavior from the distribution.
Occupant sources, shown in Figure 9, are associated with the train doors for passenger exiting the trains and with two sources outside the station (the two long green lines in Figure 5) for passengers who enter the station to board trains.
The exit flow from the trains is periodic.
Each train has 15 doors and the exit interval from the train is 10 seconds, so a flow rate of 1.333 pers/s gives a total of 200 passengers every 10 minutes.
The sources associated with passengers entering the station (the two long green lines on Level 30 m in Figure 5) have a continuous flow of 0.1666 pers/s per train.
Since there are two sources and 10 trains, this gives the arrival of 200 passengers every minute (or 200 passengers for each train every 10 minutes).
Thus the total passenger arrival flow entering the station is 12000 pers/hr
, which
matches the total flow out of the station from the trains.

Results
An overview of the results is provided by the 2024 Subway simulation video. This shows the movement from 790 s to 880 s after the start of the simulation.
One way to look at the use of space in more detail is to plot accumulated usage contours.
Remember, complicated contour visualizations can be created in the 3D results program included with Pathfinder. Pathfinder visualizations can be saved as .pfrv files. The zip folder, {FileName}, includes a Pathfinder Results Visualization File, Subway 2024.pfrv. This file must be copied into the Subway 2024 results folder so that Subway 2024.pfrv can be opened from 3D Results. Also, 3D Results must have an associated Subway 2024.pfr (Pathfinder results file) loaded; Subway 2024.pfrv cannot determine the visualization of results that do not exist. (3D Results User Manual)
Figure 10 shows accumulated usage contours for the main floor.

Let us look in more detail at the flow rates in Stair64, Floor 15.0 m, which is between Train 8 and Train 9, in Figure 11. This is one of the exit stairs for this level.

If we plot the flow at the stair we can clearly see when passengers exit after the trains arrive at the station, Figure 12.

Subway Emergency Evacuation
Triggers are communications that can change an occupant’s behavior. They are quite flexible. In this example we simulate an evacuation, but triggers can also be used to model shopping, buying food, or use of a toilet. Triggers use data from both the occupant’s Profile and Behavior, so there are several interacting parts that must be defined to obtain the desired response. In the sections below, we will describe the details used in this example.
We want to simulate an evacuation in response to an event at 900 seconds on Floor 15 m, between trains 8 and 9. This is the floor where six trains arrive and depart. The behavior we will model is:
- At 900 seconds, all occupants within 10 m of the incident begin to run towards the exits.
- At 900 seconds, 50% or the occupants within 30 m of the incident also run towards the exits.
- As occupants run towards the exits, they notify occupants they meet who are within a 1 m radius. 10% of these newly notified occupants will also run towards the exits and begin to warn others they meet.
- 60 seconds after the incident a global evacuation announcement is made and all occupants begin to exit. At this time, no more people enter the building and no more trains discharge passengers.
To build this model, we start with the existing Subway Movement model.
Add Evacuation Profile
We add an Evacuation profile so that a color change will indicate occupants who are evacuating. Go to Profiles and add a new profile named Evacuation with a light yellow color.
Add Evacuation Behavior
The Evacuation behavior shown in Figure 13, controls how occupants will respond during evacuation. In this simulation, we want evacuation occupants to change to the Evacuation profile (changes their color), change their speed to a slow run, warn others about the incident, and proceed to the main exits.

Add Triggers for Evacuation
We will use both Placed Triggers and Trigger Templates. The Placed triggers are located at a fixed position and are used to represent the incident. The Trigger templates can be attached to a moving occupant and can warn other occupants about the danger.
Placed Triggers
Create three Triggers for the evacuation part of the simulation.
- Create the first Trigger named Close trigger, and set the influence radius to 10 m.
- Edit the Influence of this Trigger so that the Initial Value is zero, then at 900 seconds the Value is 100%.
- Select the Ignore Occupant Susceptibility checkbox. This means the trigger has no effect until 900 seconds, then it will influence all occupants within radius, ignoring any susceptibility value set in the Profile.
- Add a second Trigger named Far trigger, set the influence radius to 30 m.
The Far trigger is similar, except the Influence value is 50%.
- Select the Ignore Occupant Susceptibility checkbox.
- Add the third Trigger for General Evacuation.
The Awareness value is Global with an Influence value at 960 seconds of 100%.
When this trigger activates, all occupants begin to evacuate.
- Select the Ignore Occupant Susceptibility checkbox.

Trigger Templates
We also add a Trigger Template that will be attached to all occupants that are evacuating. Everyone they meet within a 1 m radius will have a 10% chance of following their warning and will also start to evacuate.
Change the Occupant Sources
We want no people entering the building and no people exiting trains 60 seconds after the incident (960 seconds). To do this, we modify the Occupant Sources so that there are no sources after 960 seconds, both people leaving the trains and entering the building. This is done using a table for the sources as shown in Figure 15 for people entering the station.

Emergency Evacuation Results
The following video shows the evacuation results. Until 900 seconds, the simulation is exactly the same as the general movement simulation discussed above. At 900 seconds an incident between trains 8 and 9 occurs. All passengers within 10 m and 50% of passengers within 30 m begin to evacuate. At 960 seconds a general evacuation alarm is given and all passengers evacuate.
Comment on Congestion
This model is not of an actual subway. As a result, the passenger flow patterns are not realistic and it is possible for congestion to develop at the entry to stairs. In an actual subway, the layout should better separate the flow of boarding and exiting passengers.
Conclusion
In this tutorial, we demonstrated how to use Pathfinder to simulate movement in a subway station.
The model and results show:
- The use of sources makes it possible to simulate passengers exiting trains at specified time intervals. Sources also support the continuous entry of passengers to the station.
- The flow of passengers and use of stairs and escalators was consistent with the expected behavior.
- Pathfinder makes it possible to study congestion that can result from inadequate or poor design choices.
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 support@thunderheadeng.com
Version Control
In accordance with the Thunderhead Engineering SQAP, the zip folder was updated when relevant Pathfinder features changed.
The current files in the zip folder are:
- Subway-2024.pth, created in Pathfinder 2024-1. This model is presented in the section Subway Model with Queuing.
- Subway-2024.pfrv_, results visualization, created in Results 2024-1. (Notes in Results are relevant to opening it.)
- Subway-Evacuation-2024.pth, created in Pathfinder 2024-1. This model is presented in the section Subway Emergency Evacuation.
- Subway-Evacuation-2024.pfrv_, results visualization, created in Results 2024-1. (Notes in Results are relevant to opening it.)
Related Tutorials
Tutorial demonstrating how to model passenger movement in a large subway station.
Video tutorial demonstrating how to effectively simulate evacuation of theaters and stadiums using Pathfinder.
Tutorial demonstrating the evacuation of a hospital
Tutorial demonstrating how to model Occupants that respsond to Triggers to shop.
Tutorial demonstrating how to model occupants that respond to Triggers to evacuate in a small conceptual model.
Video tutorial demonstarting how to assign exit goals to percentages of the occupant population.
(Legacy) Tutorial to experience the fundamental features of PyroSim
Video tutorial demonstrating the variables that may have an effect on evacuation time from aircraft cabins.