Modeling Minimum Cost Network Flows With Port‐Hamiltonian Systems