← All documentation
The product

Predicting the next port

The core call. This is how VPM decides where a vessel is heading — the two signals it uses, the way it weighs them per ship, and the guardrails that keep it honest.

Updated September 2026 · ~7 min read

Two signals

Every prediction draws on two independent things: how the vessel has moved in the past, and where it says it is going now. Neither is reliable alone for every ship, so VPM carries both and decides, per vessel, which to trust.

The movement model

Each vessel's port history is turned into a statistical picture of how it moves — for every port, which ports have tended to follow it, and how often.

Port names are normalised before any of this — "Hamina (Fredrikshamn)" and "Hamina" become one place — so the history isn't fragmented by spelling.

The declared destination

Vessels broadcast a destination over AIS. It is free text, entered by the crew, and messy: port names, UN/LOCODEs, terminal names, transit waypoints, sometimes a final destination three calls away. VPM resolves it against a dictionary of real ports and known waypoints, with two specific guards:

The arbiter

For each vessel, VPM measures — from that vessel's history, replayed forward from the past only — how reliable each signal has been: how often the declared destination matched the actual next call, versus how often the movement model did. It then leans on whichever has earned it for that ship.

Why the arbiter is not optional

Some vessels declare their destination reliably; the model should defer to them. Others — a predictable liner — are better served by their own pattern than by a sometimes-stale AIS field. One strong North Sea vessel would lose accuracy if its declared destination were trusted over its rotation. The choice has to be per ship.

Using both at once

The newest layer stops treating the two signals as either/or. It learns, from history, the probability of the next call given both the origin port and the declared destination together — which catches the common case of a master entering a long-range final destination while the ship works intermediate calls along the way. A second mechanism learns aliases for declarations the dictionary can't resolve on its own — a terminal name that always precedes a particular port, for instance — and applies them only where the direct resolution came up empty.

How much history

More past is not automatically better. For each vessel, VPM back-tests several history windows — one to three years — and keeps the one that predicts that ship best. Around nine vessels in ten do best with no more than three years; many do best with less. The model is capped at three years regardless.

The voyage lock

A prediction is made once, at departure, and locked for that voyage — then scored when the vessel arrives.

This matters for honesty. Without the lock, a system that re-checks every couple of hours ends up reading the AIS destination back once the vessel is close and calling it a "prediction". That inflates the score with hindsight. The lock forces the call to be a genuine forecast, made when the outcome is still open.

Second and third port ahead

VPM also predicts two and three calls out. Rather than guessing the next port and building on that single guess, it weighs every plausible intermediate port by its likelihood and combines them, while keeping the memory of the last two calls intact. This gives a ranked list — a top-three that covers roughly half of second-port calls — which is more useful for planning than one compounding guess. Accuracy for these horizons is reported separately in Accuracy & methodology.

What was tried and dropped

Several intuitive additions were tested against the back-test and measured worse, so they are not in the product:

The pattern is consistent: next-port accuracy is a hit-or-miss measure, and spreading the prediction thin to hedge never wins the top slot — it only erodes predictions that were already sharp. The remaining lever is data coverage, not a cleverer algorithm.