This code is implemented based on a published paper in Journal of Transportation Research Part C:
Estimating the most likely space–time paths, dwell times and path uncertainties from vehicle trajectory data: A time geographic method
https://www.sciencedirect.com/science/article/pii/S0968090X15003150