The first version of our berth planner treated arrival time as a number. A ship was due at 06:00, so we tried to give it a berth at 06:00. That works until a 9.4 metre-draft bulk carrier is due at low water, when no amount of optimisation will get it over the bar.
So the planner stopped asking “when does this ship arrive?” and started asking “when can this ship arrive?” The answer is almost never a single time. It is a window, and usually two a day.
From tide prediction to window
Every port we work with has a charted depth for its approach and a rule for under-keel clearance, the safety margin between the bottom of the hull and the seabed. For a given vessel the minimum height of tide it needs is simply:
required tide = draft + clearance − charted depth
We sample the port’s tide prediction every few minutes, find where it crosses that line, and keep the intervals above it. Those intervals become the only legal start times for that call.
Why windows make the solver faster
It is tempting to add the tide as one more soft penalty and let the solver sort it out. We tried that. The solver spent most of its time exploring plans that were physically impossible and then undoing them.
Giving each call a hard domain of allowed starts does the opposite. Impossible plans are never generated, the search space shrinks dramatically, and a full week at a mid-size port solves in seconds instead of minutes.
The details that bite
- Squat and trim. A ship moving through a channel sits deeper than it does alongside. Ports set their clearance rules with this in mind, so we always use the port’s rule rather than our own.
- Windows that close mid-call. Arriving inside a window is not enough if the ship cannot leave again before the next low water. Departures get their own windows, and the call duration links the two.
- Prediction is not observation. Wind and pressure move the real water level. Harbour masters can override a window on the day, and the planner repairs around the override.
None of this is new to anyone who has worked in a harbour office. The point is to write down what the harbour master already knows, so the software stops suggesting plans they would never accept.
Juno