Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fix bug in heuristics cost calculation for egress legs #5783
Fix bug in heuristics cost calculation for egress legs #5783
Changes from 1 commit
5b6cfda
a5d91fb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boardAndAlightCost is not the same as transferCosts - we can discuss this in the OTP dev meeting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My reasoning was that it looks like the costCalculator treats the boardAlightCosts as transferCosts, and thus it would be a little bit clearer how this parameter will be used if this was reflected in the signature for the createCostCalculator() method.
But as discussed in the meeting it might be better to draw the line at the module border. I'm fine with reverting this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the confution here. This is the case:
This "mess" should probably be visited again and cleaned up - the cost model have grown and it might be just a bit more clear if Raptor supported board, alight and transfer costs - unsure what the performance overhead it. Performance was the original reason for why this is like it is. Compressing stop information in memory increases the performance.
So this feature comes from NeTEX where the name is transfer, but since we are adding the cost to alight and boarding (both ends) I think the name in the OTP model i wrong - the mapping should happen when going from stopPriority to cost. A few comments in the model would have helped as well.
In
TransitRoutingConfig
andTransitTuningParameters
this should be renamed to something likeboardAndAlightCostForStopTransferPriority
- a shorter name and a better java doc is probably the best solution.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sumarized: boardAndAlight cost is added twice (both ends of a transfer), while transferCost is added once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for that explanation!
The confusing thing about the name "stopBoardAlightCosts" is that it sounds like it should be applied for the first boarding and the last alighting as well. There is nothing that indicates that it is specific to transfers. But calling it stopBoardAlightTransferCosts may be a bit long?
Here are some possible alternatives for the name of this concept:
Do you think we should go with "stopBoardAlightCosts"?
I'm ok with that and think the naming is perhaps less important than being consistent, so I'm happy to make the naming consistent and will add some javadoc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can use this
stopBoardAlightTransferCosts
with JavaDoc.Doc in one place and link to doc in other places.