Automationscribe.com
  • Home
  • AI Scribe
  • AI Tools
  • Artificial Intelligence
  • Contact Us
No Result
View All Result
Automation Scribe
  • Home
  • AI Scribe
  • AI Tools
  • Artificial Intelligence
  • Contact Us
No Result
View All Result
Automationscribe.com
No Result
View All Result

How Hapag-Lloyd improved schedule reliability with ML-powered vessel schedule predictions utilizing Amazon SageMaker

admin by admin
October 1, 2025
in Artificial Intelligence
0
How Hapag-Lloyd improved schedule reliability with ML-powered vessel schedule predictions utilizing Amazon SageMaker
399
SHARES
2.3k
VIEWS
Share on FacebookShare on Twitter


This put up is cowritten with Thomas Voss and Bernhard Hersberger from Hapag-Lloyd.

Hapag-Lloyd is likely one of the world’s main transport firms with greater than 308 fashionable vessels, 11.9 million TEUs (twenty-foot equal items) transported per 12 months, and 16,700 motivated staff in additional than 400 workplaces in 139 nations. They join continents, companies, and folks by means of dependable container transportation providers on the most important commerce routes throughout the globe.

On this put up, we share how Hapag-Lloyd developed and carried out a machine studying (ML)-powered assistant predicting vessel arrival and departure instances that revolutionizes their schedule planning. Through the use of Amazon SageMaker AI and implementing strong MLOps practices, Hapag-Lloyd has enhanced its schedule reliability—a key efficiency indicator within the trade and high quality promise to their prospects.

For Hapag-Lloyd, correct vessel schedule predictions are essential for sustaining schedule reliability, the place schedule reliability is outlined as proportion of vessels arriving inside 1 calendar day (earlier or later) of their estimated arrival time, communicated round 3 to 4 weeks earlier than arrival.

Previous to creating the brand new ML answer, Hapag-Lloyd relied on easy rule-based and statistical calculations, primarily based on historic transit patterns for vessel schedule predictions. Whereas this statistical technique offered primary predictions, it couldn’t successfully account for real-time circumstances resembling port congestion, requiring vital guide intervention from operations groups.

Growing a brand new ML answer to switch the prevailing system offered a number of key challenges:

  • Dynamic transport circumstances – The estimated time of arrival (ETA) prediction mannequin must account for quite a few variables that have an effect on journey period, together with climate circumstances, port-related delays resembling congestion, labor strikes, and surprising occasions that drive route adjustments. For instance, when the Suez Canal was blocked by the Ever Given container ship in March 2021, vessels needed to be rerouted round Africa, including roughly 10 days to their journey instances.
  • Knowledge integration at scale – The event of correct fashions requires integration of enormous volumes of historic voyage knowledge with exterior real-time knowledge sources together with port congestion info and vessel place monitoring (AIS). The answer must scale throughout 120 vessel providers or strains and 1,200 distinctive port-to-port routes.
  • Sturdy MLOps infrastructure – A strong MLOps infrastructure is required to repeatedly monitor mannequin efficiency and shortly deploy updates at any time when wanted. This consists of capabilities for normal mannequin retraining to adapt to altering patterns, complete efficiency monitoring, and sustaining real-time inference capabilities for quick schedule changes.

Hapag-Llyod’s earlier strategy to schedule planning couldn’t successfully deal with these challenges. A complete answer that might deal with each the complexity of vessel schedule prediction and supply the infrastructure wanted to maintain ML operations at world scale was wanted.

The Hapag-Lloyd community consists of over 308 vessels and plenty of extra accomplice vessels that repeatedly circumnavigate the globe on predefined service routes, leading to greater than 3,500 port arrivals per 30 days. Every vessel operates on a set service line, making common spherical journeys between a sequence of ports. As an example, a vessel would possibly repeatedly sail a route from Southampton to Le Havre, Rotterdam, Hamburg, New York, and Philadelphia earlier than beginning the cycle once more. For every port arrival, an ETA should be offered a number of weeks upfront to rearrange important logistics, together with berth home windows at ports and onward transportation of containers by sea, land or air transport. The next desk exhibits an instance the place a vessel travels from Southampton to New York by means of Le Havre, Rotterdam, and Hamburg. The vessel’s time till arrival on the New York port might be calculated because the sum of ocean to port time to Southampton, and the respective berth instances and port-to-port instances for the intermediate ports known as whereas crusing to New York. If this vessel encounters a delay in Rotterdam, it impacts its arrival in Hamburg and cascades by means of your entire schedule, impacting arrivals in New York and past as proven within the following desk. This ripple impact can disrupt fastidiously deliberate transshipment connections and require intensive replanning of downstream operations.

