SMS: Quadratic programming: