Zerua Tech Logo

AI for Berth Scheduling in Container Ports

Date: Saturday, Sep 21st 2024, 10:47
Share on
Share on Twitter
Share on Facebook
Share on LinkedIn
Aerial view of a red container ship at a quay with teal cranes and stacked containers in morning mist
A container ship that arrives at a port needs a berth, a stretch of quay with cranes where it can load and unload. If the berth is occupied, the ship waits, its engines keep burning fuel and producing emissions, and the port's plan for the following ships slips. Deciding which ship goes to which berth, and when, is the berth allocation problem, one of the most studied planning problems of container terminals. Since the fuel price rises of the late 2000s, many carriers also sail more slowly, which makes arrival times more flexible and more uncertain. This essay explains the problem, a 2009 idea that turned the arrival time into something to optimize, and how recent data-driven models improve the inputs of the schedule.

What a berth schedule is

The quay of a container terminal is divided into berths, and in the basic model each berth serves one ship at a time. Ships arrive over time and ask to be served and to leave within a time window, usually fixed in a contract between the terminal operator and the carrier. The terminal wants to assign every ship to a berth and a start time so that waiting and delayed departures are as small as possible while its customers stay satisfied. Earlier formulations reduced the time window to a single point in time, and a 2007 study by Golias, Boile and Theofanis showed how to penalize late departures and reward early and timely ones. In the discrete version, researchers sometimes treat the problem like machine scheduling, with each ship as a job and each berth as a machine.

Four flavors of the problem

In the discrete problem the quay is a finite set of berths, and in the continuous problem a ship can berth anywhere along the quay. In the static problem all the ships to be served are already in the port when the scheduling begins, while in the dynamic problem some have not arrived yet, so the schedule has to rely on estimated arrival times. The dynamic case is the realistic one, because ships arrive over time. The field is large: the 2015 follow-up survey of Bierwirth and Meisel counted more than 120 new publications on berth allocation and quay crane scheduling since their first survey, which covered research up to 2009.
Map of a bay with ship tracks converging on a port, drawn as yellow curves

Arrival time as a decision, not a given

Most formulations assumed either that the ships are already in port or that their arrival times are fixed in advance. Golias and colleagues proposed in 2009 to treat the arrival time as a variable that the schedule can optimize. Slow steaming, the practice of sailing at a lower speed to save fuel, has been in use since 2008 and made this natural: a ship that does not need to arrive early can sail more slowly. Their policy aims to minimize delayed departures and, indirectly, the fuel burned and the emissions produced by ships idling in port, and it gives the carrier an optimized speed. On example problems with real data, the authors report lower emissions from idle vessels, better fuel use and port waiting time, and fewer effects of late arrivals on the carrier's schedule.

Putting fuel and emissions in the model

Later work made fuel and emissions explicit. Du and colleagues (2011) built a berth allocation model in which fuel consumption depends on the sailing speed. This relation is nonlinear, so they recast the model as a mixed-integer second-order cone program that solvers can handle. Emissions are estimated for the sailing period with common emission factors, and emissions during mooring are assessed in a step after the optimization, based on the waiting time. Their results show that the strategy cuts fuel use and emissions while keeping the terminal's service level. Environmental criteria are therefore part of the berth scheduling literature, not an open gap.

Better inputs: predicting service time

A schedule is only as good as the times it assumes. The service time of a vessel, from its arrival at the berth to its departure, is a key measure of port efficiency, and the departure time that vessels report often differs substantially from what happens. Yan and colleagues (2024) built a tree-based stacking model on port call records from 2020 to 2023 and, compared with the vessel-reported times, reduced the mean absolute error by 29.7%, from 4.54 to 3.19 hours, and the root mean square error by 31.9%, from 6.58 to 4.48 hours, with an R-squared of 0.8.
Map of a busy port approach with many ships and yellow routes leading to the terminals
A second study, by Chu and colleagues (2024), predicted the turnaround time of vessels at the port of Hong Kong with XGBoost, a gradient boosting method, trained on arrival and departure records from 2022 and the first quarter of 2023. Compared with the departure times reported by the vessels, it cut the mean absolute error by 23%, from 5.1 to 3.9 hours, and the root mean square error by 24%, from 8.0 to 6.1 hours. The arrival side of the problem is the subject of our post on vessel ETA prediction: together, predicted arrival times and predicted service times are the inputs a berth schedule needs.

What can go wrong

Learning models depend on their data. Position data from the Automatic Identification System can contain invalid messages, impossible tracks and wrong time stamps, as our post on AIS data cleaning describes, and small or noisy datasets lead to overfitting, where a model learns the quirks of its training data and fails on new cases. A model trained on the records of one port or one period may also not transfer to another. On the optimization side, the number of possible schedules grows very fast with the number of ships and berths, and search methods can get stuck in local optima. For large instances researchers therefore use heuristics such as genetic algorithms, which have been applied to berth allocation since at least 2007, but these need careful tuning and give no guarantee of the global optimum.
A berth schedule is a chain: predictions of arrival and service times feed an optimization that also decides how fast ships should come, and each link can be improved with data. Fuel, emissions and punctuality are no longer separate topics for the terminal and the carrier, they are parts of one plan.
References

Recent Posts

Machine Learning for Ship Detection in Satellite Images
Oct 25th 2026
Radar sees ships through cloud and night. Correcting labels lifted optical ship recognition from 0.66-0.70 to about 0.80 mAP, more than a newer model did.
Why Ships Go Missing from Satellite AIS
Aug 14th 2026
Satellite AIS loses ships to message collisions, late data and gaps between passes. Six studies show how much is missed and how analysts work around it.
Orbit Propagation: Which Perturbations Matter
Jun 4th 2026
Across 320 propagator setups, gravity fields beyond 32 by 32 added no accuracy, while drag, the Sun and Moon, and sunlight pressure matter in different orbits.