RailForLess / railforless

Amtrak fare-scraping service
https://railforless.us/
53 stars 2 forks source link

Feature Request: Split Ticketing #5

Open Tiberia99 opened 3 weeks ago

Tiberia99 commented 3 weeks ago

Split ticketing is the practice of buying 2 (or more) tickets for the same train between your intended origin and destination to get a lower price compared to the "non-stop" fare.

For example, Northeast Regional trains between New York and Boston make multiple intermediate stops. Due to Amtrak's complex pricing, it can be cheaper to buy a ticket between New York NYP and New Haven NHV, and then a second ticket on the same train between New Haven NHV and Boston BOS compared to the fare for NYP-BOS.

I've included Screenshots for an example where Split-Ticketing is cheaper: Train 94 from NYP-BOS is cheaper if you split at New Haven. $103 direct vs $57 + $35 = $92, savings of $11 without having to leave your seat

stations.json already includes all the necessary route information, and the code can already perform multiple API requests to Amtrak.

This feature would iteratively check city pairs for cheaper prices, for example: NYP-BOS (original pair) NYP-STM + STM-BOS NYP-NHV + NHV-BOS

Then simply add up the fares for each train in each set, and compare to the original.
This would be similar conceptually to the code in Fares.json for the Bedrooms.

Of course an indication that this is "separate tickets" would be required in the UI.

Like Bedrooms, this should be an optional feature as it would be slower than the regular search due to additional API calls required. And perhaps should be limited to "Specific Dates", again due to API calls.

To reduce both code & end-user complexity, the following limitations seem like good ideas for a first pass:

Future development could include these features, though they add significant complexity, both to code and to actually doing them in real life:

94 NYP-BOS 94 NYP-NHV 94 NHV-BOS
Mr-Technician commented 3 weeks ago

Hi @Tiberia99,

Thanks for the suggestion! I was not aware that split ticketing was practical or even possible on Amtrak.

  • Layovers (ex. Train 1 to NYP-NHV, then a following train to NHV-BOS), with UI/UX ability to select/filter 1. Layover duration max, 2. Connecting station

I think including a layover filter would be valuable anyway when displaying transfers between trains. Including the connecting station would be an advanced feature that I'm not sure is worth the development effort unless it could also include an automatic option. Do you know if specific stations tend to be better as the "split point" when split ticketing? If so, these could be included as a default option that would be more friendly to the average user.

  • Include local commuter/regional rail when it parallels Amtrak.

I like this idea, but would hope to get help from the community. I'd prefer not to hard-code any prices or timetables, which would require connections to additional third-party APIs. I'm not opposed to this in principle but it would be a significant undertaking to include results for other trains around the US.

  • Perhaps a simpler feature would be to indicate in the UI that regional rail is available as an alternative between the selected stations (if that's true) without actually providing fares and schedules, as a reminder for users to check for themselves with the appropriate transit agencies.

I think we're already half-way there since we include local rail options for stations like Chicago Union.

If you have ideas that would simplify the process and give us data to work with, this could happen sooner. I'm willing to discuss it, but there are several other features higher on the list right now.

Tiberia99 commented 3 weeks ago

Hi, thanks for reading my submission.

Split ticketing is practical, at least on the NEC, if you're lucky :-) Like skip-lagging it isn't officially condoned, but based on some anecdata online (and the one time I tried it), it doesn't seem to be something they're actively enforcing against.

I've only looked into doing it on the NEC. Based on my "research", between NYP-BOS the best station to split at is New Haven NHV. For NYP-WAS, Philadelphia PHL is a good candidate. My guess is a combination of high turnover with some pricing algorithm weirdness causes the fare differences.

Thank you!