SMS dit: A Versatile procedure for optimisation of a nonlinear