Shipping costs for Optimal Control: An Introduction to the Theory and Its Applications