Port Terminal name Scheduled arrival Scheduled departure
SOUTHAMPTON 1 2025-07-29 07:00 2025-07-29 21:00
LE HAVRE 2 2025-07-30 16:00 2025-07-31 16:00
ROTTERDAM 3 2025-08-03 18:00 2025-08-05 03:00
HAMBURG 4 2025-08-07 07:00 2025-08-08 07:00
NEW YORK 5 2025-08-18 13:00 2025-08-21 13:00
PHILADELPHIA 6 2025-08-22 06:00 2025-08-24 16:30
SOUTHAMPTON 7 2025-09-01 08:00 2025-09-02 20:00

When a vessel departs Rotterdam with a delay, new ETAs should be calculated for the remaining ports. For Hamburg, we solely must estimate the remaining crusing time from the vessel’s present place. Nonetheless, for subsequent ports like New York, the prediction requires a number of elements: the remaining crusing time to Hamburg, the period of port operations in Hamburg, and the crusing time from Hamburg to New York.

Answer overview

As an enter to the vessel ETA prediction, we course of the next two knowledge sources:

  • Hapag-Lloyd’s inside knowledge, which is saved in an information lake. This consists of detailed vessel schedules and routes, port and terminal efficiency info, real-time port congestion and ready instances, and vessel traits datasets. This knowledge is ready for mannequin coaching utilizing AWS Glue jobs.
  • Automated Identification System (AIS) knowledge, which offers streaming updates on the vessel actions. This AIS knowledge ingestion is batched each 20 minutes utilizing AWS Lambda and consists of essential info resembling latitude, longitude, pace, and course of vessels. New batches are processed utilizing AWS Glue and Iceberg to replace the prevailing AIS database—at present holding round 35 million observations.

These knowledge sources are mixed to create coaching datasets for the ML fashions. We fastidiously think about the timing of obtainable knowledge by means of temporal splitting to keep away from knowledge leakage. Knowledge leakage happens when utilizing info that wouldn’t be obtainable at prediction time in the true world. For instance, when coaching a mannequin to foretell arrival time in Hamburg for a vessel at present in Rotterdam, we are able to’t use precise transit instances that have been solely identified after the vessel reached Hamburg.

A vessel’s journey might be divided into totally different legs, which led us to develop a multi-step answer utilizing specialised ML fashions for every leg, that are orchestrated as hierarchical fashions to retrieve the general ETA:

  • The Ocean to Port (O2P) mannequin predicts the time wanted for a vessel to succeed in its subsequent port from its present place at sea. The mannequin makes use of options resembling remaining distance to vacation spot, vessel pace, journey progress metrics, port congestion knowledge, and historic sea leg durations.
  • The Port to Port (P2P) mannequin forecasts crusing time between any two ports for a given date, contemplating key options resembling ocean distance between ports, latest transit time developments, climate, and seasonal patterns.
  • The Berth Time mannequin estimates how lengthy a vessel will spend at port. The mannequin makes use of vessel traits (resembling tonnage and cargo capability), deliberate container load, and historic port efficiency.
  • The Mixed mannequin takes as enter the predictions from the O2P, P2P, and Berth Time fashions, together with the unique schedule. Fairly than predicting absolute arrival instances, it computes the anticipated deviation from the unique schedule by studying patterns in historic prediction accuracy and particular voyage circumstances. These computed deviations are then used to replace ETAs for the upcoming ports in a vessel’s schedule.

Example of ETA prediction and involved ML models

All 4 fashions are educated utilizing the XGBoost algorithm constructed into SageMaker, chosen for its potential to deal with complicated relationships in tabular knowledge and its strong efficiency with blended numerical and categorical options. Every mannequin has a devoted coaching pipeline in SageMaker Pipelines, dealing with knowledge preprocessing steps and mannequin coaching. The next diagram exhibits the information processing pipeline, which generates the enter datasets for ML coaching.

Amazon SageMaker Pipeline for data processing

For example, this diagram exhibits the coaching pipeline of the Berth mannequin. The steps within the SageMaker coaching pipelines of the Berth, P2P, O2P, and Mixed fashions are similar. Due to this fact, the coaching pipeline is carried out as soon as as a blueprint and re-used throughout the opposite fashions, enabling a quick turn-around time of the implementation.

Amazon SageMaker Pipeline for berth model training

As a result of the Mixed mannequin depends upon outputs from the opposite three specialised fashions, we use AWS Step Capabilities to orchestrate the SageMaker pipelines for coaching. This helps make sure that the person fashions are up to date within the right sequence and maintains prediction consistency throughout the system. The orchestration of the coaching pipelines is proven within the following pipeline structure.

