switch to a* algorithm for shortest path#199
switch to a* algorithm for shortest path#199robfitzgerald merged 2 commits intoNatLabRockies:mainfrom
Conversation
b22d55c to
7ac301d
Compare
makes sense to me. we've added an extra haversine distance estimate to each link discovered in the shortest path algorithm; we've reduced the number of links we need to look at in the average search. i'm curious how the overall vkt appears in a before/after. if that is very similar, i would feel comfortable to accept this without spending more time trying to verify to ourselves that the routes are still travel time optimal. edit: don't know why i just said that, i'm going ahead and running that comparison now 🤦♂️ |
|
before: 82983.4 km hmm, ok. i mean, i think we haven't ironed out all of the nondeterminism in hive, but, a 12% increase in VKT might be unexpected. i can't look more into this today, but, i think we should try and confirm for ourselves that we are still getting optimal path search results. thanks for quickly whipping this PR, @erik-hasse! |
robfitzgerald
left a comment
There was a problem hiding this comment.
i double-checked my work and it turns out my A/B test wasn't correctly based on the same base. after fixing, i'm seeing < 0.01% change in VKT, and that's enough for me to feel good about the a* heuristic implementation. thanks for the help on this!
This appears to have a slight slowdown for small networks, but a speedup for larger ones. In my very unscientific tests I got:
Closes #197