SMS: Optimal control theory