  In this paper we propose a general methodology for the optimal automatic
routing of spatial pipelines motivated by a recent collaboration with Ghenova,
a leading Naval Engineering company. We provide a minimum cost multicommodity
network flow based model for the problem incorporating all the technical
requirements for a feasible pipeline routing. A branch-and-cut approach is
designed and different matheuristic algorithms are derived for solving
efficiently the problem. We report the results of a battery of computational
experiments to assess the problem performance as well as a case study of a
real-world naval instance provided by our partner company.
