feat(drt): handle DetourTimeEstimator through dependency injection #3096
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.
Which
DetourTimeEstimator
to use was kind of hardcoded before. This PR now includes the interface in dependency injection, so we can replace it by overriding the binding. The use case is that we want to compare DRT 1:1 to another algorithm, and we want to do this with the bare calculations without approximating travel times through theTravelTimeMatrix
. So this PR gives us the possibility to override the default implementations of theDetourtTimeEstimator
with exact routing code.