Show HN: My Python Solver for the On-Time Arrival Problem in Traffic Congestion
I&#x27;m very interested in this. Thanks for sharing.<p>Having coded up a semisolid implementation of time-dependent contraction hierarchies (which might not even get used, because of the very same data accessibility issues you outline), it seems at first glance quite straightforward to adapt CH preprocessing to this model. To contract a vertex you just look at whether each potential witness path has a <i>nonzero probability</i> of being a shortcut. I suppose you could cut preprocessing time down by replacing &quot;nonzero probability&quot;  with &quot;probability greater than epsilon&quot; to get a sort of approximate hierarchy.<p>You refer to the edge weights as an &quot;hmm&quot;, which I guess stands for hidden markov model. It doesn&#x27;t seem like they use that term in the paper, although if you made the data time-dependent would edge weights then be a genuine markov process? Would something like the Viterbi algorithm become a useful subprocess of the overall algorithm in that case?<p>The current big open source routing engines tend to be written in c++ or java. Do you think using python makes a significant difference in query or preprocessing times? *<p>*Edit: Just noticed the Numba dependency, which probably answers this question.