Machine Learning10 min read

AI in Shipping: Routing, ETA Prediction and Port Calls

Where machine learning is really used in shipping: weather routing, AIS-based ETA prediction and just-in-time port calls, plus IMO rules and a live AIS demo.

By AI Agents DirectoryLast checked
Abstract technology illustration

The earlier version of this post leaned on an analyst quote and savings figures that no port, carrier or regulator publishes, so they are gone. What remains: the three places machine learning actually shows up in shipping (voyage routing and speed, arrival time prediction, port call coordination), the IMO rules that make operators care, and a short script against a free official AIS feed.

Deployed systems, research and “agents” are not the same thing

Marketing copy blurs three different things.

LayerWhat it isExample in this article
Port call data exchangeShared timestamps (ETA, berth availability, requested arrival time) so ships can slow down instead of waiting at anchorRotterdam’s Pronto, Singapore’s JIT Platform
Machine learning modelsModels that predict arrival time, turnaround or fuel use from AIS, weather and port dataThe research papers below; Pronto’s AI forecasts
Autonomous ships (“agents”)Ships where software or remote operators take over functions the crew normally performsCovered by IMO’s voluntary MASS Code; not in commercial international cargo service

Ports mostly run the first row, with machine learning inside it improving the timestamps. The third row is where “AI agent” language lands, and IMO is blunt: it says no internationally trading SOLAS cargo ship currently operates commercially in autonomous or remote-controlled mode. Its MASS Code was adopted in May 2026 as a non-mandatory instrument and took effect on 1 July 2026. It keeps the master in overall charge “even if not on board the ship”, and a mandatory version is only expected to be adopted by 1 July 2030, entering into force in 2032.

Why operators care: CII and the IMO DCS

Under the IMO Data Collection System (DCS), adopted at MEPC 70 in October 2016, ships of 5,000 GT and above have recorded fuel oil consumption per fuel type since 1 January 2019. The flag State verifies the figures by 31 May and forwards them to IMO’s database by 30 June. The database is anonymised, so individual ships cannot be identified.

Since 2023 DCS data has fed the Carbon Intensity Indicator (CII), which applies from 5,000 GT; its design-side sibling, the EEXI, applies from 400 GT. The CII gives each ship a rating from A to E, with A the best. A ship rated D for three years in a row, or E for a single year, must submit a corrective action plan (IMO FAQ). Among the ways IMO suggests a ship can improve its rating are hull cleaning and “speed and routeing optimization”. IMO’s review of the rules runs in phases, with phase 2 lasting from spring 2026 to spring 2028. A better speed profile therefore shows up in a regulated annual rating, not only in the fuel bill.

Voyage routing and speed: mostly research, built on fuel models

Weather routing needs a fuel model first: burn as a function of speed, draught, trim and sea state. That is where machine learning research is busiest.

  • A review by Dusica Marijan and co-authors sorts fuel models into three families (physics-based, data-driven and hybrid),, and names data quality, availability and real-time optimisation as open problems.
  • Abdella Mohamed and colleagues trained models on 296 voyage reports from one bulk carrier over a year, enriched with Copernicus marine data and ECMWF weather parameters. They report strong potential but say it still needs validating on similar vessels.
  • A 2026 preprint presents PIER, an offline reinforcement learning router built on a year (2023) of AIS data for seven Gulf of Mexico routes and compared with great-circle routing. Its authors note that routing in practice still relies mostly on heuristics.

Each study covers one vessel or one region, so read them as proof of method, not fleet-wide results.

ETA prediction from AIS

Digitraffic’s API documentation shows what AIS gives you: position, speed over ground and course, plus metadata such as the vessel name, a destination of at most 20 characters and an ETA packed into month, day, hour and minute fields. The research shows how much more context arrival models need:

  • For the DEBS Grand Challenge 2018, Oleh Bodunov and co-authors predicted destination ports with tree ensembles (Random Forest, GBDT, XGBoost, Extremely Randomized Trees) and arrival times with a feed-forward neural network on streaming AIS.
  • Xiaocai Zhang and colleagues predicted arrival at the Singapore pilotage area by combining AIS with pilotage booking records and weather. Adding the booking information helped more than adding the weather.
  • Nairui Liu and co-authors point out that standard ETA models target the next port and depend on live AIS, which does not exist yet for later legs. Their transformer forecasts future segment durations from sailing history, congestion proxies and vessel details.
  • Dejan Stepec and colleagues built a turnaround time predictor for the Port of Bordeaux on 11 years of port call data and compared it with the port’s existing manual, expert-based estimates.

