Skip to content

1: Builds optimizer inputs - #4

Open
swastisingh2 wants to merge 1 commit into
mainfrom
tool1-optim
Open

1: Builds optimizer inputs#4
swastisingh2 wants to merge 1 commit into
mainfrom
tool1-optim

Conversation

@swastisingh2

@swastisingh2 swastisingh2 commented Dec 3, 2025

Copy link
Copy Markdown
Collaborator

This files is to combine block groups, GTFS data, and cleaned services and convert them into structured accessibility inputs for the optimization model.

Tool 2 combines the block groups, the GTFS feed, and the cleaned services to produce the inputs needed for optimization. Block groups are loaded and reduced to representative points. The GTFS tables are read and used to reconstruct the mapping between routes and the stops they serve. Using the spatial layout of stops, the script identifies clusters of stops that are close enough to function as transfer points, and any routes associated with those stops are treated as neighbors.

The walking relationships are then computed. Each block is checked against nearby stops to determine which routes are walkable, and the minimum distance to those routes is recorded. These results form W.csv. Services are linked to the network by finding the stops within range of each service location and assigning the routes that serve those stops. Starting from the routes walkable from a block, the script expands through the neighbor graph to capture routes reachable within a small number of transfers. A service is considered reachable from a block when any of its associated routes appears in that expanded set. These relationships form T.csv, and the neighbor list is written out as well. Although the current inputs come from Milwaukee and Racine, the workflow applies to any GTFS dataset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant