SMS: Implementing the theory of constraints