  The algebraic path problem provides a general setting for shortest path
algorithms in optimization and computer science. This work extends the
algebraic path problem to networks equipped with input and output boundaries.
We show that the algebraic path problem is functorial as a mapping from a
double category whose horizontal composition is gluing of open networks. We
introduce functional open matrices, for which the functoriality of the
algebraic path problem has a more practical expression.
