SMS: Algebraic methods for optimization problems