Position and speed alone are a weak signal. Port-side information (bookings, congestion, berth plans) is what helps.

Port call optimisation and just-in-time arrival

Just-in-time (JIT) arrival is the most concrete deployed use. The idea, as IMO’s guide describes it, is that a ship sails at an efficient speed and reaches the Pilot Boarding Place exactly when the berth, the fairway and nautical services such as pilots and tugs are ready. The alternative is what IMO’s GreenVoyage2050 portal calls “hurry up and wait”: racing to port and then idling at anchor. The JIT Arrival Guide came from the Low Carbon GIA, an IMO-backed industry alliance.

The hard part is not the algorithm. IMO lists contractual barriers (a Due Despatch clause in voyage charters obliges the master to proceed at utmost speed), operational ones, data quality and stakeholder buy-in. It suggests JIT charter party clauses allowing virtual arrival, and standard timestamps such as Requested Time of Arrival at the Pilot Boarding Place.

What the ports say:

  • Rotterdam. The Port Authority launched Pronto in 2018, a port call platform that combines data sources to plan each call. After a study with TNO of container ships sailing to Rotterdam in 2017, Pronto gained a view comparing the speed a ship sailed with the ideal speed. In August 2019 the Authority set up PortXchange to sell Pronto to other ports, with Shell and A.P. Moller - Maersk as first partners; Maersk said it wanted JIT arrival and better schedule reliability. A 2025 feeder pilot with terminals ECT and RWG and operators Unifeeder and X-Press Feeders tested a tool that drafts berth plans from ETA/ETD data, which participants could accept or reject. It also exposed gaps, such as vessel rotations missing from the data.
  • Singapore. MPA’s Just-In-Time Platform on digitalPORT@SG shares real-time schedule data so vessels can choose an arrival speed. MPA says it launched in 2024 for container, general cargo and bulk ships, onboarded more than 150 port users, and was due to reach tankers and anchorage visitors by end-2025. MPA’s AI tools (DocuMind and DocuMatch, plus a planned port clearance system) process documents, not navigation.

Both ports describe data platforms, forecasts and decision support that humans accept or reject. Neither describes autonomous agents steering ships.

A working example: naive ETA from live Finnish AIS

Finland’s Digitraffic service publishes AIS positions and port call notifications as open data under CC BY 4.0, sourced from the Finnish Transport Infrastructure Agency. No key is needed. Its instructions ask for a Digitraffic-User header identifying your app and require gzip compression (requests without it get HTTP 406). Without the header you are limited to 60 requests a minute.

The script lists port calls due in Helsinki in the next eight hours, fetches each ship’s latest AIS position, and prints a straight-line ETA (distance over speed) beside the declared ETA, which the API docs say comes from the agent, port or pilot.

import gzip, json, math, urllib.request
from datetime import datetime, timedelta, timezone

BASE = "https://meri.digitraffic.fi/api"
HEADERS = {"Digitraffic-User": "my-eta-demo/0.1", "Accept-Encoding": "gzip"}
PORT = "FIHEL"  # Helsinki

def get(path):
    req = urllib.request.Request(BASE + path, headers=HEADERS)
    with urllib.request.urlopen(req, timeout=30) as r:
        body = r.read()
        if r.headers.get("Content-Encoding") == "gzip":
            body = gzip.decompress(body)
        return json.loads(body)

def km(lon1, lat1, lon2, lat2):
    p1, p2 = math.radians(lat1), math.radians(lat2)
    dp, dl = p2 - p1, math.radians(lon2 - lon1)
    a = math.sin(dp / 2) ** 2 + math.cos(p1) * math.cos(p2) * math.sin(dl / 2) ** 2
    return 2 * 6371 * math.asin(math.sqrt(a))

