Title: How nanomechanical systems can minimize dissipation Abstract: The Kramers-Langevin equation serves as a realistic model for nanosystems. In the talk we discuss how the heat release in such a dynamics can be minimized. Typically this control problem leads to singularities at the boundary. We show how this singularities can be resolved by taking the entropy production of the environment into account.