Use convex optimization to solve the MPC problem.