Conditions for singular optimal control of port-Hamiltonian systems | Synapse