Zaslat SMS: Optimal processes in irreversible thermodynamics and microeconomics