traveltimeHMM package implements a Hidden Markov Model (HMM) with a random trip effect to estimate the distribution of travel time. The HMM is used to capture dependency on hidden congestion states. The trip effect is used to capture dependency on driver behaviour. Variations of those two types of dependencies leads to four models to estimate the distribution of travel time. Prediction methods for each model is provided.

Package website

Installation

The package is still under development in the Beta stage.

Install from GitHub with:

Example

This package includes a small data set (tripset) that aggregates map-matched anonymized mobile phone GPS data collected in Quebec city in 2014 using the Mon Trajet smartphone application developed by Brisk Synergies Inc. The precise duration of the time period is kept confidential.

View the data with:

To fit a simple HMM model use the following code

fit <- traveltimeHMM(data = tripset,nQ = 2,max.it = 20, model = "HMM")

Predict for a single trip with:

Bugs

This is a work in progress. For bugs and features, please refer to here.

References

Woodard, D., Nogin, G., Koch, P., Racz, D., Goldszmidt, M., Horvitz, E., 2017. “Predicting travel time reliability using mobile phone GPS data”. Transportation Research Part C, 75, 30-44. http://dx.doi.org/10.1016/j.trc.2016.10.011