now = datetime.now(timezone.utc)
iso = lambda t: t.strftime("%Y-%m-%dT%H:%M:%SZ")

# Coordinates of each port area (harbour) in Helsinki
areas = {f["portAreaCode"]: f["geometry"]["coordinates"]
         for f in get(f"/port-call/v1/ports/{PORT}")["portAreas"]["features"]
         if f["geometry"]}

calls = get(f"/port-call/v1/port-calls?locode={PORT}"
            f"&etaFrom={iso(now)}&etaTo={iso(now + timedelta(hours=8))}")["portCalls"]

for c in calls:
    d = c["portAreaDetails"][0]
    if c.get("mmsi") in (None, 0) or d["portAreaCode"] not in areas:
        continue
    feats = get(f"/ais/v1/locations?mmsi={c['mmsi']}")["features"]
    if not feats:
        continue
    lon, lat = feats[0]["geometry"]["coordinates"]
    sog = feats[0]["properties"]["sog"]  # knots; 102.3 means "not available"
    dist_nm = km(lon, lat, *areas[d["portAreaCode"]]) / 1.852
    naive = now + timedelta(hours=dist_nm / sog) if 1 < sog < 102 else None
    print(f"{c['vesselName'][:20]:20} agent ETA {d['eta'][11:16]}  "
          f"{dist_nm:6.1f} nm at {sog:4.1f} kn  "
          f"naive ETA {naive.strftime('%H:%M') if naive else 'n/a (slow/stopped)'}")

A run on 8 November 2026 at about 10:35 UTC printed (times in UTC):

Finlandia            agent ETA 12:15    29.4 nm at 20.6 kn  naive ETA 12:01
Finbo Cargo          agent ETA 17:15    44.0 nm at  0.0 kn  naive ETA n/a (slow/stopped)
Megastar             agent ETA 16:30     0.4 nm at  0.0 kn  naive ETA n/a (slow/stopped)
MyStar               agent ETA 13:30    42.9 nm at  0.0 kn  naive ETA n/a (slow/stopped)
Viking XPRS          agent ETA 16:00    36.9 nm at 18.4 kn  naive ETA 12:36

Only Finlandia’s naive estimate lands near the declared time. Viking XPRS was making 18 knots but is declared hours later, so it was not on a direct run in. Megastar sat 0.4 nm from its harbour, stationary, with its next call later in the day, and Finbo Cargo and MyStar were stopped about 43 nm away. Distance over speed says nothing about any of them. A real model needs timetables, fairway geometry instead of straight lines, and berth plans, which is what the research above adds. To serve one, see our FastAPI model serving guide.

Other free AIS sources

SourceCoverageAccessLicence or terms
Fintraffic DigitrafficLive AIS from Finnish Transport Infrastructure Agency sources, plus port callsREST and MQTT, no keyCC BY 4.0
NOAA Marine CadastreUS waters, historical from 2009AccessAIS custom orders (zipped CSV, about 2 GB limit), bulk annual files, 2024 and 2025 GeoParquetCC0 1.0
Global Fishing WatchFishing vessel activity worldwide, AIS plus some government VMSREST API with a tokenNon-commercial use only

Marine Cadastre’s data comes from the US Coast Guard’s Nationwide AIS, and its GeoParquet files are cleaned of sentinel values.

Related reading: AI traffic signal control in Singapore and Barcelona, AI for environmental monitoring, and tools under data and research.

Honest limits

  • Most published ETA, fuel and routing results come from single ports, routes or vessels. Expect to retrain on your own traffic.
  • AIS metadata is thin: the destination is a short free-text field and the broadcast ETA carries no year. Position and speed are more reliable, but sentinel values (102.3 knots or a course of 360 for “not available”) need filtering.
  • JIT arrival fails without contracts and data sharing. Rotterdam’s feeder pilot found its own data gaps, and IMO lists charter party clauses as a main barrier.
  • Savings claims in port and vendor material are self-reported. Treat them as estimates.
#Maritime#AIS data#ETA prediction#Just-in-time arrival#IMO CII
AI

Written by AI Agents Directory

Editorial team

Facts in this guide are checked against official documentation and repositories, which are linked in the article.