SMS dit: Elements of dynamic optimization