ETA model orchestration
The person workflow begins with an information processing pipeline that prepares the enter knowledge (vessel schedules, AIS knowledge, port congestion, and port efficiency metrics) and splits it into devoted datasets. This feeds into three parallel SageMaker coaching pipelines for our base fashions (O2P, P2P, and Berth), every following a standardized means of characteristic encoding, hyperparameter optimization, mannequin analysis, and registration utilizing SageMaker Processing and hyperparameter turning jobs and SageMaker Mannequin Registry. After coaching, every base mannequin runs a SageMaker batch remodel job to generate predictions that function enter options for the mixed mannequin coaching. The efficiency of the newest Mixed mannequin model is examined on the final 3 months of information with identified ETAs, and efficiency metrics (R², imply absolute error (MAE)) are computed. If the mannequin’s efficiency is beneath a set MAE threshold, your entire coaching course of fails and the mannequin model is robotically discarded, stopping the deployment of fashions that don’t meet the minimal efficiency threshold.

All 4 fashions are versioned and saved as separate mannequin package deal teams within the SageMaker Mannequin Registry, enabling systematic model management and deployment. This orchestrated strategy helps make sure that our fashions are educated within the right sequence utilizing parallel processing, leading to an environment friendly and maintainable coaching course of.The hierarchical mannequin strategy helps additional make sure that a level of explainability corresponding to the present statistical and rule-based answer is maintained—avoiding ML black field conduct. For instance, it turns into potential to focus on unusually lengthy berthing time predictions when discussing predictions outcomes with enterprise specialists. This helps enhance transparency and construct belief, which in flip will increase acceptance inside the firm.

Inference answer walkthrough

The inference infrastructure implements a hybrid strategy combining batch processing with real-time API capabilities as proven in Determine 5. As a result of most knowledge sources replace day by day and require intensive preprocessing, the core predictions are generated by means of nightly batch inference runs. These pre-computed predictions are complemented by a real-time API that implements enterprise logic for schedule adjustments and ETA updates.

  1. Each day batch Inference:
    • Amazon EventBridge triggers a Step Capabilities workflow day by day.
    • The Step Capabilities workflow orchestrates the information and inference course of:
      • Lambda copies inside Hapag-Lloyd knowledge from the information lake to Amazon Easy Storage Service (Amazon S3).
      • AWS Glue jobs mix the totally different knowledge sources and put together inference inputs
      • SageMaker inference executes in sequence:
        • Fallback predictions are computed from historic averages and written to Amazon Relational Database Service (Amazon RDS). Fallback predictions are utilized in case of lacking knowledge or a downstream inference failure.
        • Preprocessing knowledge for the 4 specialised ML fashions.
        • O2P, P2P, and Berth mannequin batch transforms.
        • The Mixed mannequin batch remodel generates last ETA predictions, that are written to Amazon RDS.
        • Enter options and output recordsdata are saved in Amazon S3 for analytics and monitoring.
    • For operational reliability, any failures within the inference pipeline set off quick electronic mail notifications to the on-call operations crew by means of Amazon Easy E-mail Service (Amazon SES).
  2. Actual-time API:
    • Amazon API Gateway receives consumer requests containing the present schedule and a sign for which vessel-port mixtures an ETA replace is required. By receiving the present schedule by means of the consumer request, we are able to deal with intraday schedule updates whereas doing day by day batch remodel updates.
    • The API Gateway triggers a Lambda operate calculating the response. The Lambda operate constructs the response by linking the ETA predictions (saved in Amazon RDS) with the present schedule utilizing customized enterprise logic, in order that we are able to deal with short-term schedule adjustments unknown at inference time. Typical examples of short-term schedule adjustments are port omissions (for instance, attributable to port congestion) and one-time port calls.

This structure allows millisecond response instances to customized requests whereas attaining a 99.5% availability (a most 3.5 hours downtime per 30 days).

Inference architecture

Conclusion

Hapag Lloyd’s ML powered vessel scheduling assistant outperforms the present answer in each accuracy and response time. Typical API response instances are within the order of a whole bunch of milliseconds, serving to to make sure a real-time consumer expertise and outperforming the present answer by greater than 80%. Low response instances are essential as a result of, along with absolutely automated schedule updates, enterprise specialists require low response instances to work with the schedule assistant interactively. By way of accuracy, the MAE of the ML-powered ETA predictions outperform the present answer by roughly 12%, which interprets into climbing by two positions within the worldwide rating of schedule reliability on common. This is likely one of the key efficiency metrics in liner transport, and it is a vital enchancment inside the trade.

