SMS: Optimization: theory and practice