  In this paper we combine two main topics in mechanics and optimal control
theory: contact Hamiltonian systems and Pontryagin Maximum Principle. As an
important result, among others, we develop a contact Pontryagin Maximum
Principle that permits to deal with optimal control problems with dissipation.
We also consider the Herglotz optimal control problem, which is simultaneously
a generalization of the Herglotz variational principle and an optimal control
problem. An application to the study of a thermodynamic system is provided.