To be taught extra about architecting and governing ML workloads at scale on AWS, see the AWS weblog put up Governing the ML lifecycle at scale, Half 1: A framework for architecting ML workloads utilizing Amazon SageMaker and the accompanying AWS workshop AWS Multi-Account Knowledge & ML Governance Workshop.

Acknowledgement

We acknowledge the numerous and useful work of Michal Papaj and Piotr Zielinski from Hapag-Lloyd within the knowledge science and knowledge engineering areas of the venture.

In regards to the authors

Thomas Voss
Thomas Voss works at Hapag-Lloyd as an information scientist. Together with his background in academia and logistics, he takes pleasure in leveraging knowledge science experience to drive enterprise innovation and progress by means of the sensible design and modeling of AI options.

Bernhard Hersberger
Bernhard Hersberger works as an information scientist at Hapag-Lloyd, the place he heads the AI Hub crew in Hamburg. He’s passionate about integrating AI options throughout the corporate, taking complete accountability from figuring out enterprise points to deploying and scaling AI options worldwide.

Gabija Pasiunaite
At AWS, Gabija Pasiunaite was a Machine Studying Engineer at AWS Skilled Providers primarily based in Zurich. She specialised in constructing scalable ML and knowledge options for AWS Enterprise prospects, combining experience in knowledge engineering, ML automation and cloud infrastructure. Gabija has contributed to the AWS MLOps Framework utilized by AWS prospects globally. Exterior work, Gabija enjoys exploring new locations and staying energetic by means of mountaineering, snowboarding, and working.

Jean-Michel Lourier
Jean-Michel Lourier is a Senior Knowledge Scientist inside AWS Skilled Providers. He leads groups implementing knowledge pushed purposes aspect by aspect with AWS prospects to generate enterprise worth out of their knowledge. He’s keen about diving into tech and studying about AI, machine studying, and their enterprise purposes. He’s additionally an enthusiastic bike owner.

Mousam Majhi
Mousam Majhi is a Senior ProServe Cloud Architect specializing in Knowledge & AI inside AWS Skilled Providers. He works with Manufacturing and Journey, Transportation & Logistics prospects in DACH to realize their enterprise outcomes by leveraging knowledge and AI powered options. Exterior of labor, Mousam enjoys mountaineering within the Bavarian Alps.

Tags: AmazonHapagLloydimprovedMLpoweredpredictionsReliabilitySageMakerSchedulevessel
Previous Post

Underneath the Hood: How DAX Works with Filters

Next Post

Temporal-Distinction Studying and the Significance of Exploration: An Illustrated Information

Next Post
Temporal-Distinction Studying and the Significance of Exploration: An Illustrated Information

Temporal-Distinction Studying and the Significance of Exploration: An Illustrated Information

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular News

  • How Aviva constructed a scalable, safe, and dependable MLOps platform utilizing Amazon SageMaker

    How Aviva constructed a scalable, safe, and dependable MLOps platform utilizing Amazon SageMaker

    402 shares
    Share 161 Tweet 101
  • Diffusion Mannequin from Scratch in Pytorch | by Nicholas DiSalvo | Jul, 2024

    402 shares
    Share 161 Tweet 101
  • Unlocking Japanese LLMs with AWS Trainium: Innovators Showcase from the AWS LLM Growth Assist Program

    402 shares
    Share 161 Tweet 101
  • Streamlit fairly styled dataframes half 1: utilizing the pandas Styler

    401 shares
    Share 160 Tweet 100
  • Autonomous mortgage processing utilizing Amazon Bedrock Knowledge Automation and Amazon Bedrock Brokers

    401 shares
    Share 160 Tweet 100

About Us

Automation Scribe is your go-to site for easy-to-understand Artificial Intelligence (AI) articles. Discover insights on AI tools, AI Scribe, and more. Stay updated with the latest advancements in AI technology. Dive into the world of automation with simplified explanations and informative content. Visit us today!

Category

  • AI Scribe
  • AI Tools
  • Artificial Intelligence

Recent Posts

  • Automate Amazon QuickSight knowledge tales creation with agentic AI utilizing Amazon Nova Act
  • This Puzzle Exhibits Simply How Far LLMs Have Progressed in a Little Over a Yr
  • Accountable AI: How PowerSchool safeguards tens of millions of scholars with AI-powered content material filtering utilizing Amazon SageMaker AI
  • Home
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions

© 2024 automationscribe.com. All rights reserved.

No Result
View All Result
  • Home
  • AI Scribe
  • AI Tools
  • Artificial Intelligence
  • Contact Us

© 2024 automationscribe.com. All rights reserved.