TRUCK WAITING-TIME PREDICTION: A Machine Learning Success Story at the Harbor of Barcelona

by cleverdata


Reducing Truck Queues

Accurate prediction of truck waiting time in a big harbor is a key aspect to reduce air pollution in the city and also to boost operations efficiency. Our Machine Learning approach at CleverData has demonstrated that:

  • Disruptive technologies can help in solving both classical and new problems.
  • Fast prototyping creates trust to build more sophisticated products.
  • Minimal Viable Products can be rapidly developed with new platforms like BigML.

“Fast prototyping makes it easy to test and build MVPs (Minimal Viable Products) that create the needed trust to build more sophisticated products.”


The Barcelona Harbor needs to reduce air pollution produced by unnecessary truck traffic.

Predicting the waiting time for trucks before they arrive to the harbor not only benefits the environment but also the harbor efficiency.

The more accurate the predictions, the less time trucks will be waiting at the queue.


Our solution predicts waiting time in two time frames: next 20 minutes and next 2 hours.

Stakeholders can use these predictions to better distribute truck routes and minimize unnecessary travels.


Waiting Time Predictions

The three lines in the graph show the real waiting time (green) along with the predicted for that same time frame. The blue and the orange ones represent the prediction done 20 and 120 minutes before, respectively.



We prototyped in less than 3 weeks a predictive model with basic historical information that proved to make useful predictions for both time frames (see picture on the right) that improved the results of classical Time Series approaches like ARIMA or Smoothing.

Future plans rely in building a more accurate model by adding more data, like weather conditions or working load.

“Predicting the waiting time for trucks with enough anticipation raises the efficiency of truck mobility, and not only reduces pollution but also increases the harbor operations efficiency.”


Ver más casos de éxito »