First pass at shipping puzzle in MiniZinc. See https://kevinlynagh.com/notes/shipping-puzzle/
Runs in 2.5 seconds on my 2013 macbook air. Anything more than 7 routes takes more than a few minutes (and I stopped waiting).
I tried to improve perf by breaking symmetry in the rows of routes
by ordering the routes according to the first leg.
(i.e., the first non-zero value in a row of routes
should be less than the first non-zero value of the next row of routes
)
But I couldn't figure out how to do that neatly.