  Recent studies in maritime logistics have introduced a general ship routing
problem and a benchmark suite based on real shipping segments, considering
pickups and deliveries, cargo selection, ship-dependent starting locations,
travel times and costs, time windows, and incompatibility constraints, among
other features. Together, these characteristics pose considerable challenges
for exact and heuristic methods, and some cases with as few as 18 cargoes
remain unsolved. To face this challenge, we propose an exact branch-and-price
(B&P) algorithm and a hybrid metaheuristic. Our exact method generates
elementary routes, but exploits decremental state-space relaxation to speed up
column generation, heuristic strong branching, as well as advanced
preprocessing and route enumeration techniques. Our metaheuristic is a
sophisticated extension of the unified hybrid genetic search. It exploits a
set-partitioning phase and uses problem-tailored variation operators to
efficiently handle all the problem characteristics. As shown in our
experimental analyses, the B&P optimally solves 239/240 existing instances
within one hour. Scalability experiments on even larger problems demonstrate
that it can optimally solve problems with around 60 ships and 200 cargoes
(i.e., 400 pickup and delivery services) and find optimality gaps below 1.04%
on the largest cases with up to 260 cargoes. The hybrid metaheuristic
outperforms all previous heuristics and produces near-optimal solutions within
minutes. These results are noteworthy, since these instances are comparable in
size with the largest problems routinely solved by shipping companies.
