Skip to content

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
…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.
@mattwigway mattwigway force-pushed the boston-fare-corrections branch from e4fa4fd to 5e8a656 Compare November 24, 2020 21:56
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