Skip to content

Do not run forward heuristic to calculate LAT, it is calculated from data already#4537

Merged
hannesj merged 1 commit into
opentripplanner:dev-2.xfrom
entur:otp2_run_only_required_heuristics
Nov 3, 2022
Merged

Do not run forward heuristic to calculate LAT, it is calculated from data already#4537
hannesj merged 1 commit into
opentripplanner:dev-2.xfrom
entur:otp2_run_only_required_heuristics

Conversation

@hannesj

@hannesj hannesj commented Oct 21, 2022

Copy link
Copy Markdown
Contributor

Summary

Currently we run a forward heuristic search, if either EDT or LAT is not defined in the request. In #3664, we changed the behaviour, so that the reverse heuristic doesn't require the LAT to be set anymore. However, we missed changing the criteria of when the search should be done. This PR changes that, so that LAT is not required anymore when the reverse heuristic search is done. Also the RangeRaptorDynamicSearch is fixed, as it previously expected the first search to always be the forward heuristic search.

@hannesj hannesj added the !Optimization The feature is to improve performance. label Oct 21, 2022
@hannesj hannesj added this to the 2.2 milestone Oct 21, 2022
@hannesj hannesj requested a review from t2gran October 21, 2022 14:05
@hannesj hannesj requested a review from a team as a code owner October 21, 2022 14:05
@hannesj

hannesj commented Oct 21, 2022

Copy link
Copy Markdown
Contributor Author
Norway (not as big change, as both EDT and LAT are defined on most searches):

Before:
Total:  
 ==> mc_destination : [  541,  499,  494,  498 ] Avg: 508.0  (σ=19.1)

After: 
Total:  
 ==> mc_destination : [  487,  445,  450,  442 ] Avg: 456.0  (σ=18.1)

Baden-Württemberg:

Before:
Total:  
 ==> mc_destination : [  628,  625,  625,  624 ] Avg: 625.5  (σ=1.5)

After:
Total:  
 ==> mc_destination : [  396,  385,  385,  385 ] Avg: 387.8  (σ=4.8)

Germany:

Before:
Total:  
 ==> mc_destination : [ 5777 ] Avg: 5777.0  (σ=0.0)

After:
Total:  
 ==> mc_destination : [ 3852 ] Avg: 3852.0  (σ=0.0)

@leonardehrenfried

leonardehrenfried commented Oct 21, 2022

Copy link
Copy Markdown
Member

🍾

@hannesj hannesj added the Entur Test This is currently being tested at Entur label Oct 28, 2022
@t2gran t2gran modified the milestones: 2.2, 2.3 Nov 1, 2022
@hannesj hannesj merged commit 57fefa0 into opentripplanner:dev-2.x Nov 3, 2022
@hannesj hannesj deleted the otp2_run_only_required_heuristics branch November 3, 2022 14:13
t2gran pushed a commit that referenced this pull request Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Entur Test This is currently being tested at Entur !Optimization The feature is to improve performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants