Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrections to Boston fare router #655

Draft
wants to merge 46 commits into
base: dev
Choose a base branch
from

Conversation

mattwigway
Copy link
Contributor

For historical reasons, this also includes the FaresV2 branch. We could strip these apart if need be, but it's a bit tricky.

mattwigway and others added 30 commits November 24, 2020 16:56
Co-authored-by: Anson Stewart <astewart@conveyal.com>
…g bitset comparison with int comparison.

Previously we compared whether a leg had a superset of the potentially-active fare transfer rules of another leg, but
because most fare_transfer_rules specify a from_leg_group_id, the superset would only be active in a few cases:
1) when there are transfer rules with no from_leg_group_id
2) when two trips have the same price but one has no transfer allowance
3) when the two trips have the same previous leg group

99% of the time (not measured), it was the third condition that eliminated legs. We can implement the third condition with a simple integer equality, rather than a BitSet operation. The others are rare enough that ignoring them makes us retain maybe a few more trips, but not enough to outweight the performance penalty of a big BitSet comparison.
… rail."

This reverts commit db439cf0ebe9725d3d01dc72cdedc369d489f85d.

Allowing free transfers on commuter rail violates nonnegativity of transfer allowances.
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.

2 participants