  We suggest a global perspective on dynamic network flow problems that takes
advantage of the similarities to port-Hamiltonian dynamics. Dynamic minimum
cost flow problems are formulated as open-loop optimal control problems for
general port-Hamiltonian systems with possibly state-dependent system matrices.
We prove well-posedness of these systems and characterize optimal controls by
the first-order optimality system, which is the starting point for the
derivation of an adjoint-based gradient descent algorithm. Our theoretical
analysis is complemented by a proof of concept, where we apply the proposed
algorithm to static minimum cost flow problems and dynamic minimum cost flow
problems on a simple directed acyclic graph. We present numerical results to
validate the approach.
