08 Transit Network Management - Triangle-Modeling-and-Analytics/TRMG2 GitHub Wiki
Intro
TRMG2 contains a generalized transit manager. Given a list of transit project IDs, it transfers routes from a master route layer to a scenario route layer. It also includes reporting features to review how well the process performed.
In the master route system, each route includes specific stop locations. These stop locations are spatially joined to the scenario highway network's node layer. The scenario route is then created by drawing a route along the path of scenario nodes.
In future year scenarios, areas of the highway network can look very different from the base year. For example, a road where a bus route was located in the base year may be closed. This tool will find a new shortest path between the transit stops.
Master Transit Route System
The model uses a master route system. This route system should have every route coded. Scenarios are then created by choosing from routes using a transit project list. To facilitate this, each master route must have a project ID in a field labeled "ProjID". Multiple routes can have the same project ID. This allows them to be grouped and turned on or off together. This is particularly helpful given the need to break real-world transit routes into two directional routes in the model. Including "Project 1" in a scenario can turn on both the east- and westbound sections of that project.
Because the scenario route system is created by linking stops together, stops also work as guideposts. If a route takes an odd path to serve additional areas, the stops placed along that path will make sure the scenario route matches.
TransitProjectList.csv
Each scenario must have a copy of this file as an input. It is located in the top level of the scenario directory. This file, specific to each scenario, contains a list of transit project IDs to include.
It can also override the master route attributes. To do so, enter the alternative attribute values within the data fields in the master route layer. This eliminates the need to code duplicate routes simply to capture attribute changes (e.g. an identical route but with shorter headways). If using the override columns (as in the picture below), empty cells infer that the master attribute will be used.

Note on mode codes: see the 'Mode_ID' field in networks/transit_mode_table.csv to see which integer mode codes line up with which transit types.
Project Coding Info & Tips
Within the master route layer, use 'transit projects' to represent new transit systems or routes or attribute changes to existing routes. Each project is associated with a user-defined project ID. During scenario creation, if the project ID is listed in the TransitProjectList.csv file, that route will be included and the project attributes overwrite the base attributes.
The project attribute fields include: Fare and Headway (AM, MD, PM, NT)
To begin transit route coding, open the MasterRoutes.rts file. Create a new .net file, then activate the Route Editing toolbar.
-
Initially code a new transit route without stops. Then begin to add stops by selecting the newly created route and all other existing routes along that corridor. Place new stops at the same location as existing stops (for other routes). This method allows stops for multiple routes to be associated to one node, including the beginning and end stops. This technique also minimizes instances of ‘node clusters’ along a highway link which results in excessive small link segments.
-
For new routes that will traverse bifurcated or one-way links at any point, start the route on any of the one-way links to inform TRMG2 of directionality for the IB/OB route. The route can always be extended in either direction from this link. This method helps the user take advantage of the Add Reverse of Route tool within the Route Editing toolbar.
-
New transit routes or alternative alignment for existing routes need to be coded in the Master Routes file. Transit route coding should not occur in a scenario route system. The stops associated with these routes need to be tagged or recognized by TRMG2 and this only happens during the Create Scenario step.
-
Modify route attributes within the TransitProjectList.csv file. Attributes listed in here will override master route attributes. This eliminates the need to code duplicate routes simply to capture attribute changes (e.g. an identical route but with shorter headways). Empty cells within the TransitProjectList.csv file infer that the master attributes will be used.
Comparing Scenario Routes with Master Routes
The rts_creation_results.csv file is generated upon running the Create Scenario model step. It will be located in the same directory as the scenario route system and it contains information to determine if the transfer from the master to the scenario worked well.

The most useful statistics compare the route length between the master and scenario route systems. Large deviations, either in absolute or percentage terms, indicate a problem that needs manual review. Additionally, a count of the number of missing stops is provided.
Transfer issues and solutions
The two most common problems encountered are that the scenario route will either be longer or shorter than the master route.
Scenario route is too long
Sometimes, the scenario route will be longer than the master route. This usually happens when the spatial join assigns a stop to an incorrect scenario node. The shortest path might require that the route loop back to reach that node. In the image below, the master route is on the left. The nearest blue node to the orange stop is on a different link. Because the stop and node are very near each other, the spatial join assumes the stop must be on that node. This results in a route that looks very different, as these parallel links represent two opposing directions of a highway.

The solution here is to move the orange stop to the correct blue node in the master network.
Scenario route is too short
When checking the report, you may find that the scenario route is instead much shorter than the master route. This can often be caused by missing stops in the master route system. In the image below, the master route is on the left, and it is missing stops on the east side of the route. The scenario route ends at the last stop.

Another potential problem is a long express route with limited or no stops in the middle of the route. It is possible for the shortest path between stops to be a different route than what is coded in the master route.