Skip to content

Trip Planner [Fix]: Out of system transfer logic#3205

Open
lvachon1 wants to merge 2 commits into
mainfrom
lev/fix/otp/subway_transfers
Open

Trip Planner [Fix]: Out of system transfer logic#3205
lvachon1 wants to merge 2 commits into
mainfrom
lev/fix/otp/subway_transfers

Conversation

@lvachon1
Copy link
Copy Markdown
Contributor

Scope

Asana Ticket: 🐞 Trip Planner | Fix out of system transfer logic

Implementation

Added maybe_transfer? cases to specifically handle subway -> subway transfers to ensure those happen in the same (or connected) stations. This is to handle the cases where OTP suggests walking between stations, but the fare was incorrectly calculated as if that was an in-fare transfer.

Screenshots

Branch

Screenshot 2026-05-22 at 1 20 34 PM

Dev

Screenshot 2026-05-22 at 1 20 18 PM

How to test

http://localhost:4001/trip-planner?plan=hsQVX3VudXNlZF9kYXRldGltZV90eXBlxADEEl91bnVzZWRfd2hlZWxjaGFpcsQAxAhkYXRldGltZcQgMjAyNi0wNS0yMlQxMjo1MDo0Ny4xMzQ4NTItMDQ6MDDEBGZyb22ExAhsYXRpdHVkZctARS_O2RaHK8QJbG9uZ2l0dWRly8BRx5y2hIvrxARuYW1lxDlIYXJ2YXJkIFNxdWFyZSwgQnJhdHRsZSBTdHJlZXQsIENhbWJyaWRnZSwgTUEsIDAyMTM4LCBVU0HEB3N0b3BfaWTEAMQFbW9kZXOJxANCVVPEBHRydWXEBUZFUlJZxAR0cnVlxARSQUlMxAR0cnVlxAZTVUJXQVnEBHRydWXEDl9wZXJzaXN0ZW50X2lkxAEwxAtfdW51c2VkX0JVU8QAxA1fdW51c2VkX0ZFUlJZxADEDF91bnVzZWRfUkFJTMQAxA5fdW51c2VkX1NVQldBWcQAxAJ0b4TECGxhdGl0dWRly0BFMxYJVsDXxAlsb25naXR1ZGXLwFG_nYg7o0TEBG5hbWXES1dvbmRlcmxhbmQgR3JleWhvdW5kIFBhcmssIDE5MCBSZXZlcmUgQmVhY2ggUGFya3dheSwgUmV2ZXJlLCBNQSwgMDIxNTEsIFVTQcQHc3RvcF9pZMQA

Any other route that involves a red to blue transfer should work.
Confirm that leaving one station and entering another on foot is included in the fare calculation.
Confirm that transfers within the fare gates are still free.

…ansfers to ensure those transfers happen in the same (or connected) stations. This is to handle the cases where OTP suggests walking between stations, but incorrectly counted that as a valid transfer.
@lvachon1 lvachon1 requested a review from a team as a code owner May 22, 2026 17:23
@lvachon1 lvachon1 requested a review from joshlarson May 22, 2026 17:23
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